[all-commits] [llvm/llvm-project] 239a41: Re-Reland [X86] Respect code models more when dete...

Arthur Eubanks via All-commits all-commits at lists.llvm.org
Thu Dec 14 14:13:25 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 239a41e8f2ca84b2fa5e1426e2697a2bc436d218
      https://github.com/llvm/llvm-project/commit/239a41e8f2ca84b2fa5e1426e2697a2bc436d218
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2023-12-14 (Thu, 14 Dec 2023)

  Changed paths:
    M llvm/include/llvm/Target/TargetMachine.h
    M llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
    M llvm/lib/Target/TargetMachine.cpp
    M llvm/lib/Target/X86/X86FastISel.cpp
    M llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
    M llvm/lib/Target/X86/X86Subtarget.cpp
    M llvm/test/CodeGen/X86/code-model-elf.ll

  Log Message:
  -----------
  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.




More information about the All-commits mailing list