diff options
-rwxr-xr-x | polly/include/polly/TempScopInfo.h | 2 | ||||
-rw-r--r-- | polly/lib/Analysis/TempScopInfo.cpp | 6 | ||||
-rw-r--r-- | polly/lib/CodeGen/CodeGeneration.cpp | 7 | ||||
-rw-r--r-- | polly/lib/CodeGen/LoopGenerators.cpp | 3 | ||||
-rw-r--r-- | polly/lib/IndVarSimplify.cpp | 5 |
5 files changed, 13 insertions, 10 deletions
diff --git a/polly/include/polly/TempScopInfo.h b/polly/include/polly/TempScopInfo.h index 1f7364b71b0..9120b718d81 100755 --- a/polly/include/polly/TempScopInfo.h +++ b/polly/include/polly/TempScopInfo.h @@ -235,7 +235,7 @@ class TempScopInfo : public FunctionPass { PostDominatorTree *PDT; // Target data for element size computing. - DataLayout *TD; + const DataLayout *TD; // Remember the bounds of loops, to help us build iteration domain of BBs. LoopBoundMapType LoopBounds; diff --git a/polly/lib/Analysis/TempScopInfo.cpp b/polly/lib/Analysis/TempScopInfo.cpp index 53c5a719770..ef7ceb673b3 100644 --- a/polly/lib/Analysis/TempScopInfo.cpp +++ b/polly/lib/Analysis/TempScopInfo.cpp @@ -337,7 +337,7 @@ bool TempScopInfo::runOnFunction(Function &F) { LI = &getAnalysis<LoopInfo>(); SD = &getAnalysis<ScopDetection>(); AA = &getAnalysis<AliasAnalysis>(); - TD = &getAnalysis<DataLayout>(); + TD = &getAnalysis<DataLayoutPass>().getDataLayout(); ZeroOffset = SE->getConstant(TD->getIntPtrType(F.getContext()), 0); for (ScopDetection::iterator I = SD->begin(), E = SD->end(); I != E; ++I) { @@ -351,7 +351,7 @@ bool TempScopInfo::runOnFunction(Function &F) { } void TempScopInfo::getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequired<DataLayout>(); + AU.addRequired<DataLayoutPass>(); AU.addRequiredTransitive<DominatorTreeWrapperPass>(); AU.addRequiredTransitive<PostDominatorTree>(); AU.addRequiredTransitive<LoopInfo>(); @@ -387,7 +387,7 @@ INITIALIZE_PASS_DEPENDENCY(LoopInfo); INITIALIZE_PASS_DEPENDENCY(PostDominatorTree); INITIALIZE_PASS_DEPENDENCY(RegionInfo); INITIALIZE_PASS_DEPENDENCY(ScalarEvolution); -INITIALIZE_PASS_DEPENDENCY(DataLayout); +INITIALIZE_PASS_DEPENDENCY(DataLayoutPass); INITIALIZE_PASS_END(TempScopInfo, "polly-analyze-ir", "Polly - Analyse the LLVM-IR in the detected regions", false, false) diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp index 2dc423c0f62..36c39cd070e 100644 --- a/polly/lib/CodeGen/CodeGeneration.cpp +++ b/polly/lib/CodeGen/CodeGeneration.cpp @@ -380,7 +380,8 @@ public: } IntegerType *ClastStmtCodeGen::getIntPtrTy() { - return P->getAnalysis<DataLayout>().getIntPtrType(Builder.getContext()); + return P->getAnalysis<DataLayoutPass>().getDataLayout().getIntPtrType( + Builder.getContext()); } const std::vector<std::string> &ClastStmtCodeGen::getParallelLoops() { @@ -1054,7 +1055,7 @@ public: AU.addRequired<ScalarEvolution>(); AU.addRequired<ScopDetection>(); AU.addRequired<ScopInfo>(); - AU.addRequired<DataLayout>(); + AU.addRequired<DataLayoutPass>(); AU.addRequired<LoopInfo>(); AU.addPreserved<CloogInfo>(); @@ -1086,7 +1087,7 @@ INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass); INITIALIZE_PASS_DEPENDENCY(RegionInfo); INITIALIZE_PASS_DEPENDENCY(ScalarEvolution); INITIALIZE_PASS_DEPENDENCY(ScopDetection); -INITIALIZE_PASS_DEPENDENCY(DataLayout); +INITIALIZE_PASS_DEPENDENCY(DataLayoutPass); INITIALIZE_PASS_END(CodeGeneration, "polly-codegen", "Polly - Create LLVM-IR from SCoPs", false, false) diff --git a/polly/lib/CodeGen/LoopGenerators.cpp b/polly/lib/CodeGen/LoopGenerators.cpp index fcfd916c3e5..8322ab09220 100644 --- a/polly/lib/CodeGen/LoopGenerators.cpp +++ b/polly/lib/CodeGen/LoopGenerators.cpp @@ -207,7 +207,8 @@ void OMPGenerator::createCallLoopEndNowait() { } IntegerType *OMPGenerator::getIntPtrTy() { - return P->getAnalysis<DataLayout>().getIntPtrType(Builder.getContext()); + return P->getAnalysis<DataLayoutPass>().getDataLayout().getIntPtrType( + Builder.getContext()); } Module *OMPGenerator::getModule() { diff --git a/polly/lib/IndVarSimplify.cpp b/polly/lib/IndVarSimplify.cpp index a7d96f434d8..91ea2aac46c 100644 --- a/polly/lib/IndVarSimplify.cpp +++ b/polly/lib/IndVarSimplify.cpp @@ -69,7 +69,7 @@ class PollyIndVarSimplify : public LoopPass { LoopInfo *LI; ScalarEvolution *SE; DominatorTree *DT; - DataLayout *TD; + const DataLayout *TD; SmallVector<WeakVH, 16> DeadInsts; bool Changed; @@ -1809,7 +1809,8 @@ bool PollyIndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) { LI = &getAnalysis<LoopInfo>(); SE = &getAnalysis<ScalarEvolution>(); DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree(); - TD = getAnalysisIfAvailable<DataLayout>(); + DataLayoutPass *DLP = getAnalysisIfAvailable<DataLayoutPass>(); + TD = DLP ? &DLP->getDataLayout() : 0; DeadInsts.clear(); Changed = false; |