@@ -251,8 +251,8 @@ void CIRGenFunction::emitStoreThroughLValue(RValue src, LValue dst,
251251 const mlir::Location loc = dst.getVectorPointer ().getLoc ();
252252 const mlir::Value vector =
253253 builder.createLoad (loc, dst.getVectorAddress ());
254- const mlir::Value newVector = builder. create < cir::VecInsertOp> (
255- loc, vector, src.getValue (), dst.getVectorIdx ());
254+ const mlir::Value newVector = cir::VecInsertOp::create (
255+ builder, loc, vector, src.getValue (), dst.getVectorIdx ());
256256 builder.createStore (loc, newVector, dst.getVectorAddress ());
257257 return ;
258258 }
@@ -615,8 +615,8 @@ RValue CIRGenFunction::emitLoadOfLValue(LValue lv, SourceLocation loc) {
615615 if (lv.isVectorElt ()) {
616616 const mlir::Value load =
617617 builder.createLoad (getLoc (loc), lv.getVectorAddress ());
618- return RValue::get (builder. create < cir::VecExtractOp>( getLoc (loc), load,
619- lv.getVectorIdx ()));
618+ return RValue::get (cir::VecExtractOp::create (builder, getLoc (loc), load,
619+ lv.getVectorIdx ()));
620620 }
621621
622622 cgm.errorNYI (loc, " emitLoadOfLValue" );
@@ -1685,8 +1685,8 @@ CIRGenCallee CIRGenFunction::emitDirectCallee(const GlobalDecl &gd) {
16851685 mlir::OpBuilder::InsertionGuard guard (builder);
16861686 builder.setInsertionPointToStart (cgm.getModule ().getBody ());
16871687
1688- clone = builder. create < cir::FuncOp>( calleeFunc.getLoc (), fdInlineName,
1689- calleeFunc.getFunctionType ());
1688+ clone = cir::FuncOp::create (builder, calleeFunc.getLoc (), fdInlineName,
1689+ calleeFunc.getFunctionType ());
16901690 clone.setLinkageAttr (cir::GlobalLinkageKindAttr::get (
16911691 &cgm.getMLIRContext (), cir::GlobalLinkageKind::InternalLinkage));
16921692 clone.setSymVisibility (" private" );
@@ -1778,8 +1778,8 @@ RValue CIRGenFunction::emitCall(clang::QualType calleeTy,
17781778 mlir::Operation *fn = callee.getFunctionPointer ();
17791779 mlir::Value addr;
17801780 if (auto funcOp = mlir::dyn_cast<cir::FuncOp>(fn)) {
1781- addr = builder. create < cir::GetGlobalOp> (
1782- getLoc (e->getSourceRange ()),
1781+ addr = cir::GetGlobalOp::create (
1782+ builder, getLoc (e->getSourceRange ()),
17831783 cir::PointerType::get (funcOp.getFunctionType ()), funcOp.getSymName ());
17841784 } else {
17851785 addr = fn->getResult (0 );
@@ -1996,9 +1996,9 @@ cir::IfOp CIRGenFunction::emitIfOnBoolExpr(
19961996
19971997 // Emit the code with the fully general case.
19981998 mlir::Value condV = emitOpOnBoolExpr (loc, cond);
1999- return builder. create < cir::IfOp>( loc, condV, elseLoc.has_value (),
2000- /* thenBuilder=*/ thenBuilder,
2001- /* elseBuilder=*/ elseBuilder);
1999+ return cir::IfOp::create (builder, loc, condV, elseLoc.has_value (),
2000+ /* thenBuilder=*/ thenBuilder,
2001+ /* elseBuilder=*/ elseBuilder);
20022002}
20032003
20042004// / TODO(cir): see EmitBranchOnBoolExpr for extra ideas).
@@ -2025,12 +2025,12 @@ mlir::Value CIRGenFunction::emitOpOnBoolExpr(mlir::Location loc,
20252025 loc, condV, /* thenBuilder=*/
20262026 [this , trueExpr](mlir::OpBuilder &b, mlir::Location loc) {
20272027 mlir::Value lhs = emitScalarExpr (trueExpr);
2028- b. create < cir::YieldOp>( loc, lhs);
2028+ cir::YieldOp::create (b, loc, lhs);
20292029 },
20302030 /* elseBuilder=*/
20312031 [this , falseExpr](mlir::OpBuilder &b, mlir::Location loc) {
20322032 mlir::Value rhs = emitScalarExpr (falseExpr);
2033- b. create < cir::YieldOp>( loc, rhs);
2033+ cir::YieldOp::create (b, loc, rhs);
20342034 })
20352035 .getResult ();
20362036
@@ -2211,8 +2211,8 @@ Address CIRGenFunction::emitLoadOfReference(LValue refLVal, mlir::Location loc,
22112211 cgm.errorNYI (loc, " load of volatile reference" );
22122212
22132213 cir::LoadOp load =
2214- builder. create < cir::LoadOp>( loc, refLVal.getAddress ().getElementType (),
2215- refLVal.getAddress ().getPointer ());
2214+ cir::LoadOp::create (builder, loc, refLVal.getAddress ().getElementType (),
2215+ refLVal.getAddress ().getPointer ());
22162216
22172217 assert (!cir::MissingFeatures::opTBAA ());
22182218
0 commit comments