[all-commits] [llvm/llvm-project] b88178: Support critical edge splitting for jump tables
Matthias Braun via All-commits
all-commits at lists.llvm.org
Wed May 10 20:45:23 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b8817825b9dcb45f204d3a3a9056f929e12c7a3b
https://github.com/llvm/llvm-project/commit/b8817825b9dcb45f204d3a3a9056f929e12c7a3b
Author: Matthias Braun <matze at braunis.de>
Date: 2023-05-10 (Wed, 10 May 2023)
Changed paths:
M llvm/include/llvm/CodeGen/TargetInstrInfo.h
M llvm/lib/CodeGen/MachineBasicBlock.cpp
M llvm/lib/Target/X86/X86InstrInfo.cpp
M llvm/lib/Target/X86/X86InstrInfo.h
A llvm/test/CodeGen/X86/switch-jmp-edge-split.mir
M llvm/test/CodeGen/X86/switch-phi-const.ll
Log Message:
-----------
Support critical edge splitting for jump tables
Add support for splitting critical edges coming from an indirect jump
using a jump table ("switch jumps").
This introduces the `TargetInstrInfo::getJumpTableIndex` callback to
allows targets to return an index into `MachineJumpTableInfo` for a
given indirect jump. It also updates to
`MachineBasicBlock::SplitCriticalEdge` to allow splitting of critical
edges by rewriting jump table entries.
This is largely based on work done by Zhixuan Huan in D132202.
Differential Revision: https://reviews.llvm.org/D140975
More information about the All-commits
mailing list