Attaching !range to a global variable does two things:
- Marks it as an absolute symbol reference.
- Specifies the value range of that symbol's address.
Teach the X86 backend to allow absolute symbols to appear in place of
immediates by extending the relocImm and mov64imm32 matchers. Start using
relocImm in more places where it is legal.
As previously proposed on llvm-dev:
http://lists.llvm.org/pipermail/llvm-dev/2016-October/105800.html
Depends on D25812
Depends on D25862
Depends on D25877
This is sort of nitpicking, but could we call this something other than !range? Maybe !absolute_symbol? It's very different from the other uses of range metadata, given that it has mandatory effects on code generation.