Skip to content

Commit

Permalink
Support Polygeist e5b8b83312c7a5f6fd94ea1a2cda87e54c4451fd
Browse files Browse the repository at this point in the history
  • Loading branch information
kumasento committed Jan 28, 2022
1 parent 3df1600 commit b2f5469
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/buildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: "wsmoses/Polygeist"
ref: "daeb952678b1d46c867c94ed2f20d78e1a3d5ec5"
ref: "e5b8b83312c7a5f6fd94ea1a2cda87e54c4451fd"
path: "polygeist"
submodules: "true"

Expand Down
6 changes: 3 additions & 3 deletions lib/Transforms/FoldSCFIf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ struct MatchIfElsePass : PassWrapper<MatchIfElsePass, OperationPass<FuncOp>> {

// If there is no else block, initialize one with a terminating yield.
if (!ifOp.elseBlock()) {
ifOp.elseRegion().emplaceBlock();
ifOp.getElseRegion().emplaceBlock();

b.setInsertionPointToStart(ifOp.elseBlock());
b.create<scf::YieldOp>(loc);
Expand Down Expand Up @@ -212,7 +212,7 @@ static LogicalResult liftStoreOps(scf::IfOp ifOp, FuncOp f, OpBuilder &b) {
SmallVector<Type> resultTypes(ifOp.getResultTypes());
resultTypes.append(storeTypes);

scf::IfOp newIfOp = b.create<scf::IfOp>(loc, resultTypes, ifOp.condition(),
scf::IfOp newIfOp = b.create<scf::IfOp>(loc, resultTypes, ifOp.getCondition(),
/*withElseRegion=*/true);

auto cloneBlock = [&](Block *target, Block *source) {
Expand Down Expand Up @@ -334,7 +334,7 @@ static bool foldSCFIf(scf::IfOp ifOp, FuncOp f, OpBuilder &b) {
cloneAfter(ifOp.elseBlock(), elseResults);

for (auto ifResult : enumerate(ifOp.getResults())) {
Value newResult = b.create<SelectOp>(loc, ifOp.condition(),
Value newResult = b.create<SelectOp>(loc, ifOp.getCondition(),
thenResults[ifResult.index()],
elseResults[ifResult.index()]);
ifResult.value().replaceAllUsesWith(newResult);
Expand Down
2 changes: 1 addition & 1 deletion lib/Transforms/ScopStmtOpt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ static CallOp findCallOpForFunc(ModuleOp m, FuncOp func) {

// Find the corresponding call op.
m.walk([&](CallOp callOp) {
if (callOp.callee() == func.getName()) {
if (callOp.getCallee() == func.getName()) {
// TODO: implement the support for multiple calls.
assert(!call && "There should be only one call to the target function.");
call = callOp;
Expand Down
2 changes: 1 addition & 1 deletion polygeist-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
daeb952678b1d46c867c94ed2f20d78e1a3d5ec5
e5b8b83312c7a5f6fd94ea1a2cda87e54c4451fd

0 comments on commit b2f5469

Please sign in to comment.