-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add -Zno-jump-tables
#105812
Add -Zno-jump-tables
#105812
Conversation
r? @TaKO8Ki (rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
0163d5b
to
3612578
Compare
I want to reroll it. r? compiler |
@bors r+ |
📌 Commit 36125789c074ab9b1aadb4b5dc2099ca7db6a316 has been approved by It is now in the queue for this repository. |
@bors rollup=never assembly test |
⌛ Testing commit 36125789c074ab9b1aadb4b5dc2099ca7db6a316 with merge abd27fd360c7c67efb43690a996aeeb591975264... |
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
3612578
to
70c4ea0
Compare
@bors r+ |
📌 Commit 70c4ea0681859fe18a0c4106509aeceace357a1d has been approved by It is now in the queue for this repository. |
⌛ Testing commit 70c4ea0681859fe18a0c4106509aeceace357a1d with merge 4352f680ca9e476629bcdf9b758b575fb69ef918... |
This flag mimics GCC/Clang's `-fno-jump-tables` [1][2], which makes the codegen backend avoid generating jump tables when lowering switches. In the case of LLVM, the `"no-jump-tables"="true"` function attribute is added to every function. The kernel currently needs it for x86 when enabling IBT [3], as well as for Alpha (plus VDSO objects in MIPS/LoongArch). [1] https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fno-jump-tables [2] https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fjump-tables [3] https://github.com/torvalds/linux/blob/v6.1/arch/x86/Makefile#L75-L83 Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
70c4ea0
to
a65ec44
Compare
This comment has been minimized.
This comment has been minimized.
I relaxed it to match the label without the initial period in the Apple target. |
@bors r+ |
⌛ Testing commit a65ec44 with merge 554eb669173b4e9a0ac5e011ac4408fc6bcec7a1... |
💥 Test timed out |
@bors retry timeout in install awscli |
Thanks Nikita! |
☀️ Test successful - checks-actions |
Finished benchmarking commit (a8207df): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. |
This flag mimics GCC/Clang's
-fno-jump-tables
[1][2], which makes the codegen backend avoid generating jump tables when lowering switches.In the case of LLVM, the
"no-jump-tables"="true"
function attribute is added to every function.The kernel currently needs it for x86 when enabling IBT [3], as well as for Alpha (plus VDSO objects in MIPS/LoongArch).
[1] https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fno-jump-tables
[2] https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fjump-tables
[3] https://github.com/torvalds/linux/blob/v6.1/arch/x86/Makefile#L75-L83