[MemorySSA] Make the use of moveAllAfterMergeBlocks consistent.
authorAlina Sbirlea <asbirlea@google.com>
Wed, 9 Oct 2019 15:54:24 +0000 (15:54 +0000)
committerAlina Sbirlea <asbirlea@google.com>
Wed, 9 Oct 2019 15:54:24 +0000 (15:54 +0000)
commit7faa14a98bdc668822e99758f81a662f186ad35b
treed3a57344f753ab652cc4ed0a60fd12fbba0f80c6
parent77c9736ef3e0c95e1dbe5c85ad3c1061ce072b50
[MemorySSA] Make the use of moveAllAfterMergeBlocks consistent.

Summary:
The rule for the moveAllAfterMergeBlocks API si for all instructions
from `From` to have been moved to `To`, while keeping the CFG edges (and
block terminators) unchanged.
Update all the callsites for moveAllAfterMergeBlocks to follow this.

Pending follow-up: since the same behavior is needed everytime, merge
all callsites into one. The common denominator may be the call to
`MergeBlockIntoPredecessor`.

Resolves PR43569.

Reviewers: george.burgess.iv

Subscribers: Prazek, sanjoy.google, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68659

llvm-svn: 374177
llvm/lib/Analysis/MemorySSAUpdater.cpp
llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
llvm/test/Analysis/MemorySSA/pr43569.ll [new file with mode: 0644]