[PATCH] D49925: [SimpleLoopUnswitch] Fix DT updates for trivial branch unswitching.
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 27 17:01:27 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL338180: [SimpleLoopUnswitch] Fix DT updates for trivial branch unswitching. (authored by asbirlea, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D49925
Files:
llvm/trunk/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
Index: llvm/trunk/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
+++ llvm/trunk/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
@@ -459,9 +459,11 @@
*ParentBB, *OldPH, FullUnswitch);
// Now we need to update the dominator tree.
- DT.insertEdge(OldPH, UnswitchedBB);
+ SmallVector<DominatorTree::UpdateType, 2> DTUpdates;
+ DTUpdates.push_back({DT.Insert, OldPH, UnswitchedBB});
if (FullUnswitch)
- DT.deleteEdge(ParentBB, UnswitchedBB);
+ DTUpdates.push_back({DT.Delete, ParentBB, LoopExitBB});
+ DT.applyUpdates(DTUpdates);
// The constant we can replace all of our invariants with inside the loop
// body. If any of the invariants have a value other than this the loop won't
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49925.157808.patch
Type: text/x-patch
Size: 873 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180728/d1043b4e/attachment.bin>
More information about the llvm-commits
mailing list