summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorAlina Sbirlea <asbirlea@google.com>2019-10-14 23:52:39 +0000
committerAlina Sbirlea <asbirlea@google.com>2019-10-14 23:52:39 +0000
commitb7a3353061e965f901ba5cfac366263d6d528f35 (patch)
tree418fbf375caa1858fdf8cb93a0c45a4d2396f0e2 /llvm/lib/Transforms
parent9586d85ab3badcf8ca2292ca6019caea4e6513c4 (diff)
downloadbcm5719-llvm-b7a3353061e965f901ba5cfac366263d6d528f35.tar.gz
bcm5719-llvm-b7a3353061e965f901ba5cfac366263d6d528f35.zip
[MemorySSA] Update for partial unswitch.
Update MSSA for blocks cloned when doing partial unswitching. Enable additional testing with MSSA. Resolves PR43641. llvm-svn: 374850
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
index 4e7abfc5bda..fa9dbe240ba 100644
--- a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
+++ b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
@@ -2140,6 +2140,13 @@ static void unswitchNontrivialInvariants(
// the branch in the split block.
buildPartialUnswitchConditionalBranch(*SplitBB, Invariants, Direction,
*ClonedPH, *LoopPH);
+ if (MSSAU) {
+ // Perform MSSA cloning updates.
+ for (auto &VMap : VMaps)
+ MSSAU->updateForClonedLoop(LBRPO, ExitBlocks, *VMap,
+ /*IgnoreIncomingWithNoClones=*/true);
+ MSSAU->updateExitBlocksForClonedLoop(ExitBlocks, VMaps, DT);
+ }
DTUpdates.push_back({DominatorTree::Insert, SplitBB, ClonedPH});
}
OpenPOWER on IntegriCloud