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 -Zcross-crate-inline-threshold=yes #117650
Conversation
r? @davidtwco (rustbot has picked a reviewer for you, use r? to override) |
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes sense, and it's a change to a nightly flag so I don't think it needs any team sign-off.
Are there any tests for |
No, and there ought to be. I'll add that. |
I don't really understand why this would be a useful option, but the option name/value combination doesn't make sense to me. This looks to me like it enables the cross crate inline threshold, not that it sets it to infinity. Should this be s/yes/always? |
The point is to compare with a build where enabling LTO produces a significant perf improvement. If this flag produces a similar improvement, then it is possible to get that improvement by applying
Well currently, it isn't the same as setting the threshold to infinity, because no matter what numeric value you pass, non-leaf functions will never be made cross-crate-inlinable. Cross-crate-inlining does not have a proper cost model yet because so far all my attempts to develop one have resulted in significant regressions in incremental build times. |
62afdf4
to
fcdd99e
Compare
@bors r+ |
…twco Add -Zcross-crate-inline-threshold=yes `@thomcc` says this would be useful for > seeing if it makes a difference in some code if i do it when building the sysroot, since -Zbuild-std + lto helps more than it seems like it should And I've changed the possible values as a reference to `@Manishearth` saying > LLVM's inlining heuristic is "yes".
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#114316 (Add AIX platform support document) - rust-lang#117531 (rustdoc: properly elide cross-crate host effect args) - rust-lang#117650 (Add -Zcross-crate-inline-threshold=yes) - rust-lang#117663 (bump some deps) - rust-lang#117667 (Document clippy_config in nightly-rustc docs) - rust-lang#117698 (Clarify `space_between`) - rust-lang#117700 (coverage: Rename the `run-coverage` test mode to `coverage-run`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#117650 - saethlin:inline-me-please, r=davidtwco Add -Zcross-crate-inline-threshold=yes ``@thomcc`` says this would be useful for > seeing if it makes a difference in some code if i do it when building the sysroot, since -Zbuild-std + lto helps more than it seems like it should And I've changed the possible values as a reference to ``@Manishearth`` saying > LLVM's inlining heuristic is "yes".
@thomcc says this would be useful for
And I've changed the possible values as a reference to @Manishearth saying