[PATCH] D16263: [CodeGenPrepare] Also consider metadata uses

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 20 11:54:34 PST 2016


> On Jan 20, 2016, at 11:40 AM, Keno Fischer <kfischer at college.harvard.edu> wrote:
> 
> DWARF may describe locations, but LLVM IR describes values and just happens to reuse the DWARF opcodes for it's expressions.

I was just trying to explain why the operation doesn’t exist. A possible solution might be typed DWARF operations which are coming in DWARF 5: http://dwarfstd.org/ShowIssue.php?issue=140425.1 We could have the verifier recognize a trailing DW_OP_reinterpret, but implementing the type arguments in IR would take quite some work.
A simpler, similar alternative is to add a DW_OP_and operation at the end and have the verifier recognize that.

-- adrian

> On Wed, Jan 20, 2016 at 8:37 PM, Adrian Prantl <aprantl at apple.com <mailto:aprantl at apple.com>> wrote:
> 
> > On Jan 16, 2016, at 9:01 PM, Keno Fischer <kfischer at college.harvard.edu <mailto:kfischer at college.harvard.edu>> wrote:
> >
> > loladiro added a comment.
> >
> > Yeah, I was fearing something like that, although I had hoped that since this won't actually show  up in the generated assembly (or at least it shouldn't), it might be ok. In any case, I don't think this is representable in debug info currently without having an actual trunc instruction. We could modify the DIExpression to be able to express truncation, but that's somewhat tricky, since DWARF does not have such an operation. @aprantl, thoughts?
> 
> Is the problem the Verifier? Because DWARF expressions are supposed to describe the location of a value rather than the value a truncation operation doesn’t necessarily make sense.
> 
> -- adrian
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160120/89f0d5bb/attachment.html>


More information about the llvm-commits mailing list