[all-commits] [llvm/llvm-project] 2a2f02: [X86] Use 64-bit jump table entries for large code...

aeubanks via All-commits all-commits at lists.llvm.org
Thu Aug 31 14:13:59 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2a2f02e19f7737966592f24aa4354286d9756bd9
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2023-08-31 (Thu, 31 Aug 2023)

  Changed paths:
    M llvm/include/llvm/CodeGen/MIRYamlMapping.h
    M llvm/include/llvm/CodeGen/MachineJumpTableInfo.h
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    M llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
    M llvm/lib/CodeGen/MachineFunction.cpp
    M llvm/lib/Target/X86/X86ISelLoweringCall.cpp
    A llvm/test/CodeGen/X86/large-pic-jump-table.ll

  Log Message:
  [X86] Use 64-bit jump table entries for large code model PIC

With the large code model, the label difference may not fit into 32 bits.
Even if we assume that any individual function is no larger than 2^32
and use a difference from the function entry to the target destination,
things like BOLT can rearrange blocks (even if BOLT doesn't necessarily
work with the large code model right now).

set directives avoid static relocations in some 32-bit entry cases, but
don't worry about set directives for 64-bit jump table entries (we can
do that later if somebody really cares about it).

check-llvm in a bootstrapped clang with the large code model passes.

Fixes #62894

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D159297

More information about the All-commits mailing list