[all-commits] [llvm/llvm-project] d26b43: Add JumpTableToSwitch pass (#77709)
Alexander Shaposhnikov via All-commits
all-commits at lists.llvm.org
Sat Feb 10 01:12:57 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d26b43ff4f7396f79de4b099160262c750d6aba7
https://github.com/llvm/llvm-project/commit/d26b43ff4f7396f79de4b099160262c750d6aba7
Author: Alexander Shaposhnikov <6532716+alexander-shaposhnikov at users.noreply.github.com>
Date: 2024-02-10 (Sat, 10 Feb 2024)
Changed paths:
A llvm/include/llvm/Transforms/Scalar/JumpTableToSwitch.h
M llvm/lib/Passes/PassBuilder.cpp
M llvm/lib/Passes/PassBuilderPipelines.cpp
M llvm/lib/Passes/PassRegistry.def
M llvm/lib/Transforms/Scalar/CMakeLists.txt
A llvm/lib/Transforms/Scalar/JumpTableToSwitch.cpp
M llvm/test/Other/new-pm-defaults.ll
A llvm/test/Transforms/JumpTableToSwitch/basic.ll
A llvm/test/Transforms/JumpTableToSwitch/max_function_size.ll
A llvm/test/Transforms/JumpTableToSwitch/remarks.ll
A llvm/test/Transforms/JumpTableToSwitch/skip.ll
A llvm/test/Transforms/JumpTableToSwitch/stride.ll
A llvm/test/Transforms/JumpTableToSwitch/struct.ll
Log Message:
-----------
Add JumpTableToSwitch pass (#77709)
Add a pass to convert jump tables to switches.
The new pass replaces an indirect call with a switch + direct calls if all the functions in the jump table are smaller than the provided threshold.
The pass is currently disabled by default and can be enabled by -enable-jump-table-to-switch.
Test plan: ninja check-all
More information about the All-commits
mailing list