diff options
author | Tobias Grosser <grosser@fim.uni-passau.de> | 2012-11-01 16:45:18 +0000 |
---|---|---|
committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2012-11-01 16:45:18 +0000 |
commit | 5d01691d76d5f71e91a8bff8e027f9f37f291256 (patch) | |
tree | a9280f824f5c259e8ca6752ffa2c8854c63ffc6e /polly/lib | |
parent | b3048116861acd5925562223c3c68f36cc47b7d0 (diff) | |
download | bcm5719-llvm-5d01691d76d5f71e91a8bff8e027f9f37f291256.tar.gz bcm5719-llvm-5d01691d76d5f71e91a8bff8e027f9f37f291256.zip |
Revert multiple adress space changes in Polly
llvm-svn: 167234
Diffstat (limited to 'polly/lib')
-rw-r--r-- | polly/lib/CodeGen/CodeGeneration.cpp | 3 | ||||
-rw-r--r-- | polly/lib/CodeGen/LoopGenerators.cpp | 3 | ||||
-rw-r--r-- | polly/lib/IndVarSimplify.cpp | 13 |
3 files changed, 7 insertions, 12 deletions
diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp index 84eafd844dc..ae4cf9b5e75 100644 --- a/polly/lib/CodeGen/CodeGeneration.cpp +++ b/polly/lib/CodeGen/CodeGeneration.cpp @@ -356,8 +356,7 @@ private: } IntegerType *ClastStmtCodeGen::getIntPtrTy() { - // FIXME: This might need to get a proper address space. Hard code 0 for now. - return P->getAnalysis<DataLayout>().getIntPtrType(Builder.getContext(), 0u); + return P->getAnalysis<DataLayout>().getIntPtrType(Builder.getContext()); } const std::vector<std::string> &ClastStmtCodeGen::getParallelLoops() { diff --git a/polly/lib/CodeGen/LoopGenerators.cpp b/polly/lib/CodeGen/LoopGenerators.cpp index 98d2751503f..4edd01d81ac 100644 --- a/polly/lib/CodeGen/LoopGenerators.cpp +++ b/polly/lib/CodeGen/LoopGenerators.cpp @@ -180,8 +180,7 @@ void OMPGenerator::createCallLoopEndNowait() { } IntegerType *OMPGenerator::getIntPtrTy() { - // FIXME: This might need to get a proper address space. Hard code 0 for now. - return P->getAnalysis<DataLayout>().getIntPtrType(Builder.getContext(), 0u); + return P->getAnalysis<DataLayout>().getIntPtrType(Builder.getContext()); } Module *OMPGenerator::getModule() { diff --git a/polly/lib/IndVarSimplify.cpp b/polly/lib/IndVarSimplify.cpp index 7a42ddb33cc..d5201680696 100644 --- a/polly/lib/IndVarSimplify.cpp +++ b/polly/lib/IndVarSimplify.cpp @@ -1530,8 +1530,7 @@ FindLoopCounter(Loop *L, const SCEV *BECount, /// genLoopLimit - Help LinearFunctionTestReplace by generating a value that /// holds the RHS of the new loop test. static Value *genLoopLimit(PHINode *IndVar, const SCEV *IVCount, Loop *L, - SCEVExpander &Rewriter, ScalarEvolution *SE, - const DataLayout *TD) { + SCEVExpander &Rewriter, ScalarEvolution *SE) { const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(SE->getSCEV(IndVar)); assert(AR && AR->getLoop() == L && AR->isAffine() && "bad loop counter"); const SCEV *IVInit = AR->getStart(); @@ -1556,11 +1555,9 @@ static Value *genLoopLimit(PHINode *IndVar, const SCEV *IVCount, Loop *L, assert(AR->getStart() == SE->getSCEV(GEPBase) && "bad loop counter"); // We could handle pointer IVs other than i8*, but we need to compensate for // gep index scaling. See canExpandBackedgeTakenCount comments. - if (TD) - assert(SE->getSizeOfExpr( - cast<PointerType>(GEPBase->getType())->getElementType(), - TD->getIntPtrType(GEPBase->getType()))->isOne() - && "unit stride pointer IV must be i8*"); + assert(SE->getSizeOfExpr( + cast<PointerType>(GEPBase->getType())->getElementType())->isOne() + && "unit stride pointer IV must be i8*"); IRBuilder<> Builder(L->getLoopPreheader()->getTerminator()); return Builder.CreateGEP(GEPBase, GEPOffset, "lftr.limit"); @@ -1659,7 +1656,7 @@ LinearFunctionTestReplace(Loop *L, CmpIndVar = IndVar; } - Value *ExitCnt = genLoopLimit(IndVar, IVCount, L, Rewriter, SE, TD); + Value *ExitCnt = genLoopLimit(IndVar, IVCount, L, Rewriter, SE); assert(ExitCnt->getType()->isPointerTy() == IndVar->getType()->isPointerTy() && "genLoopLimit missed a cast"); |