[PATCH] D25878: IR, X86: Understand !range metadata on global variables.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 21 15:41:42 PDT 2016

pcc added a reviewer: sanjoy.
pcc added a comment.

> The IR representation you're using in your testcases is abusing the meaning of a global variable.

Yes, I think this is certainly one of the downsides of this representation.

> we assume that global variables don't alias each other. (See llvm::isIdentifiedObject etc.)

Orthogonally: this assumption doesn't seem sound in general. An object file may define multiple external symbols with the same address (e.g. using GlobalAlias) which may be referenced using separate external GlobalVariables.

> Some sort of GlobalConstant might make sense if the code patterns from your testcases are useful.

Maybe. I'm not sure how feasible that approach would be though. I'll experiment with it a little and see.


More information about the llvm-commits mailing list