[llvm-commits] [polly] r143575 - in /polly/trunk: include/polly/TempScopInfo.h lib/Analysis/ScopInfo.cpp lib/Analysis/TempScopInfo.cpp
Tobias Grosser
grosser at fim.uni-passau.de
Wed Nov 2 14:37:51 PDT 2011
Author: grosser
Date: Wed Nov 2 16:37:51 2011
New Revision: 143575
URL: http://llvm.org/viewvc/llvm-project?rev=143575&view=rev
Log:
TempScop: Remove SCEVAffFunc from LoopBoundInfo
This is not needed anymore -> Reduce impact of SCEVAffFunc.
Modified:
polly/trunk/include/polly/TempScopInfo.h
polly/trunk/lib/Analysis/ScopInfo.cpp
polly/trunk/lib/Analysis/TempScopInfo.cpp
Modified: polly/trunk/include/polly/TempScopInfo.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/TempScopInfo.h?rev=143575&r1=143574&r2=143575&view=diff
==============================================================================
--- polly/trunk/include/polly/TempScopInfo.h (original)
+++ polly/trunk/include/polly/TempScopInfo.h Wed Nov 2 16:37:51 2011
@@ -167,7 +167,7 @@
/// A canonical induction variable is:
/// an integer recurrence that starts at 0 and increments by one each time
/// through the loop.
-typedef std::map<const Loop*, SCEVAffFunc> LoopBoundMapType;
+typedef std::map<const Loop*, const SCEV*> LoopBoundMapType;
/// Mapping BBs to its condition constrains
typedef std::map<const BasicBlock*, BBCond> BBCondMapType;
@@ -234,7 +234,7 @@
///
/// @return The bounds of the loop L in { Lower bound, Upper bound } form.
///
- const SCEVAffFunc &getLoopBound(const Loop *L) const {
+ const SCEV *getLoopBound(const Loop *L) const {
LoopBoundMapType::const_iterator at = LoopBounds.find(L);
assert(at != LoopBounds.end() && "Only valid loop is allow!");
return at->second;
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=143575&r1=143574&r2=143575&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Wed Nov 2 16:37:51 2011
@@ -639,7 +639,7 @@
// IV <= LatchExecutions.
const Loop *L = getLoopForDimension(i);
- const SCEV *LatchExecutions = tempScop.getLoopBound(L).OriginalSCEV;
+ const SCEV *LatchExecutions = tempScop.getLoopBound(L);
isl_pw_aff *UpperBound = SCEVAffinator::getPwAff(this, LatchExecutions);
isl_set *UpperBoundSet = isl_pw_aff_le_set(IV, UpperBound);
Domain = isl_set_intersect(Domain, UpperBoundSet);
Modified: polly/trunk/lib/Analysis/TempScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/TempScopInfo.cpp?rev=143575&r1=143574&r2=143575&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/TempScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/TempScopInfo.cpp Wed Nov 2 16:37:51 2011
@@ -156,7 +156,7 @@
if (at != LoopBounds.end()) {
OS.indent(ind) << "Bounds of Loop: " << at->first->getHeader()->getName()
<< ":\t{ ";
- OS << *(at->second.OriginalSCEV);
+ OS << *(at->second);
OS << " }\n";
ind += 2;
}
@@ -279,9 +279,14 @@
if (LoopBounds.find(L) != LoopBounds.end())
continue;
- const SCEV *LoopCount = SE->getBackedgeTakenCount(L);
- LoopBounds[L] = SCEVAffFunc(SCEVAffFunc::Eq, LoopCount);
- buildAffineFunction(LoopCount, LoopBounds[L], Scop.getMaxRegion(),
+ const SCEV *BackedgeTakenCount = SE->getBackedgeTakenCount(L);
+ LoopBounds[L] = BackedgeTakenCount;
+
+ // FIXME: Do not build TempSCEVAffFunc. It is not needed anywhere else
+ // and only build to register the parameters in this SCoP. We should
+ // move this functionality to the ScopDetection.
+ SCEVAffFunc Temp(SCEVAffFunc::Eq, BackedgeTakenCount);
+ buildAffineFunction(BackedgeTakenCount, Temp, Scop.getMaxRegion(),
Scop.getParamSet());
Loop *OL = R.outermostLoopInRegion(L);
More information about the llvm-commits
mailing list