diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-08-02 17:42:12 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-08-02 17:42:12 +0000 |
| commit | 1c4688a8498fea1db507842ff8dedaacad8ef77b (patch) | |
| tree | e74f1bea0e682a4cd6d7edea69293ab7958eb9ae /contrib/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp | |
| parent | 68dc77c284115e8f103290474b3b9e35a3906c53 (diff) | |
| parent | b7eb8e35e481a74962664b63dfb09483b200209a (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp')
| -rw-r--r-- | contrib/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp b/contrib/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp index 34510cb40732..5834b619046b 100644 --- a/contrib/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp +++ b/contrib/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp @@ -459,9 +459,11 @@ static bool unswitchTrivialBranch(Loop &L, BranchInst &BI, DominatorTree &DT, *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 |
