diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LICM.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LICM.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp index b66b830ca7c..eb7a64d765e 100644 --- a/llvm/lib/Transforms/Scalar/LICM.cpp +++ b/llvm/lib/Transforms/Scalar/LICM.cpp @@ -63,6 +63,7 @@ namespace { private: LoopInfo *LI; // Current LoopInfo AliasAnalysis *AA; // Current AliasAnalysis information + DominanceFrontier *DF; // Current Dominance Frontier bool Changed; // Set to true when we change anything. BasicBlock *Preheader; // The preheader block of the current loop... Loop *CurLoop; // The current loop we are working on... @@ -173,6 +174,7 @@ bool LICM::runOnFunction(Function &) { // Get our Loop and Alias Analysis information... LI = &getAnalysis<LoopInfo>(); AA = &getAnalysis<AliasAnalysis>(); + DF = &getAnalysis<DominanceFrontier>(); DT = &getAnalysis<DominatorTree>(); // Hoist expressions out of all of the top-level loops. @@ -405,8 +407,7 @@ void LICM::PromoteValuesInLoop() { PromotedAllocas.reserve(PromotedValues.size()); for (unsigned i = 0, e = PromotedValues.size(); i != e; ++i) PromotedAllocas.push_back(PromotedValues[i].first); - PromoteMemToReg(PromotedAllocas, getAnalysis<DominanceFrontier>(), - AA->getTargetData()); + PromoteMemToReg(PromotedAllocas, *DT, *DF, AA->getTargetData()); } /// findPromotableValuesInLoop - Check the current loop for stores to definite |