diff options
Diffstat (limited to 'flang/lib/Optimizer/Builder/HLFIRTools.cpp')
| -rw-r--r-- | flang/lib/Optimizer/Builder/HLFIRTools.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/flang/lib/Optimizer/Builder/HLFIRTools.cpp b/flang/lib/Optimizer/Builder/HLFIRTools.cpp index 086dd6671160..f93eaf7ba90b 100644 --- a/flang/lib/Optimizer/Builder/HLFIRTools.cpp +++ b/flang/lib/Optimizer/Builder/HLFIRTools.cpp @@ -249,6 +249,7 @@ fir::FortranVariableOpInterface hlfir::genDeclare(mlir::Location loc, fir::FirOpBuilder &builder, const fir::ExtendedValue &exv, llvm::StringRef name, fir::FortranVariableFlagsAttr flags, mlir::Value dummyScope, + mlir::Value storage, std::uint64_t storageOffset, cuf::DataAttributeAttr dataAttr) { mlir::Value base = fir::getBase(exv); @@ -278,9 +279,9 @@ hlfir::genDeclare(mlir::Location loc, fir::FirOpBuilder &builder, box.nonDeferredLenParams().end()); }, [](const auto &) {}); - auto declareOp = - hlfir::DeclareOp::create(builder, loc, base, name, shapeOrShift, - lenParams, dummyScope, flags, dataAttr); + auto declareOp = hlfir::DeclareOp::create( + builder, loc, base, name, shapeOrShift, lenParams, dummyScope, storage, + storageOffset, flags, dataAttr); return mlir::cast<fir::FortranVariableOpInterface>(declareOp.getOperation()); } @@ -1372,7 +1373,8 @@ hlfir::createTempFromMold(mlir::Location loc, fir::FirOpBuilder &builder, fir::FortranVariableFlagsAttr attrs) -> mlir::Value { auto declareOp = hlfir::DeclareOp::create(builder, loc, memref, name, shape, typeParams, - /*dummy_scope=*/nullptr, attrs); + /*dummy_scope=*/nullptr, /*storage=*/nullptr, + /*storage_offset=*/0, attrs); return declareOp.getBase(); }; @@ -1409,7 +1411,8 @@ hlfir::Entity hlfir::createStackTempFromMold(mlir::Location loc, } auto declareOp = hlfir::DeclareOp::create(builder, loc, alloc, tmpName, shape, lenParams, - /*dummy_scope=*/nullptr, declAttrs); + /*dummy_scope=*/nullptr, /*storage=*/nullptr, + /*storage_offset=*/0, declAttrs); return hlfir::Entity{declareOp.getBase()}; } @@ -1426,8 +1429,7 @@ hlfir::convertCharacterKind(mlir::Location loc, fir::FirOpBuilder &builder, return hlfir::EntityWithAttributes{hlfir::DeclareOp::create( builder, loc, res.getAddr(), ".temp.kindconvert", /*shape=*/nullptr, - /*typeparams=*/mlir::ValueRange{res.getLen()}, - /*dummy_scope=*/nullptr, fir::FortranVariableFlagsAttr{})}; + /*typeparams=*/mlir::ValueRange{res.getLen()})}; } std::pair<hlfir::Entity, std::optional<hlfir::CleanupFunction>> @@ -1499,8 +1501,7 @@ hlfir::genTypeAndKindConvert(mlir::Location loc, fir::FirOpBuilder &builder, fir::ShapeShiftOp::create(builder, loc, shapeShiftType, lbAndExtents); auto declareOp = hlfir::DeclareOp::create( builder, loc, associate.getFirBase(), *associate.getUniqName(), - shapeShift, associate.getTypeparams(), /*dummy_scope=*/nullptr, - /*flags=*/fir::FortranVariableFlagsAttr{}); + shapeShift, associate.getTypeparams()); hlfir::Entity castWithLbounds = mlir::cast<fir::FortranVariableOpInterface>(declareOp.getOperation()); fir::FirOpBuilder *bldr = &builder; @@ -1538,9 +1539,8 @@ std::pair<hlfir::Entity, bool> hlfir::computeEvaluateOpInNewTemp( extents, typeParams); mlir::Value innerMemory = evalInMem.getMemory(); temp = builder.createConvert(loc, innerMemory.getType(), temp); - auto declareOp = hlfir::DeclareOp::create( - builder, loc, temp, tmpName, shape, typeParams, - /*dummy_scope=*/nullptr, fir::FortranVariableFlagsAttr{}); + auto declareOp = + hlfir::DeclareOp::create(builder, loc, temp, tmpName, shape, typeParams); computeEvaluateOpIn(loc, builder, evalInMem, declareOp.getOriginalBase()); return {hlfir::Entity{declareOp.getBase()}, /*heapAllocated=*/heapAllocated}; } |
