aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Scalar/LoopFuse.cpp
diff options
context:
space:
mode:
authorWhitney Tsang <whitneyt@ca.ibm.com>2020-01-28 03:50:33 +0000
committerWhitney Tsang <whitneyt@ca.ibm.com>2020-01-28 14:18:00 +0000
commit78dc64989c2f5c075ca74af9dac0c1cb4a2b1f4b (patch)
treeb9d05d00206ba03845c3b63ac0e7ca9b17324f85 /llvm/lib/Transforms/Scalar/LoopFuse.cpp
parentbb73210ba9f16c1516f564235c86cbddccd1bd6d (diff)
downloadllvm-78dc64989c2f5c075ca74af9dac0c1cb4a2b1f4b.zip
llvm-78dc64989c2f5c075ca74af9dac0c1cb4a2b1f4b.tar.gz
llvm-78dc64989c2f5c075ca74af9dac0c1cb4a2b1f4b.tar.bz2
[CodeMoverUtils] Improve IsControlFlowEquivalent.
Summary: Currently IsControlFlowEquivalent determine if two blocks are control flow equivalent by checking if A dominates B and B post dominates A. There exists blocks that are control flow equivalent even if they don't satisfy the A dominates B and B post dominates A condition. For example, if (cond) A if (cond) B In the PR, we determine if two blocks are control flow equivalent by also checking if the two sets of conditions A and B depends on are equivalent. Reviewer: jdoerfert, Meinersbur, dmgreen, etiotto, bmahjour, fhahn, hfinkel, kbarton Reviewed By: fhahn Subscribers: hiraditya, llvm-commits Tag: LLVM Differential Revision: https://reviews.llvm.org/D71578
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopFuse.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopFuse.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopFuse.cpp b/llvm/lib/Transforms/Scalar/LoopFuse.cpp
index e1738f0..430d4bc 100644
--- a/llvm/lib/Transforms/Scalar/LoopFuse.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopFuse.cpp
@@ -1123,7 +1123,7 @@ private:
/// Move instructions from FC0.Latch to FC1.Latch. If FC0.Latch has an unique
/// successor, then merge FC0.Latch with its unique successor.
void mergeLatch(const FusionCandidate &FC0, const FusionCandidate &FC1) {
- moveInstsBottomUp(*FC0.Latch, *FC1.Latch, DT, PDT, DI);
+ moveInstructionsToTheBeginning(*FC0.Latch, *FC1.Latch, DT, PDT, DI);
if (BasicBlock *Succ = FC0.Latch->getUniqueSuccessor()) {
MergeBlockIntoPredecessor(Succ, &DTU, &LI);
DTU.flush();