[polly] r312116 - [ScopBuilder/ScopInfo] Move ScopStmt::buildDomain to ScopBuilder. NFC.
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 30 06:04:54 PDT 2017
Author: meinersbur
Date: Wed Aug 30 06:04:54 2017
New Revision: 312116
URL: http://llvm.org/viewvc/llvm-project?rev=312116&view=rev
Log:
[ScopBuilder/ScopInfo] Move ScopStmt::buildDomain to ScopBuilder. NFC.
This method is only called in the SCoP building phase.
Therefore it fits better into ScopBuilder to separate
SCoP-construction from SCoP modeling.
Modified:
polly/trunk/include/polly/ScopBuilder.h
polly/trunk/include/polly/ScopInfo.h
polly/trunk/lib/Analysis/ScopBuilder.cpp
polly/trunk/lib/Analysis/ScopInfo.cpp
Modified: polly/trunk/include/polly/ScopBuilder.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopBuilder.h?rev=312116&r1=312115&r2=312116&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopBuilder.h (original)
+++ polly/trunk/include/polly/ScopBuilder.h Wed Aug 30 06:04:54 2017
@@ -335,6 +335,9 @@ class ScopBuilder {
/// @see MemoryKind
void addPHIReadAccess(ScopStmt *PHIStmt, PHINode *PHI);
+ /// Build the domain of @p Stmt.
+ void buildDomain(ScopStmt &Stmt);
+
/// Build the access relation of all memory accesses of @p Stmt.
void buildAccessRelations(ScopStmt &Stmt);
Modified: polly/trunk/include/polly/ScopInfo.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=312116&r1=312115&r2=312116&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Wed Aug 30 06:04:54 2017
@@ -1309,9 +1309,7 @@ private:
/// Vector for Instructions in this statement.
std::vector<Instruction *> Instructions;
- /// Build the statement.
//@{
- void buildDomain();
/// Fill NestLoops with loops surrounding this statement.
void collectSurroundingLoops();
Modified: polly/trunk/lib/Analysis/ScopBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopBuilder.cpp?rev=312116&r1=312115&r2=312116&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopBuilder.cpp (original)
+++ polly/trunk/lib/Analysis/ScopBuilder.cpp Wed Aug 30 06:04:54 2017
@@ -911,6 +911,13 @@ void ScopBuilder::addPHIReadAccess(ScopS
MemoryKind::PHI);
}
+void ScopBuilder::buildDomain(ScopStmt &Stmt) {
+ isl::id Id = isl::id::alloc(scop->getIslCtx(), Stmt.getBaseName(), &Stmt);
+
+ Stmt.Domain = scop->getDomainConditions(&Stmt);
+ Stmt.Domain = Stmt.Domain.set_tuple_id(Id);
+}
+
void ScopBuilder::buildAccessRelations(ScopStmt &Stmt) {
for (MemoryAccess *Access : Stmt.MemAccs) {
Type *ElementType = Access->getElementType();
@@ -1069,7 +1076,7 @@ void ScopBuilder::buildScop(Region &R, A
// The ScopStmts now have enough information to initialize themselves.
for (ScopStmt &Stmt : *scop) {
- Stmt.buildDomain();
+ buildDomain(Stmt);
Stmt.collectSurroundingLoops();
buildAccessRelations(Stmt);
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=312116&r1=312115&r2=312116&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Wed Aug 30 06:04:54 2017
@@ -1715,13 +1715,6 @@ buildConditionSets(Scop &S, BasicBlock *
ConditionSets);
}
-void ScopStmt::buildDomain() {
- isl::id Id = isl::id::alloc(getIslCtx(), getBaseName(), this);
-
- Domain = getParent()->getDomainConditions(this);
- Domain = Domain.set_tuple_id(Id);
-}
-
void ScopStmt::collectSurroundingLoops() {
for (unsigned u = 0, e = Domain.dim(isl::dim::set); u < e; u++) {
isl::id DimId = Domain.get_dim_id(isl::dim::set, u);
More information about the llvm-commits
mailing list