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:
Guillaume Gomez 2025-05-07 18:19:04 +02:00 committed by GitHub
commit 5514fe9ef6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -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.