-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
inliner: use caller param_env #77568
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Oct 5, 2020
📌 Commit daf48b8 has been approved by |
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
Oct 5, 2020
lcnr
commented
Oct 6, 2020
@@ -300,9 +301,6 @@ impl Inliner<'tcx> { | |||
debug!(" final inline threshold = {}", threshold); | |||
|
|||
// FIXME: Give a bonus to functions with only a single caller | |||
|
|||
let param_env = tcx.param_env(callee_body.source.def_id()); |
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.
note: this was wrong even if it used the caller source as we have to use a ParamEnv
with RevealAll
. This caused an ICE in #77306
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Oct 6, 2020
Rollup of 11 pull requests Successful merges: - rust-lang#76784 (Add some docs to rustdoc::clean::inline and def_id functions) - rust-lang#76911 (fix VecDeque::iter_mut aliasing issues) - rust-lang#77400 (Fix suggestions for x.py setup) - rust-lang#77515 (Update to chalk 0.31) - rust-lang#77568 (inliner: use caller param_env) - rust-lang#77571 (Use matches! for core::char methods) - rust-lang#77582 (Move `EarlyOtherwiseBranch` to mir-opt-level 2) - rust-lang#77590 (Update RLS and Rustfmt) - rust-lang#77605 (Fix rustc_def_path to show the full path and not the trimmed one) - rust-lang#77614 (Let backends access span information) - rust-lang#77624 (Add c as a shorthand check alternative for new options rust-lang#77603) Failed merges: r? `@ghost`
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
Oct 10, 2020
require `Reveal::All` in `normalize_erasing_regions` would have caught a bug in mir inlining, see rust-lang#77568 (comment)
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We used the callee param env instead of the caller param env by accident in #77430, this PR fixes that and caches it in the
Inliner
struct.fixes #77564
r? @ecstatic-morse