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

rustc_session: default to -Z plt=yes on non-x86_64 #109982

Merged
merged 4 commits into from
Jun 23, 2023

Conversation

durin42
Copy link
Contributor

@durin42 durin42 commented Apr 5, 2023

Per the discussion in #106380 plt=no isn't a great default, and rust-lang/compiler-team#581 decided that the default should be PLT=yes for everything except x86_64. Not everyone agrees about the x86_64 part of this change, but this at least is an improvement in the state of things without changing the x86_64 situation, so I've attempted making this change in the name of not letting the perfect be the enemy of the good.

Please let me know if I've messed this up somehow - I'm not wholly confident I got this right.

r? @nikic

@rustbot
Copy link
Collaborator

rustbot commented Apr 5, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikic (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@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 Apr 5, 2023
@@ -978,7 +978,7 @@ impl Session {
pub fn needs_plt(&self) -> bool {
// Check if the current target usually needs PLT to be enabled.
// The user can use the command line flag to override it.
let needs_plt = self.target.needs_plt;
let needs_plt = self.target.arch != "x86_64";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should still be based on a target property. Just inverted from needs_plt to no_plt_by_default or something.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did that, but I realized as I did it that this might invalidate existing target json files. Is that something I need to worry about?

(I'm also only about 70% sure I did this right, so please give it careful scrutiny)

@rust-log-analyzer

This comment has been minimized.

@apiraino
Copy link
Contributor

apiraino commented May 3, 2023

Switching to waiting on author to incorporate changes. @durin42 Feel free to request a review with @rustbot ready, thanks!

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 3, 2023
@Dylan-DPC
Copy link
Member

@durin42 any updates on this? thanks

@durin42
Copy link
Contributor Author

durin42 commented May 22, 2023

I'll get back to it - I've been out of the office for most of May, but should get back to this in early June.

If someone else wants to take this over, I won't be offended, just have had a busy month. :)

@durin42 durin42 force-pushed the plt-no-x86_64-only branch from d4834e8 to 0d21728 Compare June 8, 2023 16:25
@rustbot
Copy link
Collaborator

rustbot commented Jun 8, 2023

These commits modify compiler targets.
(See the Target Tier Policy.)

@durin42
Copy link
Contributor Author

durin42 commented Jun 8, 2023

@rustbot review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 8, 2023
@nikic
Copy link
Contributor

nikic commented Jun 8, 2023

@bors r+ rollup=never

@bors
Copy link
Contributor

bors commented Jun 8, 2023

📌 Commit 0d21728597d2f6bbda7d56cbb55e0848917c04b8 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 Jun 8, 2023
@bors
Copy link
Contributor

bors commented Jun 8, 2023

⌛ Testing commit 0d21728597d2f6bbda7d56cbb55e0848917c04b8 with merge c7b76ef7e61b11a84a7eff0556fe84e383763eaa...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jun 8, 2023

💔 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 Jun 8, 2023
durin42 added 2 commits June 22, 2023 14:29
Per the discussion in rust-lang#106380 plt=no isn't a great default, and
rust-lang/compiler-team#581 decided that the default should be PLT=yes
for everything except x86_64. Not everyone agrees about the x86_64 part
of this change, but this at least is an improvement in the state of
things without changing the x86_64 situation, so I've attempted making
this change in the name of not letting the perfect be the enemy of the
good.
@durin42 durin42 force-pushed the plt-no-x86_64-only branch from 0d21728 to 34d0cff Compare June 22, 2023 19:01
@nikic
Copy link
Contributor

nikic commented Jun 23, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Jun 23, 2023

📌 Commit 52d50fb 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 Jun 23, 2023
@bors
Copy link
Contributor

bors commented Jun 23, 2023

⌛ Testing commit 52d50fb with merge c79d6be...

@bors
Copy link
Contributor

bors commented Jun 23, 2023

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 23, 2023
@bors bors merged commit c79d6be into rust-lang:master Jun 23, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 23, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c79d6be): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.3%, -0.2%] 5
Improvements ✅
(secondary)
-0.5% [-0.6%, -0.3%] 3
All ❌✅ (primary) -0.3% [-0.3%, -0.2%] 5

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.0% [-2.7%, -0.7%] 4
All ❌✅ (primary) - - 0

Cycles

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

Binary size

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

Bootstrap: 661.369s -> 661.671s (0.05%)

@nikic nikic mentioned this pull request Jun 27, 2023
@durin42 durin42 deleted the plt-no-x86_64-only branch July 27, 2023 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Development

Successfully merging this pull request may close these issues.

8 participants