[llvm-commits] [polly] r167234 - in /polly/trunk/lib: CodeGen/CodeGeneration.cpp CodeGen/LoopGenerators.cpp IndVarSimplify.cpp
Tobias Grosser
grosser at fim.uni-passau.de
Thu Nov 1 09:45:18 PDT 2012
Author: grosser
Date: Thu Nov 1 11:45:18 2012
New Revision: 167234
URL: http://llvm.org/viewvc/llvm-project?rev=167234&view=rev
Log:
Revert multiple adress space changes in Polly
Modified:
polly/trunk/lib/CodeGen/CodeGeneration.cpp
polly/trunk/lib/CodeGen/LoopGenerators.cpp
polly/trunk/lib/IndVarSimplify.cpp
Modified: polly/trunk/lib/CodeGen/CodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/CodeGeneration.cpp?rev=167234&r1=167233&r2=167234&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/CodeGeneration.cpp (original)
+++ polly/trunk/lib/CodeGen/CodeGeneration.cpp Thu Nov 1 11:45:18 2012
@@ -356,8 +356,7 @@
}
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() {
Modified: polly/trunk/lib/CodeGen/LoopGenerators.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/LoopGenerators.cpp?rev=167234&r1=167233&r2=167234&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/LoopGenerators.cpp (original)
+++ polly/trunk/lib/CodeGen/LoopGenerators.cpp Thu Nov 1 11:45:18 2012
@@ -180,8 +180,7 @@
}
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() {
Modified: polly/trunk/lib/IndVarSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/IndVarSimplify.cpp?rev=167234&r1=167233&r2=167234&view=diff
==============================================================================
--- polly/trunk/lib/IndVarSimplify.cpp (original)
+++ polly/trunk/lib/IndVarSimplify.cpp Thu Nov 1 11:45:18 2012
@@ -1530,8 +1530,7 @@
/// 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 @@
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 @@
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");
More information about the llvm-commits
mailing list