diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/LICM.cpp | 7 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp | 6 |
2 files changed, 5 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp index c9ade92804a..3b71497dcb1 100644 --- a/llvm/lib/Transforms/Scalar/LICM.cpp +++ b/llvm/lib/Transforms/Scalar/LICM.cpp @@ -73,7 +73,6 @@ namespace { AU.addRequiredID(LoopSimplifyID); AU.addRequired<LoopInfo>(); AU.addRequired<ETForest>(); - AU.addRequired<DominatorTree>(); // For scalar promotion (mem2reg) AU.addRequired<DominanceFrontier>(); // For scalar promotion (mem2reg) AU.addRequired<AliasAnalysis>(); } @@ -88,7 +87,6 @@ namespace { AliasAnalysis *AA; // Current AliasAnalysis information LoopInfo *LI; // Current LoopInfo ETForest *ET; // ETForest for the current Loop... - DominatorTree *DT; // Dominator Tree for the current Loop... DominanceFrontier *DF; // Current Dominance Frontier // State that is updated as we process loops @@ -215,7 +213,6 @@ bool LICM::runOnLoop(Loop *L, LPPassManager &LPM) { AA = &getAnalysis<AliasAnalysis>(); DF = &getAnalysis<DominanceFrontier>(); ET = &getAnalysis<ETForest>(); - DT = &getAnalysis<DominatorTree>(); CurAST = new AliasSetTracker(*AA); // Collect Alias info frmo subloops @@ -554,7 +551,7 @@ void LICM::sink(Instruction &I) { if (AI) { std::vector<AllocaInst*> Allocas; Allocas.push_back(AI); - PromoteMemToReg(Allocas, *DT, *DF, AA->getTargetData(), CurAST); + PromoteMemToReg(Allocas, *ET, *DF, AA->getTargetData(), CurAST); } } } @@ -735,7 +732,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, *DT, *DF, AA->getTargetData(), CurAST); + PromoteMemToReg(PromotedAllocas, *ET, *DF, AA->getTargetData(), CurAST); } /// FindPromotableValuesInLoop - Check the current loop for stores to definite diff --git a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp index 5bbb5aef03f..6e9dc035c22 100644 --- a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -53,7 +53,7 @@ namespace { // getAnalysisUsage - This pass does not require any passes, but we know it // will not alter the CFG, so say so. virtual void getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequired<DominatorTree>(); + AU.addRequired<ETForest>(); AU.addRequired<DominanceFrontier>(); AU.addRequired<TargetData>(); AU.setPreservesCFG(); @@ -100,7 +100,7 @@ bool SROA::runOnFunction(Function &F) { bool SROA::performPromotion(Function &F) { std::vector<AllocaInst*> Allocas; const TargetData &TD = getAnalysis<TargetData>(); - DominatorTree &DT = getAnalysis<DominatorTree>(); + ETForest &ET = getAnalysis<ETForest>(); DominanceFrontier &DF = getAnalysis<DominanceFrontier>(); BasicBlock &BB = F.getEntryBlock(); // Get the entry node for the function @@ -119,7 +119,7 @@ bool SROA::performPromotion(Function &F) { if (Allocas.empty()) break; - PromoteMemToReg(Allocas, DT, DF, TD); + PromoteMemToReg(Allocas, ET, DF, TD); NumPromoted += Allocas.size(); Changed = true; } |

