@@ -54,7 +54,7 @@ void OpenACCRecipeBuilderBase::makeAllocaCopy(mlir::Location loc,
5454 auto itr =
5555 cir::AllocaOp::create (builder, loc, itrPtrTy, itrTy, " itr" , itrAlign);
5656 cir::ConstantOp constZero = builder.getConstInt (loc, itrTy, 0 );
57- builder.CIRBaseBuilderTy ::createStore (loc, constZero. getResult () , itr);
57+ builder.CIRBaseBuilderTy ::createStore (loc, constZero, itr);
5858 builder.createFor (
5959 loc,
6060 /* condBuilder=*/
@@ -64,26 +64,25 @@ void OpenACCRecipeBuilderBase::makeAllocaCopy(mlir::Location loc,
6464 // way we can just use this loop with a constant bounds instead of a
6565 // separate code path.
6666 if (!numEltsToCopy)
67- numEltsToCopy = builder.getConstInt (loc, itrTy, 1 ). getResult () ;
67+ numEltsToCopy = builder.getConstInt (loc, itrTy, 1 );
6868
6969 auto loadCur = cir::LoadOp::create (builder, loc, {itr});
70- auto cmp = builder.createCompare (loc, cir::CmpOpKind::lt,
71- loadCur. getResult (), numEltsToCopy);
70+ auto cmp = builder.createCompare (loc, cir::CmpOpKind::lt, loadCur,
71+ numEltsToCopy);
7272 builder.createCondition (cmp);
7373 },
7474 /* bodyBuilder=*/
7575 [&](mlir::OpBuilder &b, mlir::Location loc) {
7676 // destAlloca[itr] = srcAlloca[offsetPerSubArray * itr];
7777 auto loadCur = cir::LoadOp::create (builder, loc, {itr});
78- auto srcOffset =
79- builder.createMul (loc, offsetPerSubarray, loadCur.getResult ());
78+ auto srcOffset = builder.createMul (loc, offsetPerSubarray, loadCur);
8079
8180 auto ptrToOffsetIntoSrc = cir::PtrStrideOp::create (
8281 builder, loc, copyType, srcAlloca, srcOffset);
8382
8483 auto offsetIntoDecayDest = cir::PtrStrideOp::create (
8584 builder, loc, builder.getPointerTo (copyType), destAlloca,
86- loadCur. getResult () );
85+ loadCur);
8786
8887 builder.CIRBaseBuilderTy ::createStore (loc, ptrToOffsetIntoSrc,
8988 offsetIntoDecayDest);
@@ -93,10 +92,9 @@ void OpenACCRecipeBuilderBase::makeAllocaCopy(mlir::Location loc,
9392 [&](mlir::OpBuilder &b, mlir::Location loc) {
9493 // Simple increment of the iterator.
9594 auto load = cir::LoadOp::create (builder, loc, {itr});
96- auto inc =
97- cir::UnaryOp::create (builder, loc, load.getType (),
98- cir::UnaryOpKind::Inc, load.getResult ());
99- builder.CIRBaseBuilderTy ::createStore (loc, inc.getResult (), itr);
95+ auto inc = cir::UnaryOp::create (builder, loc, load.getType (),
96+ cir::UnaryOpKind::Inc, load);
97+ builder.CIRBaseBuilderTy ::createStore (loc, inc, itr);
10098 builder.createYield (loc);
10199 });
102100 };
@@ -212,9 +210,9 @@ mlir::Value OpenACCRecipeBuilderBase::makeBoundsAlloca(
212210 // a zero-offset stride on the last alloca to decay it down an array
213211 // level.
214212 cir::ConstantOp constZero = builder.getConstInt (loc, itrTy, 0 );
215- lastAlloca = builder.getArrayElement (
216- loc, loc, lastAlloca, cgf.convertType (resultType),
217- constZero. getResult () , /* shouldDecay=*/ true );
213+ lastAlloca = builder.getArrayElement (loc, loc, lastAlloca,
214+ cgf.convertType (resultType),
215+ constZero, /* shouldDecay=*/ true );
218216 }
219217
220218 cumulativeElts = eltsToAlloca;
0 commit comments