-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Move Derefer before Retag #96549
Move Derefer before Retag #96549
Conversation
This comment has been minimized.
This comment has been minimized.
some style nits and CI is unhappy with the |
@bors r+ |
📌 Commit d9ddb64 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (6eda764): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
@@ -57,6 +57,17 @@ fn may_be_reference(ty: Ty<'_>) -> bool { | |||
} | |||
} | |||
|
|||
/// Determines whether or not this LocalDecl is temp, if not it needs retagging. | |||
fn is_not_temp<'tcx>(local_decl: &LocalDecl<'tcx>) -> bool { |
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.
is_temp
would be slightly clearer I think; return false
inside this function is a double negation which is somewhat confusing.
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.
You are right, I will change this function in the next update of derefer.
@@ -1079,6 +1079,8 @@ pub enum LocalInfo<'tcx> { | |||
/// A temporary created during the creation of an aggregate | |||
/// (e.g. a temporary for `foo` in `MyStruct { my_field: foo }`) | |||
AggregateTemp, | |||
/// A temporary created during the pass `Derefer` to avoid it's retagging |
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.
(should be "its retagging"... not a big deal though)
…idtwco Add validation layer for Derefer _Follow up work to rust-lang#96549 rust-lang#96116 rust-lang#95857 #95649_ This adds validation for Derefer making sure it is always the first projection. r? rust-lang/mir-opt
…twco Add validation layer for Derefer _Follow up work to rust-lang#96549 rust-lang#96116 rust-lang#95857 #95649_ This adds validation for Derefer making sure it is always the first projection. r? rust-lang/mir-opt
Pull Derefer before ElaborateDrops _Follow up work to rust-lang#97025 rust-lang#96549 rust-lang#96116 rust-lang#95887 #95649_ This moves `Derefer` before `ElaborateDrops` and creates a new `Rvalue` called `VirtualRef` that allows us to bypass many constraints for `DerefTemp`. r? `@oli-obk`
Pull Derefer before ElaborateDrops _Follow up work to rust-lang#97025 rust-lang#96549 rust-lang#96116 rust-lang#95887 #95649_ This moves `Derefer` before `ElaborateDrops` and creates a new `Rvalue` called `VirtualRef` that allows us to bypass many constraints for `DerefTemp`. r? ``@oli-obk``
Pull Derefer before ElaborateDrops _Follow up work to rust-lang#97025 rust-lang#96549 rust-lang#96116 rust-lang#95887 #95649_ This moves `Derefer` before `ElaborateDrops` and creates a new `Rvalue` called `VirtualRef` that allows us to bypass many constraints for `DerefTemp`. r? `@oli-obk`
Pull Derefer before ElaborateDrops _Follow up work to rust-lang#97025 rust-lang#96549 rust-lang#96116 rust-lang#95887 #95649_ This moves `Derefer` before `ElaborateDrops` and creates a new `Rvalue` called `VirtualRef` that allows us to bypass many constraints for `DerefTemp`. r? `@oli-obk`
Pull Derefer before ElaborateDrops _Follow up work to rust-lang#97025 rust-lang#96549 rust-lang#96116 rust-lang#95887 #95649_ This moves `Derefer` before `ElaborateDrops` and creates a new `Rvalue` called `VirtualRef` that allows us to bypass many constraints for `DerefTemp`. r? `@oli-obk`
Follow up work to #96116 #95857 #95649
This moves
Derefer
beforeRetag
and creates a newLocalInfo
calledTemp
to avoid retagging created temp values.Zulip discussion link
r? @oli-obk