Commit 239a41e8 authored by Arthur Eubanks's avatar Arthur Eubanks
Browse files

Re-Reland [X86] Respect code models more when determining if a global...

Re-Reland [X86] Respect code models more when determining if a global reference can fit in 32 bits (#75386)

For non-GlobalValue references, the small and medium code models can use
32 bit constants.

For GlobalValue references, use TargetMachine::isLargeGlobalObject().
Look through aliases for determining if a GlobalValue is small or large.
Even the large code model can reference small objects with 32 bit
constants as long as we're in no-pic mode, or if the reference is offset
from the GOT.

Original commit broke the build...

First reland broke large PIC builds referencing small data since it was using GOTOFF as a 32-bit constant.
parent e692d083
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment