@@ -87,8 +87,8 @@ struct CondBranchOpInterface
87
87
destOperands.getAsOperandRange (), toRetain);
88
88
SmallVector<Value> adaptedConditions (
89
89
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);
92
92
state.resetOwnerships (deallocOp.getRetained (), condBr->getBlock ());
93
93
for (auto [retained, ownership] : llvm::zip (
94
94
deallocOp.getRetained (), deallocOp.getUpdatedConditions ())) {
@@ -115,18 +115,19 @@ struct CondBranchOpInterface
115
115
DeallocOp thenTakenDeallocOp = insertDeallocForBranch (
116
116
condBr.getTrueDest (), condBr.getTrueDestOperandsMutable (),
117
117
[&](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 ());
120
120
},
121
121
thenMapping);
122
122
DeallocOp elseTakenDeallocOp = insertDeallocForBranch (
123
123
condBr.getFalseDest (), condBr.getFalseDestOperandsMutable (),
124
124
[&](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);
130
131
},
131
132
elseMapping);
132
133
@@ -143,9 +144,9 @@ struct CondBranchOpInterface
143
144
144
145
for (Value retained : commonValues) {
145
146
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]);
149
150
state.updateOwnership (retained, combinedOwnership, condBr->getBlock ());
150
151
}
151
152
0 commit comments