diff --git a/llvm/lib/Analysis/MemorySSAUpdater.cpp b/llvm/lib/Analysis/MemorySSAUpdater.cpp --- a/llvm/lib/Analysis/MemorySSAUpdater.cpp +++ b/llvm/lib/Analysis/MemorySSAUpdater.cpp @@ -792,20 +792,8 @@ DeleteUpdates.push_back({DT.Delete, Update.getFrom(), Update.getTo()}); } - if (!DeleteUpdates.empty()) { - // Update for inserted edges: use newDT and snapshot CFG as if deletes had - // not occurred. - // FIXME: This creates a new DT, so it's more expensive to do mix - // delete/inserts vs just inserts. We can do an incremental update on the DT - // to revert deletes, than re-delete the edges. Teaching DT to do this, is - // part of a pending cleanup. - DominatorTree NewDT(DT, DeleteUpdates); - GraphDiff GD(DeleteUpdates, /*ReverseApplyUpdates=*/true); - applyInsertUpdates(InsertUpdates, NewDT, &GD); - } else { - GraphDiff GD; - applyInsertUpdates(InsertUpdates, DT, &GD); - } + GraphDiff GD(DeleteUpdates, /*ReverseApplyUpdates=*/true); + applyInsertUpdates(InsertUpdates, DT, &GD); // Update for deleted edges for (auto &Update : DeleteUpdates)