about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-12-06 17:36:08 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-12-16 09:36:09 +1100
commit5f40942f9c462576b4b7976e0a4c855ee350a9f9 (patch)
tree46e3e26af4a6469353623640de7a8e52652b3120
parent83f3d204cf396502a15b3edf50b561b47c9f0884 (diff)
downloadrust-5f40942f9c462576b4b7976e0a4c855ee350a9f9.tar.gz
rust-5f40942f9c462576b4b7976e0a4c855ee350a9f9.zip
Remove a `FIXME` comment.
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.
-rw-r--r--compiler/rustc_mir_dataflow/src/framework/direction.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/compiler/rustc_mir_dataflow/src/framework/direction.rs b/compiler/rustc_mir_dataflow/src/framework/direction.rs
index f51d2a3da3a..6427fd0fd29 100644
--- a/compiler/rustc_mir_dataflow/src/framework/direction.rs
+++ b/compiler/rustc_mir_dataflow/src/framework/direction.rs
@@ -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 =>
                 {