diff --git a/flang/lib/Optimizer/CodeGen/CodeGen.cpp b/flang/lib/Optimizer/CodeGen/CodeGen.cpp index 3bbc32f23bcfa..2fe726cbb00e8 100644 --- a/flang/lib/Optimizer/CodeGen/CodeGen.cpp +++ b/flang/lib/Optimizer/CodeGen/CodeGen.cpp @@ -2239,18 +2239,17 @@ struct XReboxOpConversion : public EmboxCommonConversion { getSubcomponentIndices(rebox, rebox.getBox(), operands, fieldIndices); if (!rebox.getSubstr().empty()) substringOffset = operands[rebox.getSubstrOperandIndex()]; - base = - genBoxOffsetGep(rewriter, loc, base, llvmBaseObjectType, zero, - /*cstInteriorIndices=*/llvm::ArrayRef(), - fieldIndices, substringOffset); + base = genBoxOffsetGep(rewriter, loc, base, llvmBaseObjectType, zero, + /*cstInteriorIndices=*/{}, fieldIndices, + substringOffset); } if (rebox.getSlice().empty()) // The array section is of the form array[%component][substring], keep // the input array extents and strides. return finalizeRebox(rebox, adaptor, destBoxTy, dest, base, - /*lbounds*/ llvm::ArrayRef(), - inputExtents, inputStrides, rewriter); + /*lbounds*/ {}, inputExtents, inputStrides, + rewriter); // The slice is of the form array(i:j:k)[%component]. Compute new extents // and strides. @@ -2298,8 +2297,8 @@ struct XReboxOpConversion : public EmboxCommonConversion { } } return finalizeRebox(rebox, adaptor, destBoxTy, dest, base, - /*lbounds*/ llvm::ArrayRef(), - slicedExtents, slicedStrides, rewriter); + /*lbounds*/ {}, slicedExtents, slicedStrides, + rewriter); } /// Apply a new shape to the data described by a box given the base address, @@ -3397,8 +3396,7 @@ static void genBrOp(A caseOp, mlir::Block *dest, std::optional destOps, if (destOps) rewriter.replaceOpWithNewOp(caseOp, *destOps, dest); else - rewriter.replaceOpWithNewOp( - caseOp, llvm::ArrayRef(), dest); + rewriter.replaceOpWithNewOp(caseOp, B{}, dest); } static void genCaseLadderStep(mlir::Location loc, mlir::Value cmp, diff --git a/flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp b/flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp index eca2c7f7c942f..b60ac11c7795a 100644 --- a/flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp +++ b/flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp @@ -107,9 +107,8 @@ class EmboxConversion : public mlir::OpRewritePattern { shapeOpers.push_back(extVal); } auto xbox = rewriter.create( - loc, embox.getType(), embox.getMemref(), shapeOpers, - llvm::ArrayRef(), llvm::ArrayRef(), - llvm::ArrayRef(), llvm::ArrayRef(), + loc, embox.getType(), embox.getMemref(), shapeOpers, mlir::ValueRange{}, + mlir::ValueRange{}, mlir::ValueRange{}, mlir::ValueRange{}, embox.getTypeparams(), embox.getSourceBox(), embox.getAllocatorIdxAttr()); LLVM_DEBUG(llvm::dbgs() << "rewriting " << embox << " to " << xbox << '\n');