From b7a3353061e965f901ba5cfac366263d6d528f35 Mon Sep 17 00:00:00 2001 From: Alina Sbirlea Date: Mon, 14 Oct 2019 23:52:39 +0000 Subject: [MemorySSA] Update for partial unswitch. Update MSSA for blocks cloned when doing partial unswitching. Enable additional testing with MSSA. Resolves PR43641. llvm-svn: 374850 --- llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp') 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}); } -- cgit v1.2.3