Skip to content

Commit

Permalink
Sed insertDimId->insertDimVar
Browse files Browse the repository at this point in the history
  • Loading branch information
vatai committed Sep 15, 2023
1 parent 060802c commit fa9db33
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 6 additions & 5 deletions tools/polymer/lib/Support/OslScop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ void OslScop::addDomainRelation(int stmtId, FlatAffineValueConstraints &cst) {
createConstraintRows(cst, inEqs, /*isEq=*/false);

addRelation(stmtId + 1, OSL_TYPE_DOMAIN, cst.getNumConstraints(),
cst.getNumCols() + 1, cst.getNumDimVars(), 0, cst.getNumLocalVars(),
cst.getNumSymbolVars(), eqs, inEqs);
cst.getNumCols() + 1, cst.getNumDimVars(), 0,
cst.getNumLocalVars(), cst.getNumSymbolVars(), eqs, inEqs);
}

void OslScop::addScatteringRelation(int stmtId,
Expand Down Expand Up @@ -238,7 +238,8 @@ void OslScop::addScatteringRelation(int stmtId,

// TODO: consider the parameters that may appear in the scattering
// dimension.
for (unsigned k = 0; k < cst.getNumLocalVars() + cst.getNumSymbolVars(); k++)
for (unsigned k = 0; k < cst.getNumLocalVars() + cst.getNumSymbolVars();
k++)
eqs[j * (numScatCols - 1) + k + numScatEqs + cst.getNumDimVars()] = 0;

// Relating the constants (the last column) to the scattering dimensions.
Expand All @@ -260,8 +261,8 @@ void OslScop::addAccessRelation(int stmtId, bool isRead, mlir::Value memref,

// Create a new dim of memref and set its value to its corresponding ID.
memRefIdMap.try_emplace(memref, memRefIdMap.size() + 1);
cst.insertDimId(0, memref);
cst.addBound(mlir::FlatAffineConstraints::BoundType::EQ, 0,
cst.insertDimVar(0, memref);
cst.addBound(mlir::FlatAffineValueConstraints::BoundType::EQ, 0,
memRefIdMap[memref]);
// cst.setIdToConstant(0, memRefIdMap[memref]);

Expand Down
3 changes: 2 additions & 1 deletion tools/polymer/lib/Target/OpenScop/ConvertFromOpenScop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,8 @@ void Importer::initializeSymbol(mlir::Value val) {
hasInsertionPoint = true;
b.setInsertionPointToStart(blockToInsert);
}
} else if (mlir::func::FuncOp funOp = dyn_cast<mlir::func::FuncOp>(parentOp)) {
} else if (mlir::func::FuncOp funOp =
dyn_cast<mlir::func::FuncOp>(parentOp)) {
// Insert at the beginning of this function.
hasInsertionPoint = true;
b.setInsertionPointToStart(&entryBlock);
Expand Down

0 comments on commit fa9db33

Please sign in to comment.