summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xpolly/include/polly/ScopInfo.h9
-rw-r--r--polly/lib/Analysis/ScopInfo.cpp44
-rw-r--r--polly/lib/Cloog.cpp4
-rwxr-xr-xpolly/lib/Exchange/JSONExporter.cpp11
-rwxr-xr-xpolly/lib/Exchange/OpenScopExporter.cpp2
-rwxr-xr-xpolly/lib/Exchange/OpenScopImporter.cpp4
-rw-r--r--polly/lib/Exchange/ScopLib.cpp8
-rw-r--r--polly/lib/Pocc.cpp5
-rw-r--r--polly/lib/ScheduleOptimizer.cpp8
-rw-r--r--polly/test/ScopInfo/loop_carry.ll11
10 files changed, 1 insertions, 105 deletions
diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h
index 6d368a4d7a0..3d7ff725e0e 100755
--- a/polly/include/polly/ScopInfo.h
+++ b/polly/include/polly/ScopInfo.h
@@ -283,9 +283,6 @@ class ScopStmt {
BasicBlock &bb, SmallVectorImpl<Loop*> &NestLoops,
SmallVectorImpl<unsigned> &Scatter);
- /// Create the finalization statement.
- ScopStmt(Scop &parent, SmallVectorImpl<unsigned> &Scatter);
-
friend class Scop;
public:
@@ -353,12 +350,6 @@ public:
/// @brief Return the SCEV for a loop dimension.
const SCEVAddRecExpr *getSCEVForDimension(unsigned Dimension) const;
- /// @brief Is this statement the final read statement?
- ///
- /// A final read statement is scheduled after all statements to model
- /// that all data used in the Scop is read after the Scop.
- bool isFinalRead() { return getBasicBlock() == NULL; }
-
/// @brief Align the parameters in the statement to the scop context
void realignParams();
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index 39318e0fb8b..464367dd47a 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -649,45 +649,6 @@ ScopStmt::ScopStmt(Scop &parent, TempScop &tempScop,
buildAccesses(tempScop, CurRegion);
}
-ScopStmt::ScopStmt(Scop &parent, SmallVectorImpl<unsigned> &Scatter)
- : Parent(parent), BB(NULL), IVS(0) {
-
- BaseName = "FinalRead";
-
- // Build iteration domain.
- std::string IterationDomainString = "{[i0] : i0 = 0}";
- Domain = isl_set_read_from_str(getIslCtx(), IterationDomainString.c_str());
- Domain = isl_set_set_tuple_name(Domain, getBaseName());
-
- // Build scattering.
- unsigned ScatSpace = Parent.getMaxLoopDepth() * 2 + 1;
- isl_space *Space = isl_space_alloc(getIslCtx(), 0, 1, ScatSpace);
- Space = isl_space_set_tuple_name(Space, isl_dim_out, "scattering");
- Space = isl_space_set_tuple_name(Space, isl_dim_in, getBaseName());
- Scattering = isl_map_universe(Space);
-
- // TODO: This is incorrect. We should not use a very large number to ensure
- // that this statement is executed last.
- Scattering = isl_map_fix_si(Scattering, isl_dim_out, 0, 200000000);
-
- // Build memory accesses, use SetVector to keep the order of memory accesses
- // and prevent the same memory access inserted more than once.
- SetVector<const Value*> BaseAddressSet;
-
- for (Scop::const_iterator SI = Parent.begin(), SE = Parent.end(); SI != SE;
- ++SI) {
- ScopStmt *Stmt = *SI;
-
- for (MemoryAccessVec::const_iterator I = Stmt->memacc_begin(),
- E = Stmt->memacc_end(); I != E; ++I)
- BaseAddressSet.insert((*I)->getBaseAddr());
- }
-
- for (SetVector<const Value*>::iterator BI = BaseAddressSet.begin(),
- BE = BaseAddressSet.end(); BI != BE; ++BI)
- MemAccs.push_back(new MemoryAccess(*BI, this));
-}
-
std::string ScopStmt::getDomainStr() const {
return stringFromIslObj(Domain);
}
@@ -857,7 +818,6 @@ Scop::Scop(TempScop &tempScop, LoopInfo &LI, ScalarEvolution &ScalarEvolution,
// Build the iteration domain, access functions and scattering functions
// traversing the region tree.
buildScop(tempScop, getRegion(), NestLoops, Scatter, LI);
- Stmts.push_back(new ScopStmt(*this, Scatter));
realignParams();
@@ -942,9 +902,7 @@ __isl_give isl_union_set *Scop::getDomains() {
isl_union_set *Domain = NULL;
for (Scop::iterator SI = begin(), SE = end(); SI != SE; ++SI)
- if ((*SI)->isFinalRead())
- continue;
- else if (!Domain)
+ if (!Domain)
Domain = isl_union_set_from_set((*SI)->getDomain());
else
Domain = isl_union_set_union(Domain,
diff --git a/polly/lib/Cloog.cpp b/polly/lib/Cloog.cpp
index 779bdf7e579..f3fe68c52b0 100644
--- a/polly/lib/Cloog.cpp
+++ b/polly/lib/Cloog.cpp
@@ -168,10 +168,6 @@ CloogUnionDomain *Cloog::buildCloogUnionDomain() {
for (Scop::iterator SI = S->begin(), SE = S->end(); SI != SE; ++SI) {
ScopStmt *Stmt = *SI;
-
- if (Stmt->isFinalRead())
- continue;
-
CloogScattering *Scattering;
CloogDomain *Domain;
diff --git a/polly/lib/Exchange/JSONExporter.cpp b/polly/lib/Exchange/JSONExporter.cpp
index d9c569b45df..0113e88cd8d 100755
--- a/polly/lib/Exchange/JSONExporter.cpp
+++ b/polly/lib/Exchange/JSONExporter.cpp
@@ -102,9 +102,6 @@ Json::Value JSONExporter::getJSON(Scop &scop) const {
for (Scop::iterator SI = S->begin(), SE = S->end(); SI != SE; ++SI) {
ScopStmt *Stmt = *SI;
- if (Stmt->isFinalRead())
- continue;
-
Json::Value statement;
statement["name"] = Stmt->getBaseName();
@@ -246,12 +243,7 @@ bool JSONImporter::runOnScop(Scop &scop) {
int index = 0;
for (Scop::iterator SI = S->begin(), SE = S->end(); SI != SE; ++SI) {
- ScopStmt *Stmt = *SI;
-
- if (Stmt->isFinalRead())
- continue;
Json::Value schedule = jscop["statements"][index]["schedule"];
-
isl_map *m = isl_map_read_from_str(S->getIslCtx(), schedule.asCString());
NewScattering[*SI] = m;
index++;
@@ -274,9 +266,6 @@ bool JSONImporter::runOnScop(Scop &scop) {
for (Scop::iterator SI = S->begin(), SE = S->end(); SI != SE; ++SI) {
ScopStmt *Stmt = *SI;
- if (Stmt->isFinalRead())
- continue;
-
int memoryAccessIdx = 0;
for (ScopStmt::memacc_iterator MI = Stmt->memacc_begin(),
ME = Stmt->memacc_end(); MI != ME; ++MI) {
diff --git a/polly/lib/Exchange/OpenScopExporter.cpp b/polly/lib/Exchange/OpenScopExporter.cpp
index 7f1af1d0861..39b4a2aa44a 100755
--- a/polly/lib/Exchange/OpenScopExporter.cpp
+++ b/polly/lib/Exchange/OpenScopExporter.cpp
@@ -176,8 +176,6 @@ openscop_statement_p OpenScop::initializeStatement(ScopStmt *stmt) {
void OpenScop::initializeStatements() {
for (Scop::reverse_iterator SI = PollyScop->rbegin(), SE = PollyScop->rend();
SI != SE; ++SI) {
- if ((*SI)->isFinalRead())
- continue;
openscop_statement_p stmt = initializeStatement(*SI);
stmt->next = openscop->statement;
openscop->statement = stmt;
diff --git a/polly/lib/Exchange/OpenScopImporter.cpp b/polly/lib/Exchange/OpenScopImporter.cpp
index db11a5608a9..c04cb8dc91d 100755
--- a/polly/lib/Exchange/OpenScopImporter.cpp
+++ b/polly/lib/Exchange/OpenScopImporter.cpp
@@ -148,10 +148,6 @@ StatementToIslMapTy *readScattering(Scop *S, openscop_scop_p OScop) {
openscop_statement_p stmt = OScop->statement;
for (Scop::iterator SI = S->begin(), SE = S->end(); SI != SE; ++SI) {
-
- if ((*SI)->isFinalRead())
- continue;
-
if (!stmt) {
errs() << "Not enough statements available in OpenScop file\n";
delete &NewScattering;
diff --git a/polly/lib/Exchange/ScopLib.cpp b/polly/lib/Exchange/ScopLib.cpp
index dc183cf0655..d58f0741f64 100644
--- a/polly/lib/Exchange/ScopLib.cpp
+++ b/polly/lib/Exchange/ScopLib.cpp
@@ -120,10 +120,6 @@ scoplib_statement_p ScopLib::initializeStatement(ScopStmt *stmt) {
void ScopLib::initializeStatements() {
for (Scop::reverse_iterator SI = PollyScop->rbegin(), SE = PollyScop->rend();
SI != SE; ++SI) {
-
- if ((*SI)->isFinalRead())
- continue;
-
scoplib_statement_p stmt = initializeStatement(*SI);
stmt->next = scoplib->statement;
scoplib->statement = stmt;
@@ -706,10 +702,6 @@ StatementToIslMapTy *readScattering(Scop *S, scoplib_scop_p OScop) {
}
for (Scop::iterator SI = S->begin(), SE = S->end(); SI != SE; ++SI) {
-
- if ((*SI)->isFinalRead())
- continue;
-
if (!stmt) {
errs() << "Not enough statements available in OpenScop file\n";
freeStmtToIslMap(&NewScattering);
diff --git a/polly/lib/Pocc.cpp b/polly/lib/Pocc.cpp
index 6bed2e3663f..74aa3463a77 100644
--- a/polly/lib/Pocc.cpp
+++ b/polly/lib/Pocc.cpp
@@ -168,9 +168,6 @@ bool Pocc::runOnScop(Scop &S) {
bool isSingleValued = true;
for (Scop::iterator SI = S.begin(), SE = S.end(); SI != SE; ++SI) {
- if ((*SI)->isFinalRead())
- continue;
-
isl_map *scat = (*SI)->getScattering();
isl_map *projected = isl_map_project_out(scat, isl_dim_out, lastLoop,
scatterDims - lastLoop);
@@ -189,8 +186,6 @@ bool Pocc::runOnScop(Scop &S) {
// Strip mine the innermost loop.
for (Scop::iterator SI = S.begin(), SE = S.end(); SI != SE; ++SI) {
- if ((*SI)->isFinalRead())
- continue;
isl_map *scat = (*SI)->getScattering();
int scatDims = (*SI)->getNumScattering();
isl_space *Space = isl_space_alloc(S.getIslCtx(), S.getNumParams(),
diff --git a/polly/lib/ScheduleOptimizer.cpp b/polly/lib/ScheduleOptimizer.cpp
index 804f8064480..39cdf992e89 100644
--- a/polly/lib/ScheduleOptimizer.cpp
+++ b/polly/lib/ScheduleOptimizer.cpp
@@ -104,10 +104,6 @@ static int getSingleMap(__isl_take isl_map *map, void *user) {
static void extendScattering(Scop &S, unsigned NewDimensions) {
for (Scop::iterator SI = S.begin(), SE = S.end(); SI != SE; ++SI) {
ScopStmt *Stmt = *SI;
-
- if (Stmt->isFinalRead())
- continue;
-
unsigned OldDimensions = Stmt->getNumScattering();
isl_space *Space;
isl_basic_map *ChangeScattering;
@@ -529,10 +525,6 @@ bool IslScheduleOptimizer::runOnScop(Scop &S) {
for (Scop::iterator SI = S.begin(), SE = S.end(); SI != SE; ++SI) {
ScopStmt *Stmt = *SI;
-
- if (Stmt->isFinalRead())
- continue;
-
isl_set *Domain = Stmt->getDomain();
isl_union_map *StmtBand;
StmtBand = isl_union_map_intersect_domain(isl_union_map_copy(ScheduleMap),
diff --git a/polly/test/ScopInfo/loop_carry.ll b/polly/test/ScopInfo/loop_carry.ll
index 509420b635c..e45fb85e77a 100644
--- a/polly/test/ScopInfo/loop_carry.ll
+++ b/polly/test/ScopInfo/loop_carry.ll
@@ -79,14 +79,3 @@ bb2: ; preds = %bb, %entry
; CHECK: [n] -> { Stmt_bb[i0] -> MemRef_k_05_reg2mem[0] };
; CHECK: WriteAccess :=
; CHECK: [n] -> { Stmt_bb[i0] -> MemRef__reg2mem[0] };
-; CHECK: FinalRead
-; CHECK: Domain :=
-; CHECK: [n] -> { FinalRead[0] };
-; CHECK: Scattering :=
-; CHECK: [n] -> { FinalRead[i0] -> scattering[200000000, o1, o2] };
-; CHECK: ReadAccess :=
-; CHECK: [n] -> { FinalRead[i0] -> MemRef_a[o0] };
-; CHECK: ReadAccess :=
-; CHECK: [n] -> { FinalRead[i0] -> MemRef_k_05_reg2mem[o0] };
-; CHECK: ReadAccess :=
-; CHECK: -> { FinalRead[i0] -> MemRef__reg2mem[o0] };
OpenPOWER on IntegriCloud