[PATCH] D25878: IR, X86: Understand !range metadata on global variables.
Chris Lattner via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 25 22:12:59 PDT 2016
lattner added a comment.
I think there are two things going on here. I think that eli is right: LLVM IR global variables should always be assumable that they don't alias. This is guaranteed by C and other source languages and is important for LLVM to be able to represent. Separately though, I think it makes sense for LLVM globals to have !range metadata to specify that (though disjoint) they live in a specific address range that can fit into immediates.
There is a degenerate case where a global has a known address (either through magic knowledge by the frontend, or by a clang attribute, or by the compiler somehow knowing about a linker map in flight, e.g. with LTO) can be either represented with a specific !range metadata or with a new GlobalConstant address. I think it would be better to discuss such significant IR changes on llvmdev though.
https://reviews.llvm.org/D25878
More information about the llvm-commits
mailing list