@@ -28,7 +28,7 @@ fir::factory::Counter::Counter(mlir::Location loc, fir::FirOpBuilder &builder,
2828 one = builder.createIntegerConstant (loc, type, 1 );
2929 if (canCountThroughLoops) {
3030 index = builder.createTemporary (loc, type);
31- builder. create < fir::StoreOp>( loc, initialValue, index);
31+ fir::StoreOp::create (builder, loc, initialValue, index);
3232 } else {
3333 index = initialValue;
3434 }
@@ -38,21 +38,21 @@ mlir::Value
3838fir::factory::Counter::getAndIncrementIndex (mlir::Location loc,
3939 fir::FirOpBuilder &builder) {
4040 if (canCountThroughLoops) {
41- mlir::Value indexValue = builder. create < fir::LoadOp>( loc, index);
41+ mlir::Value indexValue = fir::LoadOp::create (builder, loc, index);
4242 mlir::Value newValue =
43- builder. create < mlir::arith::AddIOp>( loc, indexValue, one);
44- builder. create < fir::StoreOp>( loc, newValue, index);
43+ mlir::arith::AddIOp::create (builder, loc, indexValue, one);
44+ fir::StoreOp::create (builder, loc, newValue, index);
4545 return indexValue;
4646 }
4747 mlir::Value indexValue = index;
48- index = builder. create < mlir::arith::AddIOp>( loc, indexValue, one);
48+ index = mlir::arith::AddIOp::create (builder, loc, indexValue, one);
4949 return indexValue;
5050}
5151
5252void fir::factory::Counter::reset (mlir::Location loc,
5353 fir::FirOpBuilder &builder) {
5454 if (canCountThroughLoops)
55- builder. create < fir::StoreOp>( loc, initialValue, index);
55+ fir::StoreOp::create (builder, loc, initialValue, index);
5656 else
5757 index = initialValue;
5858}
@@ -103,7 +103,7 @@ void fir::factory::HomogeneousScalarStack::pushValue(mlir::Location loc,
103103 // below should not get hit but is added as a remainder/safety.
104104 if (!entity.hasIntrinsicType ())
105105 TODO (loc, " creating inlined temporary stack for derived types" );
106- builder. create < hlfir::AssignOp>( loc, value, tempElement);
106+ hlfir::AssignOp::create (builder, loc, value, tempElement);
107107}
108108
109109void fir::factory::HomogeneousScalarStack::resetFetchPosition (
@@ -125,14 +125,14 @@ void fir::factory::HomogeneousScalarStack::destroy(mlir::Location loc,
125125 if (allocateOnHeap) {
126126 auto declare = temp.getDefiningOp <hlfir::DeclareOp>();
127127 assert (declare && " temp must have been declared" );
128- builder. create < fir::FreeMemOp>( loc, declare.getMemref ());
128+ fir::FreeMemOp::create (builder, loc, declare.getMemref ());
129129 }
130130}
131131
132132hlfir::Entity fir::factory::HomogeneousScalarStack::moveStackAsArrayExpr (
133133 mlir::Location loc, fir::FirOpBuilder &builder) {
134134 mlir::Value mustFree = builder.createBool (loc, allocateOnHeap);
135- auto hlfirExpr = builder. create < hlfir::AsExprOp>( loc, temp, mustFree);
135+ auto hlfirExpr = hlfir::AsExprOp::create (builder, loc, temp, mustFree);
136136 return hlfir::Entity{hlfirExpr};
137137}
138138
@@ -147,14 +147,14 @@ fir::factory::SimpleCopy::SimpleCopy(mlir::Location loc,
147147 // Use hlfir.as_expr and hlfir.associate to create a copy and leave
148148 // bufferization deals with how best to make the copy.
149149 if (source.isVariable ())
150- source = hlfir::Entity{builder. create < hlfir::AsExprOp>( loc, source)};
150+ source = hlfir::Entity{hlfir::AsExprOp::create (builder, loc, source)};
151151 copy = hlfir::genAssociateExpr (loc, builder, source,
152152 source.getFortranElementType (), tempName);
153153}
154154
155155void fir::factory::SimpleCopy::destroy (mlir::Location loc,
156156 fir::FirOpBuilder &builder) {
157- builder. create < hlfir::EndAssociateOp>( loc, copy);
157+ hlfir::EndAssociateOp::create (builder, loc, copy);
158158}
159159
160160// ===----------------------------------------------------------------------===//
@@ -279,7 +279,7 @@ mlir::Value fir::factory::AnyVariableStack::fetch(mlir::Location loc,
279279 mlir::Value indexValue = counter.getAndIncrementIndex (loc, builder);
280280 fir::runtime::genDescriptorAt (loc, builder, opaquePtr, indexValue,
281281 retValueBox);
282- hlfir::Entity retBox{builder. create < fir::LoadOp>( loc, retValueBox)};
282+ hlfir::Entity retBox{fir::LoadOp::create (builder, loc, retValueBox)};
283283 // The runtime always tracks variable as address, but the form of the variable
284284 // that was saved may be different (raw address, fir.boxchar), ensure
285285 // the returned variable has the same form of the one that was saved.
@@ -326,7 +326,7 @@ void fir::factory::AnyVectorSubscriptStack::pushShape(
326326 hlfir::getFortranElementOrSequenceType (*boxType));
327327 mlir::Value null = builder.createNullConstant (loc, refType);
328328 mlir::Value descriptor =
329- builder. create < fir::EmboxOp>( loc, *boxType, null, shape);
329+ fir::EmboxOp::create (builder, loc, *boxType, null, shape);
330330 shapeTemp->pushValue (loc, builder, descriptor);
331331 return ;
332332 }
@@ -372,7 +372,7 @@ void fir::factory::AnyAddressStack::pushValue(mlir::Location loc,
372372 mlir::Value cast = variable;
373373 if (auto boxProcType = llvm::dyn_cast<fir::BoxProcType>(variable.getType ())) {
374374 cast =
375- builder. create < fir::BoxAddrOp>( loc, boxProcType.getEleTy (), variable);
375+ fir::BoxAddrOp::create (builder, loc, boxProcType.getEleTy (), variable);
376376 }
377377 cast = builder.createConvert (loc, builder.getIntPtrType (), cast);
378378 static_cast <AnyValueStack *>(this )->pushValue (loc, builder, cast);
@@ -383,7 +383,7 @@ mlir::Value fir::factory::AnyAddressStack::fetch(mlir::Location loc,
383383 mlir::Value addr = static_cast <AnyValueStack *>(this )->fetch (loc, builder);
384384 if (auto boxProcType = llvm::dyn_cast<fir::BoxProcType>(addressType)) {
385385 mlir::Value cast = builder.createConvert (loc, boxProcType.getEleTy (), addr);
386- return builder. create < fir::EmboxProcOp>( loc, boxProcType, cast);
386+ return fir::EmboxProcOp::create (builder, loc, boxProcType, cast);
387387 }
388388 return builder.createConvert (loc, addressType, addr);
389389}
0 commit comments