[polly] r175303 - add NestLoops to remove some uses of IVS
Sebastian Pop
spop at codeaurora.org
Fri Feb 15 13:26:45 PST 2013
Author: spop
Date: Fri Feb 15 15:26:44 2013
New Revision: 175303
URL: http://llvm.org/viewvc/llvm-project?rev=175303&view=rev
Log:
add NestLoops to remove some uses of IVS
Modified:
polly/trunk/include/polly/ScopInfo.h
polly/trunk/lib/Analysis/ScopInfo.cpp
Modified: polly/trunk/include/polly/ScopInfo.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=175303&r1=175302&r2=175303&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Fri Feb 15 15:26:44 2013
@@ -277,6 +277,7 @@ class ScopStmt {
///
/// This information is only needed for final code generation.
std::vector<std::pair<PHINode*, Loop*> > IVS;
+ std::vector<Loop*> NestLoops;
std::string BaseName;
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=175303&r1=175302&r2=175303&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Fri Feb 15 15:26:44 2013
@@ -586,14 +586,15 @@ ScopStmt::buildDomain(TempScop &tempScop
}
ScopStmt::ScopStmt(Scop &parent, TempScop &tempScop, const Region &CurRegion,
- BasicBlock &bb, SmallVectorImpl<Loop *> &NestLoops,
+ BasicBlock &bb, SmallVectorImpl<Loop *> &Nest,
SmallVectorImpl<unsigned> &Scatter)
- : Parent(parent), BB(&bb), IVS(NestLoops.size()) {
+ : Parent(parent), BB(&bb), IVS(Nest.size()), NestLoops(Nest.size()) {
// Setup the induction variables.
- for (unsigned i = 0, e = NestLoops.size(); i < e; ++i) {
- PHINode *PN = NestLoops[i]->getCanonicalInductionVariable();
+ for (unsigned i = 0, e = Nest.size(); i < e; ++i) {
+ PHINode *PN = Nest[i]->getCanonicalInductionVariable();
assert(PN && "Non canonical IV in Scop!");
- IVS[i] = std::make_pair(PN, NestLoops[i]);
+ IVS[i] = std::make_pair(PN, Nest[i]);
+ NestLoops[i] = Nest[i];
}
raw_string_ostream OS(BaseName);
@@ -621,7 +622,7 @@ unsigned ScopStmt::getNumIterators() con
if (!BB)
return 1;
- return IVS.size();
+ return NestLoops.size();
}
unsigned ScopStmt::getNumScattering() const {
@@ -636,7 +637,7 @@ ScopStmt::getInductionVariableForDimensi
}
const Loop *ScopStmt::getLoopForDimension(unsigned Dimension) const {
- return IVS[Dimension].second;
+ return NestLoops[Dimension];
}
isl_ctx *ScopStmt::getIslCtx() const { return Parent.getIslCtx(); }
More information about the llvm-commits
mailing list