4

Add `-Zno-jump-tables` by ojeda · Pull Request #105812 · rust-lang/rust · GitHub

 1 year ago
source link: https://github.com/rust-lang/rust/pull/105812
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Add -Zno-jump-tables #105812

Conversation

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

Collaborator

rustbot commented Dec 17, 2022

r? @TaKO8Ki

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

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

This comment has been minimized.

Member

TaKO8Ki commented Dec 20, 2022

I want to reroll it. r? compiler

Contributor

nikic commented Dec 20, 2022

@bors r+

Contributor

bors commented Dec 20, 2022

pushpin Commit 3612578 has been approved by nikic

It is now in the queue for this repository.

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

Contributor

nikic commented Dec 20, 2022

@bors rollup=never assembly test

Contributor

bors commented Dec 20, 2022

hourglass Testing commit 3612578 with merge abd27fd...

Contributor

bors commented Dec 20, 2022

broken_heart Test failed - checks-actions

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 comment has been minimized.

Contributor

nikic commented Dec 20, 2022

@bors r+

Contributor

bors commented Dec 20, 2022

pushpin Commit 70c4ea0 has been approved by nikic

It is now in the queue for this repository.

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

Contributor

bors commented Dec 20, 2022

hourglass Testing commit 70c4ea0 with merge 4352f68...

Contributor

bors commented Dec 20, 2022

broken_heart Test failed - checks-actions

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 comment has been minimized.

Contributor

Author

ojeda commented Dec 20, 2022

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

Contributor

nikic commented Dec 20, 2022

@bors r+

Contributor

bors commented Dec 20, 2022

pushpin Commit a65ec44 has been approved by nikic

It is now in the queue for this repository.

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

Contributor

bors commented Dec 21, 2022

hourglass Testing commit a65ec44 with merge 554eb66...

Contributor

bors commented Dec 21, 2022

boom Test timed out

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

Collaborator

rust-log-analyzer commented Dec 21, 2022

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

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

Contributor

nikic commented Dec 21, 2022

@bors retry timeout in install awscli

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

Contributor

Author

ojeda commented Dec 21, 2022

Thanks Nikita!

Contributor

bors commented Dec 21, 2022

hourglass Testing commit a65ec44 with merge a8207df...

Contributor

bors commented Dec 21, 2022

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

bors

added the merged-by-bors This PR was explicitly merged by bors label

Dec 21, 2022

bors

merged commit a8207df into

rust-lang:master

Dec 21, 2022

11 checks passed

ojeda

deleted the no-jump-tables branch

Dec 21, 2022

Collaborator

rust-timer commented Dec 21, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

nikic

Labels
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

Milestone

1.68.0

Development

Successfully merging this pull request may close these issues.

None yet

8 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK