@@ -87,8 +87,8 @@ struct CondBranchOpInterface
8787 destOperands.getAsOperandRange (), toRetain);
8888 SmallVector<Value> adaptedConditions (
8989 llvm::map_range (conditions, conditionModifier));
90- auto deallocOp = builder. create < bufferization::DeallocOp> (
91- condBr.getLoc (), memrefs, adaptedConditions, toRetain);
90+ auto deallocOp = bufferization::DeallocOp::create (
91+ builder, condBr.getLoc (), memrefs, adaptedConditions, toRetain);
9292 state.resetOwnerships (deallocOp.getRetained (), condBr->getBlock ());
9393 for (auto [retained, ownership] : llvm::zip (
9494 deallocOp.getRetained (), deallocOp.getUpdatedConditions ())) {
@@ -115,18 +115,19 @@ struct CondBranchOpInterface
115115 DeallocOp thenTakenDeallocOp = insertDeallocForBranch (
116116 condBr.getTrueDest (), condBr.getTrueDestOperandsMutable (),
117117 [&](Value cond) {
118- return builder. create < arith::AndIOp>( condBr.getLoc (), cond,
119- condBr.getCondition ());
118+ return arith::AndIOp::create (builder, condBr.getLoc (), cond,
119+ condBr.getCondition ());
120120 },
121121 thenMapping);
122122 DeallocOp elseTakenDeallocOp = insertDeallocForBranch (
123123 condBr.getFalseDest (), condBr.getFalseDestOperandsMutable (),
124124 [&](Value cond) {
125- Value trueVal = builder.create <arith::ConstantOp>(
126- condBr.getLoc (), builder.getBoolAttr (true ));
127- Value negation = builder.create <arith::XOrIOp>(
128- condBr.getLoc (), trueVal, condBr.getCondition ());
129- return builder.create <arith::AndIOp>(condBr.getLoc (), cond, negation);
125+ Value trueVal = arith::ConstantOp::create (builder, condBr.getLoc (),
126+ builder.getBoolAttr (true ));
127+ Value negation = arith::XOrIOp::create (
128+ builder, condBr.getLoc (), trueVal, condBr.getCondition ());
129+ return arith::AndIOp::create (builder, condBr.getLoc (), cond,
130+ negation);
130131 },
131132 elseMapping);
132133
@@ -143,9 +144,9 @@ struct CondBranchOpInterface
143144
144145 for (Value retained : commonValues) {
145146 state.resetOwnerships (retained, condBr->getBlock ());
146- Value combinedOwnership = builder. create < arith::SelectOp> (
147- condBr.getLoc (), condBr.getCondition (), thenMapping[retained] ,
148- elseMapping[retained]);
147+ Value combinedOwnership = arith::SelectOp::create (
148+ builder, condBr.getLoc (), condBr.getCondition (),
149+ thenMapping[retained], elseMapping[retained]);
149150 state.updateOwnership (retained, combinedOwnership, condBr->getBlock ());
150151 }
151152
0 commit comments