summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2019-10-08 11:54:42 +0000
committerFlorian Hahn <flo@fhahn.com>2019-10-08 11:54:42 +0000
commit537225a6a352f66f3b536b27359786dcca919a80 (patch)
tree107eac5c68692bd83ba3935988996e81bb2ed505 /llvm/lib
parent67f542aba72f552c4833bb253761dbcc54071016 (diff)
downloadbcm5719-llvm-537225a6a352f66f3b536b27359786dcca919a80.tar.gz
bcm5719-llvm-537225a6a352f66f3b536b27359786dcca919a80.zip
[LoopRotate] Unconditionally get DomTree.
LoopRotate is a loop pass and the DomTree should always be available. Similar to a70c5261436322a53187d67b8bdc0445d0463a9a llvm-svn: 374036
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopRotation.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopRotation.cpp b/llvm/lib/Transforms/Scalar/LoopRotation.cpp
index 3585b71748a..94517996df3 100644
--- a/llvm/lib/Transforms/Scalar/LoopRotation.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopRotation.cpp
@@ -94,8 +94,7 @@ public:
auto *LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
const auto *TTI = &getAnalysis<TargetTransformInfoWrapperPass>().getTTI(F);
auto *AC = &getAnalysis<AssumptionCacheTracker>().getAssumptionCache(F);
- auto *DTWP = getAnalysisIfAvailable<DominatorTreeWrapperPass>();
- auto *DT = DTWP ? &DTWP->getDomTree() : nullptr;
+ auto &DT = getAnalysis<DominatorTreeWrapperPass>().getDomTree();
auto &SE = getAnalysis<ScalarEvolutionWrapperPass>().getSE();
const SimplifyQuery SQ = getBestSimplifyQuery(*this, F);
Optional<MemorySSAUpdater> MSSAU;
@@ -103,7 +102,7 @@ public:
MemorySSA *MSSA = &getAnalysis<MemorySSAWrapperPass>().getMSSA();
MSSAU = MemorySSAUpdater(MSSA);
}
- return LoopRotation(L, LI, TTI, AC, DT, &SE,
+ return LoopRotation(L, LI, TTI, AC, &DT, &SE,
MSSAU.hasValue() ? MSSAU.getPointer() : nullptr, SQ,
false, MaxHeaderSize, false);
}
OpenPOWER on IntegriCloud