Skip to content
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

Merged
merged 1 commit into from
Dec 21, 2022
Merged

Add -Zno-jump-tables #105812

merged 1 commit into from
Dec 21, 2022

Conversation

ojeda
Copy link
Contributor

@ojeda ojeda commented Dec 17, 2022

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

@rustbot
Copy link
Collaborator

rustbot commented Dec 17, 2022

r? @TaKO8Ki

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 17, 2022
@rust-log-analyzer

This comment has been minimized.

@TaKO8Ki
Copy link
Member

TaKO8Ki commented Dec 20, 2022

I want to reroll it. r? compiler

@rustbot rustbot assigned wesleywiser and unassigned TaKO8Ki Dec 20, 2022
@nikic
Copy link
Contributor

nikic commented Dec 20, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Dec 20, 2022

📌 Commit 36125789c074ab9b1aadb4b5dc2099ca7db6a316 has been approved by nikic

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 20, 2022
@nikic
Copy link
Contributor

nikic commented Dec 20, 2022

@bors rollup=never assembly test

@bors
Copy link
Contributor

bors commented Dec 20, 2022

⌛ Testing commit 36125789c074ab9b1aadb4b5dc2099ca7db6a316 with merge abd27fd360c7c67efb43690a996aeeb591975264...

@bors
Copy link
Contributor

bors commented Dec 20, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 20, 2022
@rust-log-analyzer

This comment has been minimized.

@nikic
Copy link
Contributor

nikic commented Dec 20, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Dec 20, 2022

📌 Commit 70c4ea0681859fe18a0c4106509aeceace357a1d has been approved by nikic

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 20, 2022
@bors
Copy link
Contributor

bors commented Dec 20, 2022

⌛ Testing commit 70c4ea0681859fe18a0c4106509aeceace357a1d with merge 4352f680ca9e476629bcdf9b758b575fb69ef918...

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 20, 2022
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 <[email protected]>
@rust-log-analyzer

This comment has been minimized.

@ojeda
Copy link
Contributor Author

ojeda commented Dec 20, 2022

I relaxed it to match the label without the initial period in the Apple target.

@nikic
Copy link
Contributor

nikic commented Dec 20, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Dec 20, 2022

📌 Commit a65ec44 has been approved by nikic

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 20, 2022
@bors
Copy link
Contributor

bors commented Dec 21, 2022

⌛ Testing commit a65ec44 with merge 554eb669173b4e9a0ac5e011ac4408fc6bcec7a1...

@bors
Copy link
Contributor

bors commented Dec 21, 2022

💥 Test timed out

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 21, 2022
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@nikic
Copy link
Contributor

nikic commented Dec 21, 2022

@bors retry timeout in install awscli

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 21, 2022
@ojeda
Copy link
Contributor Author

ojeda commented Dec 21, 2022

Thanks Nikita!

@bors
Copy link
Contributor

bors commented Dec 21, 2022

⌛ Testing commit a65ec44 with merge a8207df...

@bors
Copy link
Contributor

bors commented Dec 21, 2022

☀️ Test successful - checks-actions
Approved by: nikic
Pushing a8207df to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 21, 2022
@bors bors merged commit a8207df into rust-lang:master Dec 21, 2022
@rustbot rustbot added this to the 1.68.0 milestone Dec 21, 2022
@ojeda ojeda deleted the no-jump-tables branch December 21, 2022 20:30
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a8207df): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This 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.

Cycles

This benchmark run did not return any relevant results for this metric.

@workingjubilee workingjubilee added the A-CLI Area: Command-line interface (CLI) to the compiler label Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CLI Area: Command-line interface (CLI) to the compiler merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants