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

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 16 21:41:10 PST 2016


hfinkel added a comment.

In http://reviews.llvm.org/D16263#328737, @loladiro wrote:

> 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 general, anything you do to change the IR can change the code generated. If nothing else, there are a lot of transformations and analysis in the backend that, say, only look back through N instructions (for some fixed N).

> 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?


This is certainly not my area of expertise, but DWARF does have the ability to represent data in only parts of registers, so it seems like there should be some way to express what you want. If the values are sign/zeroextended, is there an actual problem with the DWARF being generated (i.e. would garbage somehow appear in the debugger), or is it just the upcoming verifier that would complain?


Repository:
  rL LLVM

http://reviews.llvm.org/D16263





More information about the llvm-commits mailing list