diff options
author | Tobias Grosser <tobias@grosser.es> | 2014-01-13 22:29:56 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2014-01-13 22:29:56 +0000 |
commit | 42aff30dbc698f33a0a6be143ea77810aa8abb65 (patch) | |
tree | 27bd9f14a25a6789587729bf858cde90659fc113 | |
parent | 0c306ba08c69480f2f196ea021e2f89aae1d35ef (diff) | |
download | bcm5719-llvm-42aff30dbc698f33a0a6be143ea77810aa8abb65.tar.gz bcm5719-llvm-42aff30dbc698f33a0a6be143ea77810aa8abb65.zip |
Adapt to DomTree changes in r199104
llvm-svn: 199157
-rw-r--r-- | polly/lib/Analysis/ScopDetection.cpp | 4 | ||||
-rw-r--r-- | polly/lib/Analysis/TempScopInfo.cpp | 6 | ||||
-rw-r--r-- | polly/lib/CodeGen/CodeGeneration.cpp | 10 | ||||
-rw-r--r-- | polly/lib/CodeGen/IslCodeGeneration.cpp | 8 | ||||
-rw-r--r-- | polly/lib/CodeGen/LoopGenerators.cpp | 4 | ||||
-rw-r--r-- | polly/lib/CodeGen/Utils.cpp | 3 | ||||
-rw-r--r-- | polly/lib/CodePreparation.cpp | 2 | ||||
-rw-r--r-- | polly/lib/IndVarSimplify.cpp | 6 | ||||
-rw-r--r-- | polly/lib/IndependentBlocks.cpp | 2 |
9 files changed, 23 insertions, 22 deletions
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp index 50b7f1b5948..4247e279749 100644 --- a/polly/lib/Analysis/ScopDetection.cpp +++ b/polly/lib/Analysis/ScopDetection.cpp @@ -751,7 +751,7 @@ void polly::ScopDetection::verifyAnalysis() const { } void ScopDetection::getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequired<DominatorTree>(); + AU.addRequired<DominatorTreeWrapperPass>(); AU.addRequired<PostDominatorTree>(); AU.addRequired<LoopInfo>(); AU.addRequired<ScalarEvolution>(); @@ -784,7 +784,7 @@ INITIALIZE_PASS_BEGIN(ScopDetection, "polly-detect", "Polly - Detect static control parts (SCoPs)", false, false); INITIALIZE_AG_DEPENDENCY(AliasAnalysis); -INITIALIZE_PASS_DEPENDENCY(DominatorTree); +INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass); INITIALIZE_PASS_DEPENDENCY(LoopInfo); INITIALIZE_PASS_DEPENDENCY(PostDominatorTree); INITIALIZE_PASS_DEPENDENCY(RegionInfo); diff --git a/polly/lib/Analysis/TempScopInfo.cpp b/polly/lib/Analysis/TempScopInfo.cpp index c8a8490e9fb..dafa3fc03e1 100644 --- a/polly/lib/Analysis/TempScopInfo.cpp +++ b/polly/lib/Analysis/TempScopInfo.cpp @@ -336,7 +336,7 @@ void TempScopInfo::print(raw_ostream &OS, const Module *) const { } bool TempScopInfo::runOnFunction(Function &F) { - DT = &getAnalysis<DominatorTree>(); + DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree(); PDT = &getAnalysis<PostDominatorTree>(); SE = &getAnalysis<ScalarEvolution>(); LI = &getAnalysis<LoopInfo>(); @@ -355,7 +355,7 @@ bool TempScopInfo::runOnFunction(Function &F) { void TempScopInfo::getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<DataLayout>(); - AU.addRequiredTransitive<DominatorTree>(); + AU.addRequiredTransitive<DominatorTreeWrapperPass>(); AU.addRequiredTransitive<PostDominatorTree>(); AU.addRequiredTransitive<LoopInfo>(); AU.addRequiredTransitive<ScalarEvolution>(); @@ -385,7 +385,7 @@ INITIALIZE_PASS_BEGIN(TempScopInfo, "polly-analyze-ir", "Polly - Analyse the LLVM-IR in the detected regions", false, false); INITIALIZE_AG_DEPENDENCY(AliasAnalysis); -INITIALIZE_PASS_DEPENDENCY(DominatorTree); +INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass); INITIALIZE_PASS_DEPENDENCY(LoopInfo); INITIALIZE_PASS_DEPENDENCY(PostDominatorTree); INITIALIZE_PASS_DEPENDENCY(RegionInfo); diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp index e398caf7262..75741d30785 100644 --- a/polly/lib/CodeGen/CodeGeneration.cpp +++ b/polly/lib/CodeGen/CodeGeneration.cpp @@ -619,7 +619,7 @@ void ClastStmtCodeGen::codegenForOpenMP(const clast_for *For) { ClastVars = ClastVarsCopy; clearDomtree((*LoopBody).getParent()->getParent(), - P->getAnalysis<DominatorTree>()); + P->getAnalysis<DominatorTreeWrapperPass>().getDomTree()); Builder.SetInsertPoint(AfterLoop); } @@ -907,7 +907,7 @@ void ClastStmtCodeGen::codegen(const clast_guard *g) { MergeBB->setName("polly.merge"); BasicBlock *ThenBB = BasicBlock::Create(Context, "polly.then", F); - DominatorTree &DT = P->getAnalysis<DominatorTree>(); + DominatorTree &DT = P->getAnalysis<DominatorTreeWrapperPass>().getDomTree(); DT.addNewBlock(ThenBB, CondBB); DT.changeImmediateDominator(MergeBB, CondBB); @@ -1028,7 +1028,7 @@ public: virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<CloogInfo>(); AU.addRequired<Dependences>(); - AU.addRequired<DominatorTree>(); + AU.addRequired<DominatorTreeWrapperPass>(); AU.addRequired<RegionInfo>(); AU.addRequired<ScalarEvolution>(); AU.addRequired<ScopDetection>(); @@ -1039,7 +1039,7 @@ public: AU.addPreserved<CloogInfo>(); AU.addPreserved<Dependences>(); AU.addPreserved<LoopInfo>(); - AU.addPreserved<DominatorTree>(); + AU.addPreserved<DominatorTreeWrapperPass>(); AU.addPreserved<ScopDetection>(); AU.addPreserved<ScalarEvolution>(); @@ -1061,7 +1061,7 @@ INITIALIZE_PASS_BEGIN(CodeGeneration, "polly-codegen", "Polly - Create LLVM-IR from SCoPs", false, false); INITIALIZE_PASS_DEPENDENCY(CloogInfo); INITIALIZE_PASS_DEPENDENCY(Dependences); -INITIALIZE_PASS_DEPENDENCY(DominatorTree); +INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass); INITIALIZE_PASS_DEPENDENCY(RegionInfo); INITIALIZE_PASS_DEPENDENCY(ScalarEvolution); INITIALIZE_PASS_DEPENDENCY(ScopDetection); diff --git a/polly/lib/CodeGen/IslCodeGeneration.cpp b/polly/lib/CodeGen/IslCodeGeneration.cpp index cde2a54b80f..e89384e207f 100644 --- a/polly/lib/CodeGen/IslCodeGeneration.cpp +++ b/polly/lib/CodeGen/IslCodeGeneration.cpp @@ -848,7 +848,7 @@ void IslNodeBuilder::createIf(__isl_take isl_ast_node *If) { BasicBlock *ThenBB = BasicBlock::Create(Context, "polly.then", F); BasicBlock *ElseBB = BasicBlock::Create(Context, "polly.else", F); - DominatorTree &DT = P->getAnalysis<DominatorTree>(); + DominatorTree &DT = P->getAnalysis<DominatorTreeWrapperPass>().getDomTree(); DT.addNewBlock(ThenBB, CondBB); DT.addNewBlock(ElseBB, CondBB); DT.changeImmediateDominator(MergeBB, CondBB); @@ -1052,7 +1052,7 @@ public: virtual void printScop(raw_ostream &OS) const {} virtual void getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequired<DominatorTree>(); + AU.addRequired<DominatorTreeWrapperPass>(); AU.addRequired<IslAstInfo>(); AU.addRequired<RegionInfo>(); AU.addRequired<ScalarEvolution>(); @@ -1063,7 +1063,7 @@ public: AU.addPreserved<Dependences>(); AU.addPreserved<LoopInfo>(); - AU.addPreserved<DominatorTree>(); + AU.addPreserved<DominatorTreeWrapperPass>(); AU.addPreserved<IslAstInfo>(); AU.addPreserved<ScopDetection>(); AU.addPreserved<ScalarEvolution>(); @@ -1085,7 +1085,7 @@ Pass *polly::createIslCodeGenerationPass() { return new IslCodeGeneration(); } INITIALIZE_PASS_BEGIN(IslCodeGeneration, "polly-codegen-isl", "Polly - Create LLVM-IR from SCoPs", false, false); INITIALIZE_PASS_DEPENDENCY(Dependences); -INITIALIZE_PASS_DEPENDENCY(DominatorTree); +INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass); INITIALIZE_PASS_DEPENDENCY(LoopInfo); INITIALIZE_PASS_DEPENDENCY(RegionInfo); INITIALIZE_PASS_DEPENDENCY(ScalarEvolution); diff --git a/polly/lib/CodeGen/LoopGenerators.cpp b/polly/lib/CodeGen/LoopGenerators.cpp index c7ab71a8be1..fcfd916c3e5 100644 --- a/polly/lib/CodeGen/LoopGenerators.cpp +++ b/polly/lib/CodeGen/LoopGenerators.cpp @@ -50,7 +50,7 @@ Value *polly::createLoop(Value *LB, Value *UB, Value *Stride, IRBuilder<> &Builder, Pass *P, BasicBlock *&ExitBB, ICmpInst::Predicate Predicate) { - DominatorTree &DT = P->getAnalysis<DominatorTree>(); + DominatorTree &DT = P->getAnalysis<DominatorTreeWrapperPass>().getDomTree(); LoopInfo &LI = P->getAnalysis<LoopInfo>(); Function *F = Builder.GetInsertBlock()->getParent(); LLVMContext &Context = F->getContext(); @@ -279,7 +279,7 @@ Value *OMPGenerator::createSubfunction(Value *Stride, Value *StructData, CheckNextBB = BasicBlock::Create(Context, "omp.checkNext", FN); LoadIVBoundsBB = BasicBlock::Create(Context, "omp.loadIVBounds", FN); - DominatorTree &DT = P->getAnalysis<DominatorTree>(); + DominatorTree &DT = P->getAnalysis<DominatorTreeWrapperPass>().getDomTree(); DT.addNewBlock(HeaderBB, PrevBB); DT.addNewBlock(ExitBB, HeaderBB); DT.addNewBlock(CheckNextBB, HeaderBB); diff --git a/polly/lib/CodeGen/Utils.cpp b/polly/lib/CodeGen/Utils.cpp index c4ace6c19e2..1e648655a1e 100644 --- a/polly/lib/CodeGen/Utils.cpp +++ b/polly/lib/CodeGen/Utils.cpp @@ -23,7 +23,8 @@ BasicBlock *polly::executeScopConditionally(Scop &S, Pass *PassInfo) { BasicBlock *StartBlock, *SplitBlock, *NewBlock; Region &R = S.getRegion(); IRBuilder<> Builder(R.getEntry()); - DominatorTree &DT = PassInfo->getAnalysis<DominatorTree>(); + DominatorTree &DT = + PassInfo->getAnalysis<DominatorTreeWrapperPass>().getDomTree(); RegionInfo &RI = PassInfo->getAnalysis<RegionInfo>(); // Split the entry edge of the region and generate a new basic block on this diff --git a/polly/lib/CodePreparation.cpp b/polly/lib/CodePreparation.cpp index c9278438487..b0032498a8e 100644 --- a/polly/lib/CodePreparation.cpp +++ b/polly/lib/CodePreparation.cpp @@ -151,7 +151,7 @@ void CodePreparation::getAnalysisUsage(AnalysisUsage &AU) const { AU.addPreserved<LoopInfo>(); AU.addPreserved<RegionInfo>(); - AU.addPreserved<DominatorTree>(); + AU.addPreserved<DominatorTreeWrapperPass>(); AU.addPreserved<DominanceFrontier>(); } diff --git a/polly/lib/IndVarSimplify.cpp b/polly/lib/IndVarSimplify.cpp index 1f43fafb30f..a7d96f434d8 100644 --- a/polly/lib/IndVarSimplify.cpp +++ b/polly/lib/IndVarSimplify.cpp @@ -84,7 +84,7 @@ public: virtual bool runOnLoop(Loop *L, LPPassManager &LPM); virtual void getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequired<DominatorTree>(); + AU.addRequired<DominatorTreeWrapperPass>(); AU.addRequired<LoopInfo>(); AU.addRequired<ScalarEvolution>(); AU.addRequiredID(LoopSimplifyID); @@ -1808,7 +1808,7 @@ bool PollyIndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) { IU = &getAnalysis<IVUsers>(); LI = &getAnalysis<LoopInfo>(); SE = &getAnalysis<ScalarEvolution>(); - DT = &getAnalysis<DominatorTree>(); + DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree(); TD = getAnalysisIfAvailable<DataLayout>(); DeadInsts.clear(); @@ -2003,7 +2003,7 @@ bool PollyIndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) { INITIALIZE_PASS_BEGIN(PollyIndVarSimplify, "polly-indvars", "Induction Variable Simplification (Polly version)", false, false); -INITIALIZE_PASS_DEPENDENCY(DominatorTree); +INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass); INITIALIZE_PASS_DEPENDENCY(LoopInfo); INITIALIZE_PASS_DEPENDENCY(ScalarEvolution); INITIALIZE_PASS_DEPENDENCY(LoopSimplify); diff --git a/polly/lib/IndependentBlocks.cpp b/polly/lib/IndependentBlocks.cpp index e7c520027ea..44455ddb50c 100644 --- a/polly/lib/IndependentBlocks.cpp +++ b/polly/lib/IndependentBlocks.cpp @@ -507,7 +507,7 @@ bool IndependentBlocks::areAllBlocksIndependent(const Region *R) const { void IndependentBlocks::getAnalysisUsage(AnalysisUsage &AU) const { // FIXME: If we set preserves cfg, the cfg only passes do not need to // be "addPreserved"? - AU.addPreserved<DominatorTree>(); + AU.addPreserved<DominatorTreeWrapperPass>(); AU.addPreserved<DominanceFrontier>(); AU.addPreserved<PostDominatorTree>(); AU.addRequired<RegionInfo>(); |