[all-commits] [llvm/llvm-project] 5e38ba: [X86] Respect code models more when determining if...

Arthur Eubanks via All-commits all-commits at lists.llvm.org
Thu Dec 14 09:28:41 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5e38ba26d2189267a95b4dde4d7b4ae85260eaf3
      https://github.com/llvm/llvm-project/commit/5e38ba26d2189267a95b4dde4d7b4ae85260eaf3
  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:
  -----------
  [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.




More information about the All-commits mailing list