about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-06-08 00:26:37 +0000
committerbors <bors@rust-lang.org>2022-06-08 00:26:37 +0000
commit47aee31b2a89cb7de97d779869a30b046632b6af (patch)
tree465b27c8fd03e46261efc3f0cda426e23b2f7810 /compiler/rustc_mir_transform/src
parentb17e9d76f2ad15022e0e69bc33745c4ef9025a8f (diff)
parentc2d84852e5a5e6869acbeaab8a4794e792ad9334 (diff)
downloadrust-47aee31b2a89cb7de97d779869a30b046632b6af.tar.gz
rust-47aee31b2a89cb7de97d779869a30b046632b6af.zip
Auto merge of #97849 - matthiaskrgr:rollup-1yodhvw, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #97829 (Add regresion test for #95307)
 - #97831 (Remove `AlwaysLiveLocals` wrapper struct)
 - #97832 (Change `Direction::{is_forward,is_backward}` functions into constants)
 - #97840 (RustWrapper: adapt to APInt API changes in LLVM 15)
 - #97845 (Use more targeted suggestion when confusing i8 with std::i8)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_transform/src')
-rw-r--r--compiler/rustc_mir_transform/src/generator.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_mir_transform/src/generator.rs b/compiler/rustc_mir_transform/src/generator.rs
index 9eb77f60213..89895fddd0c 100644
--- a/compiler/rustc_mir_transform/src/generator.rs
+++ b/compiler/rustc_mir_transform/src/generator.rs
@@ -228,7 +228,7 @@ struct TransformVisitor<'tcx> {
     suspension_points: Vec<SuspensionPoint<'tcx>>,
 
     // The set of locals that have no `StorageLive`/`StorageDead` annotations.
-    always_live_locals: storage::AlwaysLiveLocals,
+    always_live_locals: BitSet<Local>,
 
     // The original RETURN_PLACE local
     new_ret_local: Local,
@@ -450,7 +450,7 @@ struct LivenessInfo {
 fn locals_live_across_suspend_points<'tcx>(
     tcx: TyCtxt<'tcx>,
     body: &Body<'tcx>,
-    always_live_locals: &storage::AlwaysLiveLocals,
+    always_live_locals: &BitSet<Local>,
     movable: bool,
 ) -> LivenessInfo {
     let body_ref: &Body<'_> = &body;
@@ -615,7 +615,7 @@ impl ops::Deref for GeneratorSavedLocals {
 fn compute_storage_conflicts<'mir, 'tcx>(
     body: &'mir Body<'tcx>,
     saved_locals: &GeneratorSavedLocals,
-    always_live_locals: storage::AlwaysLiveLocals,
+    always_live_locals: BitSet<Local>,
     requires_storage: rustc_mir_dataflow::Results<'tcx, MaybeRequiresStorage<'mir, 'tcx>>,
 ) -> BitMatrix<GeneratorSavedLocal, GeneratorSavedLocal> {
     assert_eq!(body.local_decls.len(), saved_locals.domain_size());
@@ -625,7 +625,7 @@ fn compute_storage_conflicts<'mir, 'tcx>(
 
     // Locals that are always live or ones that need to be stored across
     // suspension points are not eligible for overlap.
-    let mut ineligible_locals = always_live_locals.into_inner();
+    let mut ineligible_locals = always_live_locals;
     ineligible_locals.intersect(&**saved_locals);
 
     // Compute the storage conflicts for all eligible locals.
@@ -1300,7 +1300,7 @@ impl<'tcx> MirPass<'tcx> for StateTransform {
             },
         );
 
-        let always_live_locals = storage::AlwaysLiveLocals::new(&body);
+        let always_live_locals = storage::always_live_locals(&body);
 
         let liveness_info =
             locals_live_across_suspend_points(tcx, body, &always_live_locals, movable);