[polly] r255472 - Store DominatorTree as a field in ScopInfo
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 13 14:10:38 PST 2015
Author: meinersbur
Date: Sun Dec 13 16:10:37 2015
New Revision: 255472
URL: http://llvm.org/viewvc/llvm-project?rev=255472&view=rev
Log:
Store DominatorTree as a field in ScopInfo
This harmonizes DT with the other analyses in ScopInfo and makes it
available for use in its methods.
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=255472&r1=255471&r2=255472&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Sun Dec 13 16:10:37 2015
@@ -1783,6 +1783,9 @@ class ScopInfo : public RegionPass {
// Target data for element size computing.
const DataLayout *TD;
+ // DominatorTree to reason about guaranteed execution.
+ DominatorTree *DT;
+
// Access function of statements (currently BasicBlocks) .
//
// This owns all the MemoryAccess objects of the Scop created in this pass. It
@@ -1804,7 +1807,7 @@ class ScopInfo : public RegionPass {
void clear();
// Build the SCoP for Region @p R.
- void buildScop(Region &R, DominatorTree &DT, AssumptionCache &AC);
+ void buildScop(Region &R, AssumptionCache &AC);
/// @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=255472&r1=255471&r2=255472&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Sun Dec 13 16:10:37 2015
@@ -3942,9 +3942,9 @@ void ScopInfo::addPHIReadAccess(PHINode
ScopArrayInfo::MK_PHI);
}
-void ScopInfo::buildScop(Region &R, DominatorTree &DT, AssumptionCache &AC) {
+void ScopInfo::buildScop(Region &R, AssumptionCache &AC) {
unsigned MaxLoopDepth = getMaxLoopDepthInRegion(R, *LI, *SD);
- scop = new Scop(R, AccFuncMap, *SD, *SE, DT, *LI, ctx, MaxLoopDepth);
+ scop = new Scop(R, AccFuncMap, *SD, *SE, *DT, *LI, ctx, MaxLoopDepth);
buildStmts(R);
buildAccessFunctions(R, R);
@@ -4012,7 +4012,7 @@ bool ScopInfo::runOnRegion(Region *R, RG
LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
AA = &getAnalysis<AAResultsWrapperPass>().getAAResults();
TD = &F->getParent()->getDataLayout();
- DominatorTree &DT = getAnalysis<DominatorTreeWrapperPass>().getDomTree();
+ DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
auto &AC = getAnalysis<AssumptionCacheTracker>().getAssumptionCache(*F);
DebugLoc Beg, End;
@@ -4020,7 +4020,7 @@ bool ScopInfo::runOnRegion(Region *R, RG
std::string Msg = "SCoP begins here.";
emitOptimizationRemarkAnalysis(F->getContext(), DEBUG_TYPE, *F, Beg, Msg);
- buildScop(*R, DT, AC);
+ buildScop(*R, AC);
DEBUG(scop->print(dbgs()));
More information about the llvm-commits
mailing list