<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_mir_dataflow/src/framework, branch 1.89.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.89.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.89.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-04-24T01:36:07+00:00</updated>
<entry>
<title>Separate `Analysis` and `Results`.</title>
<updated>2025-04-24T01:36:07+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-04-18T00:46:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=92799b6f89d2d9bbfcb9b11d1bac57899d0bc435'/>
<id>urn:sha1:92799b6f89d2d9bbfcb9b11d1bac57899d0bc435</id>
<content type='text'>
`Results` contains and `Analysis` and an `EntryStates`. The unfortunate
thing about this is that the analysis needs to be mutable everywhere
(`&amp;mut Analysis`) which forces the `Results` to be mutable everywhere,
even though `EntryStates` is immutable everywhere.

To fix this, this commit renames `Results` as `AnalysisAndResults`,
renames `EntryStates` as `Results`, and separates the analysis and
results as much as possible. (`AnalysisAndResults` doesn't get much use,
it's mostly there to facilitate method chaining of
`iterate_to_fixpoint`.)

`Results` is immutable everywhere, which:
- is a bit clearer on how the data is used,
- avoids an unnecessary clone of entry states in
  `locals_live_across_suspend_points`, and
- moves the results outside the `RefCell` in Formatter.

The commit also reformulates `ResultsHandle` as the generic `CowMut`,
which is simpler than `ResultsHandle` because it doesn't need the
`'tcx` lifetime and the trait bounds. It also which sits nicely
alongside the new use of `Cow` in `ResultsCursor`.
</content>
</entry>
<entry>
<title>Pass `Analysis` to `visit_*` instead of `Results`.</title>
<updated>2025-04-24T01:34:06+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-04-03T06:37:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4ff55588d33366d0572c1865b43dec8ac00237b1'/>
<id>urn:sha1:4ff55588d33366d0572c1865b43dec8ac00237b1</id>
<content type='text'>
Every `Results` contains an `Analysis`, but these methods only need the
`Analysis`. No point passing them more data than they need.
</content>
</entry>
<entry>
<title>Remove unnecessary lifetime on `ResultsVisitor`.</title>
<updated>2025-04-22T00:08:05+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-04-22T00:08:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=521b379705bcdd9ea41e8bce56bfd16ba1b90703'/>
<id>urn:sha1:521b379705bcdd9ea41e8bce56bfd16ba1b90703</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove unused `ResultsCursor` methods.</title>
<updated>2025-04-21T23:46:24+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-04-21T00:25:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3bd1e1484f23e6062feaa6106ce73e459d892812'/>
<id>urn:sha1:3bd1e1484f23e6062feaa6106ce73e459d892812</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move `StateDiffCollector`'s use point.</title>
<updated>2025-04-21T23:45:44+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-04-21T00:23:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=55a80cc132ae68ef624b28b3b3e2cdd4b3585b24'/>
<id>urn:sha1:55a80cc132ae68ef624b28b3b3e2cdd4b3585b24</id>
<content type='text'>
Currently the graphviz code does a `results.visit_with` call while also
holding a `ResultsCursor` on the `results`. That is both kinds of
results traversals at the same time, which is awkward. This commit moves
the `results.visit_with` part earlier so the two results traversals
don't overlap.
</content>
</entry>
<entry>
<title>Store `Results` in Formatter.</title>
<updated>2025-04-21T00:32:19+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-04-21T00:05:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=85f6025f45eb59ff99ac480906545f3cfbe68e7f'/>
<id>urn:sha1:85f6025f45eb59ff99ac480906545f3cfbe68e7f</id>
<content type='text'>
Instead of `ResultsCursor`.

This partly undoes the second commit from #132346; possible because
`Results::as_result_cursor` (which doesn't consume the `Results`) is now
available. Delaying the `ResultsCursor` construction will facilitate the
next couple of commits.
</content>
</entry>
<entry>
<title>Avoid an `unwrap` in `RustcMirAttrs::set_field`.</title>
<updated>2025-04-16T23:51:32+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-04-15T23:19:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=846c10fecfdbda6e43073af226486ff7ec3f873d'/>
<id>urn:sha1:846c10fecfdbda6e43073af226486ff7ec3f873d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Replace infallible `name_or_empty` methods with fallible `name` methods.</title>
<updated>2025-04-16T23:50:52+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-04-10T04:33:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2fef0a30ae6b2687dfb286cb544d2a542f7e2335'/>
<id>urn:sha1:2fef0a30ae6b2687dfb286cb544d2a542f7e2335</id>
<content type='text'>
I'm removing empty identifiers everywhere, because in practice they
always mean "no identifier" rather than "empty identifier". (An empty
identifier is impossible.) It's better to use `Option` to mean "no
identifier" because you then can't forget about the "no identifier"
possibility.

Some specifics:
- When testing an attribute for a single name, the commit uses the
  `has_name` method.
- When testing an attribute for multiple names, the commit uses the new
  `has_any_name` method.
- When using `match` on an attribute, the match arms now have `Some` on
  them.

In the tests, we now avoid printing empty identifiers by not printing
the identifier in the `error:` line at all, instead letting the carets
point out the problem.
</content>
</entry>
<entry>
<title>Remove support for `#[rustc_mir(borrowck_graphviz_format="gen_kill")]`.</title>
<updated>2025-04-15T22:35:34+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-04-15T22:35:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=766cd3a58320f2ec9e30573f39e377513f1a4443'/>
<id>urn:sha1:766cd3a58320f2ec9e30573f39e377513f1a4443</id>
<content type='text'>
Because it's equivalent to `#[rustc_mir(borrowck_graphviz_format)]`. It
used to be distinct, but the distinction was removed in
https://github.com/rust-lang/rust/pull/76044/commits/3233fb18a891363a2da36ce69ca16fbb219c96be.
</content>
</entry>
<entry>
<title>Remove `SwitchIntTarget`.</title>
<updated>2025-02-16T22:51:37+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-02-14T02:23:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3b81d9d42d07d3e2c4f9f0c714fb16d2527758fe'/>
<id>urn:sha1:3b81d9d42d07d3e2c4f9f0c714fb16d2527758fe</id>
<content type='text'>
It's only passed to `Analysis::apply_switch_int_edge_effect`, and the
existing impls of that method only use the `value` field. So pass that
instead.
</content>
</entry>
</feed>
