[polly] r248879 - Assign scop directly
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 30 02:16:08 PDT 2015
Author: meinersbur
Date: Wed Sep 30 04:16:07 2015
New Revision: 248879
URL: http://llvm.org/viewvc/llvm-project?rev=248879&view=rev
Log:
Assign scop directly
This makes ScopInfo's scop member available earlier to other methods which will make some planned changes simpler.
No behavioral change intended
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=248879&r1=248878&r2=248879&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Wed Sep 30 04:16:07 2015
@@ -1596,7 +1596,7 @@ class ScopInfo : public RegionPass {
void clear();
// Build the SCoP for Region @p R.
- Scop *buildScop(Region &R, DominatorTree &DT);
+ void buildScop(Region &R, DominatorTree &DT);
/// @brief Build an instance of MemoryAccess from the Load/Store instruction.
///
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=248879&r1=248878&r2=248879&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Wed Sep 30 04:16:07 2015
@@ -3252,9 +3252,9 @@ void ScopInfo::addPHIReadAccess(PHINode
MemoryAccess::PHI);
}
-Scop *ScopInfo::buildScop(Region &R, DominatorTree &DT) {
+void ScopInfo::buildScop(Region &R, DominatorTree &DT) {
unsigned MaxLoopDepth = getMaxLoopDepthInRegion(R, *LI, *SD);
- Scop *S = new Scop(R, AccFuncMap, *SE, DT, ctx, MaxLoopDepth);
+ scop = new Scop(R, AccFuncMap, *SE, DT, ctx, MaxLoopDepth);
buildAccessFunctions(R, R);
@@ -3268,8 +3268,7 @@ Scop *ScopInfo::buildScop(Region &R, Dom
if (!R.getExitingBlock())
buildAccessFunctions(R, *R.getExit(), nullptr, /* IsExitBlock */ true);
- S->init(*LI, *SD, *AA);
- return S;
+ scop->init(*LI, *SD, *AA);
}
void ScopInfo::print(raw_ostream &OS, const Module *) const {
@@ -3324,7 +3323,7 @@ bool ScopInfo::runOnRegion(Region *R, RG
TD = &F->getParent()->getDataLayout();
DominatorTree &DT = getAnalysis<DominatorTreeWrapperPass>().getDomTree();
- scop = buildScop(*R, DT);
+ buildScop(*R, DT);
DEBUG(scop->print(dbgs()));
More information about the llvm-commits
mailing list