Skip to content

Commit

Permalink
Remove a FIXME comment.
Browse files Browse the repository at this point in the history
It is possible to avoid the clone as suggested in the comment. It would
require introducing an enum with two variants
`CloneBeforeModifying(&Domain)` and `Modifiable(&mut Domain)`. But it's
not worth the effort, because this code path just isn't very hot. E.g.
when compiling a large benchmark like `cargo-0.60.0` it's only hit a few
thousand times.
  • Loading branch information
nnethercote committed Dec 15, 2024
1 parent 83f3d20 commit 5f40942
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions compiler/rustc_mir_dataflow/src/framework/direction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ impl Direction for Backward {
for pred in body.basic_blocks.predecessors()[block].iter().copied() {
match body[pred].terminator().kind {
// Apply terminator-specific edge effects.
//
// FIXME(ecstaticmorse): Avoid cloning the exit state unconditionally.
mir::TerminatorKind::Call { destination, target: Some(dest), .. }
if dest == block =>
{
Expand Down

0 comments on commit 5f40942

Please sign in to comment.