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

Flag failure functions as inline(never) #11550

Merged
merged 1 commit into from
Jan 15, 2014
Merged

Conversation

alexcrichton
Copy link
Member

The failure functions are generic, meaning they're candidates for getting
inlined across crates. This has been happening, leading to monstrosities like
that found in #11549. I have verified that the codegen is much better now that
we're not inlining the failure path (the slow path).

@huonw
Copy link
Member

huonw commented Jan 15, 2014

Is this something we can have a codegen test for?

@alexcrichton
Copy link
Member Author

Hm, maybe! I'm not entirely sure how they work though. Do we have ratcheting turned on?

@thestinger
Copy link
Contributor

@alexcrichton: can you try marking them as #[cold] instead? I don't really understand why they'd be inlined because I can't actually get LLVM to inline a noreturn function not marked alwaysinline.

Are we not marking them noreturn?

@alexcrichton
Copy link
Member Author

I looked into adding #[cold], but oddly enough it was still inlined. We do appear to be adding noreturn, however.

The failure functions are generic, meaning they're candidates for getting
inlined across crates. This has been happening, leading to monstrosities like
that found in rust-lang#11549. I have verified that the codegen is *much* better now that
we're not inlining the failure path (the slow path).
bors added a commit that referenced this pull request Jan 15, 2014
The failure functions are generic, meaning they're candidates for getting
inlined across crates. This has been happening, leading to monstrosities like
that found in #11549. I have verified that the codegen is *much* better now that
we're not inlining the failure path (the slow path).
@bors bors closed this Jan 15, 2014
@bors bors merged commit 86c60b6 into rust-lang:master Jan 15, 2014
@alexcrichton alexcrichton deleted the noinline branch January 16, 2014 01:52
flip1995 pushed a commit to flip1995/rust that referenced this pull request Oct 21, 2023
…assocfn, r=dswij

`impl_trait_in_params` now supports impls and traits

Before this PR, the lint `impl_trait_in_params`. This PR gives the lint support for functions in impls and traits. (Also, some pretty heavy refactor)

fixes rust-lang#11548
changelog:[`impl_trait_in_params`] now supports `impl` blocks and functions in traits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants