File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,10 @@ struct DefsUses {
54
54
}
55
55
56
56
impl DefsUses {
57
+ fn apply ( & self , bits : & mut LocalSet ) -> bool {
58
+ bits. subtract ( & self . defs ) | bits. union ( & self . uses )
59
+ }
60
+
57
61
fn add_def ( & mut self , index : Local ) {
58
62
// If it was used already in the block, remove that use
59
63
// now that we found a definition.
@@ -194,8 +198,9 @@ pub fn liveness_of_locals<'tcx>(mir: &Mir<'tcx>) -> LivenessResult {
194
198
195
199
// in = use ∪ (out - def)
196
200
ins[ b] . clone_from ( & outs[ b] ) ;
197
- ins[ b] . subtract ( & def_use[ b] . defs ) ;
198
- ins[ b] . union ( & def_use[ b] . uses ) ;
201
+
202
+ // FIXME use the return value to detect if we have changed things
203
+ def_use[ b] . apply ( & mut ins[ b] ) ;
199
204
}
200
205
201
206
if ins_ == ins && outs_ == outs {
You can’t perform that action at this time.
0 commit comments