Skip to content

rustc: Handle #[inline(always)] at -O0 #45202

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

Merged
merged 1 commit into from
Oct 16, 2017

Conversation

alexcrichton
Copy link
Member

This commit updates the handling of #[inline(always)] functions at -O0 to
ensure that it's always inlined regardless of the number of codegen units used.

Closes #45201

@alexcrichton
Copy link
Member Author

r? @michaelwoerister

@kennytm
Copy link
Member

kennytm commented Oct 11, 2017

[01:05:17] ---- [codegen-units] codegen-units/partitioning/local-inlining-but-not-all.rs stdout ----
[01:05:17] 	
[01:05:17] The following items were assigned to wrong codegen units:
[01:05:17] 
[01:05:17] fn local_inlining_but_not_all::inline[0]::inlined_function[0]
[01:05:17]   expected: local_inlining_but_not_all-inline[External] 
[01:05:17]   actual:   local_inlining_but_not_all-user1[Internal] local_inlining_but_not_all-user2[Internal] 
[01:05:17] 
[01:05:17] thread '[codegen-units] codegen-units/partitioning/local-inlining-but-not-all.rs' panicked at 'explicit panic', /checkout/src/tools/compiletest/src/runtest.rs:1919:12
[01:05:17] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:05:17] 
[01:05:17] 
[01:05:17] failures:
[01:05:17]     [codegen-units] codegen-units/partitioning/local-inlining-but-not-all.rs
[01:05:17] 
[01:05:17] test result: �[31mFAILED�(B�[m. 32 passed; 1 failed; 3 ignored; 0 measured; 0 filtered out

This commit updates the handling of `#[inline(always)]` functions at -O0 to
ensure that it's always inlined regardless of the number of codegen units used.

Closes rust-lang#45201
alexcrichton added a commit to rust-lang/stdarch that referenced this pull request Oct 14, 2017
@shepmaster shepmaster added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 15, 2017
@alexcrichton
Copy link
Member Author

ping r? @michaelwoerister

@michaelwoerister
Copy link
Member

I somehow thought I had already approved this ...

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 16, 2017

📌 Commit 5d415e8 has been approved by michaelwoerister

@bors
Copy link
Collaborator

bors commented Oct 16, 2017

⌛ Testing commit 5d415e8 with merge ba4e8d7...

bors added a commit that referenced this pull request Oct 16, 2017
…ster

rustc: Handle #[inline(always)] at -O0

This commit updates the handling of `#[inline(always)]` functions at -O0 to
ensure that it's always inlined regardless of the number of codegen units used.

Closes #45201
@kennytm kennytm 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 16, 2017
@bors
Copy link
Collaborator

bors commented Oct 16, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: michaelwoerister
Pushing ba4e8d7 to master...

@bors bors merged commit 5d415e8 into rust-lang:master Oct 16, 2017
@alexcrichton alexcrichton deleted the fix-inline-always branch October 28, 2017 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants