Rollup merge of #140234 - nnethercote:separate-Analysis-and-Results, r=davidtwco
Separate dataflow analysis and results `Analysis` gets put into `Results` with `EntryStates`, by `iterate_to_fixpoint`. This has two problems: - `Results` is passed various places where only `Analysis` is needed. - `EntryStates` is passed around mutably everywhere even though it is immutable. This commit mostly separates `Analysis` from `Results` and fixes these two problems. r? `@davidtwco`
This commit is contained in:
commit
5514fe9ef6
|
|
@ -148,8 +148,7 @@ whereas this code uses [`ResultsCursor`]:
|
||||||
|
|
||||||
```rust,ignore
|
```rust,ignore
|
||||||
let mut results = MyAnalysis::new()
|
let mut results = MyAnalysis::new()
|
||||||
.into_engine(tcx, body, def_id)
|
.iterate_to_fixpoint(tcx, body, None);
|
||||||
.iterate_to_fixpoint()
|
|
||||||
.into_results_cursor(body);
|
.into_results_cursor(body);
|
||||||
|
|
||||||
// Inspect the fixpoint state immediately before each `Drop` terminator.
|
// Inspect the fixpoint state immediately before each `Drop` terminator.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue