[all-commits] [llvm/llvm-project] ef1c25: [CodeGen][AArch64] Don't split jump table basic bl...

Daniel Hoekwater via All-commits all-commits at lists.llvm.org
Mon Aug 28 14:48:18 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ef1c25eb50502692f343e9ac0b83b52086aa584e
      https://github.com/llvm/llvm-project/commit/ef1c25eb50502692f343e9ac0b83b52086aa584e
  Author: Daniel Hoekwater <hoekwater at google.com>
  Date:   2023-08-28 (Mon, 28 Aug 2023)

  Changed paths:
    M llvm/include/llvm/CodeGen/TargetInstrInfo.h
    M llvm/lib/CodeGen/MachineFunctionSplitter.cpp
    M llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
    M llvm/lib/Target/AArch64/AArch64InstrInfo.h
    M llvm/test/CodeGen/Generic/machine-function-splitter.ll

  Log Message:
  -----------
  [CodeGen][AArch64] Don't split jump table basic blocks

Jump tables on AArch64 are label-relative rather than table-relative, so
having jump table destinations that are in different sections causes
problems with relocation. Jump table lookups have a max range of 1MB, so
all destinations must be in the same section as the lookup code. Both of
these restrictions can be mitigated with some careful and complex logic,
but doing so doesn't gain a huge performance benefit.

Efficiently ensuring jump tables are correct and can be compressed on
AArch64 is a TODO item. In the meantime, don't split blocks that can
cause problems.

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




More information about the All-commits mailing list