Skip to content

Commit 54232b8

Browse files
committed
[AArch64] Lower jump table cases threshold to 10
Previous stabs at this setting hypertuned it for SPEC2017, but Clang's own compilation can benefit from a slightly lower threshold, yielding a 0.3% improvement in compile time, while still not regressing SPEC. Most notable benefactors of this change are: - llvm::Instruction::getNumSuccessors (11 cases) - llvm::Instruction::getSuccessor (11 cases)
1 parent 66911b7 commit 54232b8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/lib/Target/AArch64/AArch64Subtarget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static cl::opt<AArch64PAuth::AuthCheckMethod>
7373
cl::values(AUTH_CHECK_METHOD_CL_VALUES_LR));
7474

7575
static cl::opt<unsigned> AArch64MinimumJumpTableEntries(
76-
"aarch64-min-jump-table-entries", cl::init(13), cl::Hidden,
76+
"aarch64-min-jump-table-entries", cl::init(10), cl::Hidden,
7777
cl::desc("Set minimum number of entries to use a jump table on AArch64"));
7878

7979
static cl::opt<unsigned> AArch64StreamingHazardSize(

llvm/test/CodeGen/AArch64/min-jump-table.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ entry:
105105
; CHECK4-NEXT: Jump Tables:
106106
; CHECK8-NEXT: Jump Tables:
107107
; CHECK12-NEXT: Jump Tables:
108-
; CHECK-DEFAULT-NOT: {{^}}Jump Tables:
108+
; CHECK-DEFAULT: {{^}}Jump Tables:
109109

110110
bb1: tail call void @ext(i32 1, i32 0) br label %return
111111
bb2: tail call void @ext(i32 2, i32 2) br label %return

0 commit comments

Comments
 (0)