Skip to content

Commit

Permalink
Fix missing delimiting in appendComputation and for unroll/reroll #147
Browse files Browse the repository at this point in the history
  • Loading branch information
riftEmber committed Oct 13, 2021
1 parent fa11393 commit 1317173
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/computation/Computation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,7 @@ AppendComputationResult Computation::appendComputation(
const Computation* other, std::string surroundingIterDomainStr,
std::string surroundingExecScheduleStr,
std::vector<std::string> arguments){

Set* surroundingIterDomain = new Set(surroundingIterDomainStr);
Set* surroundingIterDomain = new Set(delimitDataSpacesInString(surroundingIterDomainStr));
Relation* surroundingExecSchedule = new Relation(surroundingExecScheduleStr);

// create a working copy of the appendee
Expand Down Expand Up @@ -1599,7 +1598,6 @@ void Computation::delimitDataSpacesInStmt(Stmt *stmt) {

stmt->setStmtSourceCode(delimitDataSpacesInString(stmt->getStmtSourceCode()));
stmt->setIterationSpace(delimitDataSpacesInString(stmt->getIterationSpace()->prettyPrintString()));
stmt->setExecutionSchedule(delimitDataSpacesInString(stmt->getExecutionSchedule()->prettyPrintString()));
for (unsigned int i = 0; i < stmt->getNumReads(); ++i) {
stmt->updateRead(i, delimitDataSpaceName(stmt->getReadDataSpace(i)),
stmt->getReadRelation(i)->prettyPrintString());
Expand Down Expand Up @@ -1782,6 +1780,7 @@ void Computation::enforceArraySSA() {
{ {read, "{[0]->" + tuple + "}"} },
{ {unroll, "{[0]->[0]}"} }
);
unrollStmt->setDelimited();
unrollStmt->setArrayAccess(true);
int numStmts = getNumStmts();
addStmt(unrollStmt, i);
Expand Down Expand Up @@ -1835,6 +1834,7 @@ void Computation::enforceArraySSA() {
{ {unroll, "{[0]->[0]}"} },
{ {pair.first, "{[0]->" + tuple + "}"} }
);
rerollStmt->setDelimited();
rerollStmt->setArrayAccess(true);
addStmt(rerollStmt);
}
Expand Down

0 comments on commit 1317173

Please sign in to comment.