[PATCH] D108977: [AArch64] Support target specific isSuitableForJumpTable
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 1 15:44:20 PDT 2021
dmgreen added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:10753
+ // scores.
+ if (NumCases <= 16)
+ return false;
----------------
Where did the number 16 come from? Just from benchmarks? Unless there are jump tables in hot areas of the code this is more likely to be measuring the knock-on effects of changing code alignment than anything actually to do with the jump tables. It just turns into noise that doesn't stand up over time as other changes get made by the compiler.
It would likely be best to at least have it as an option. Some of the tests below could then keep small testing jumptables.
================
Comment at: llvm/test/CodeGen/AArch64/jump-table.ll:6
define i32 @test_jumptable(i32 %in) {
----------------
Any of these test checking for the structure of jump tables are probably best left testing jump tables, perhaps with an option to overwrite the default.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108977/new/
https://reviews.llvm.org/D108977
More information about the llvm-commits
mailing list