[flang-commits] [flang] 4a746e5 - [NFC][flang] Remove unused `converter` parameter. (#96854)
via flang-commits
flang-commits at lists.llvm.org
Thu Jun 27 20:21:04 PDT 2024
Author: Kareem Ergawy
Date: 2024-06-28T05:20:59+02:00
New Revision: 4a746e50b14f252b40e03860562636dd1ded8044
URL: https://github.com/llvm/llvm-project/commit/4a746e50b14f252b40e03860562636dd1ded8044
DIFF: https://github.com/llvm/llvm-project/commit/4a746e50b14f252b40e03860562636dd1ded8044.diff
LOG: [NFC][flang] Remove unused `converter` parameter. (#96854)
Removes an unused parameter in 2 utils that generate bounds ops.
Added:
Modified:
flang/lib/Lower/DirectivesCommon.h
flang/lib/Lower/OpenMP/OpenMP.cpp
Removed:
################################################################################
diff --git a/flang/lib/Lower/DirectivesCommon.h b/flang/lib/Lower/DirectivesCommon.h
index f0af5f982c14f..e8d6bb591e361 100644
--- a/flang/lib/Lower/DirectivesCommon.h
+++ b/flang/lib/Lower/DirectivesCommon.h
@@ -718,7 +718,6 @@ gatherBoundsOrBoundValues(fir::FirOpBuilder &builder, mlir::Location loc,
template <typename BoundsOp, typename BoundsType>
llvm::SmallVector<mlir::Value>
genBoundsOpsFromBox(fir::FirOpBuilder &builder, mlir::Location loc,
- Fortran::lower::AbstractConverter &converter,
fir::ExtendedValue dataExv,
Fortran::lower::AddrAndBoundsInfo &info) {
llvm::SmallVector<mlir::Value> bounds;
@@ -778,7 +777,6 @@ genBoundsOpsFromBox(fir::FirOpBuilder &builder, mlir::Location loc,
template <typename BoundsOp, typename BoundsType>
llvm::SmallVector<mlir::Value>
genBaseBoundsOps(fir::FirOpBuilder &builder, mlir::Location loc,
- Fortran::lower::AbstractConverter &converter,
fir::ExtendedValue dataExv, bool isAssumedSize) {
mlir::Type idxTy = builder.getIndexType();
mlir::Type boundTy = builder.getType<BoundsType>();
@@ -1163,7 +1161,7 @@ AddrAndBoundsInfo gatherDataOperandAddrAndBounds(
info.rawInput = info.addr;
if (mlir::isa<fir::SequenceType>(fir::unwrapRefType(info.addr.getType())))
bounds = genBaseBoundsOps<BoundsOp, BoundsType>(builder, operandLocation,
- converter, compExv,
+ compExv,
/*isAssumedSize=*/false);
asFortran << designator.AsFortran();
@@ -1189,7 +1187,7 @@ AddrAndBoundsInfo gatherDataOperandAddrAndBounds(
info.addr = boxAddrOp.getVal();
info.rawInput = info.addr;
bounds = genBoundsOpsFromBox<BoundsOp, BoundsType>(
- builder, operandLocation, converter, compExv, info);
+ builder, operandLocation, compExv, info);
}
} else {
if (detail::getRef<evaluate::ArrayRef>(designator)) {
@@ -1206,13 +1204,13 @@ AddrAndBoundsInfo gatherDataOperandAddrAndBounds(
if (mlir::isa<fir::BaseBoxType>(
fir::unwrapRefType(info.addr.getType()))) {
bounds = genBoundsOpsFromBox<BoundsOp, BoundsType>(
- builder, operandLocation, converter, dataExv, info);
+ builder, operandLocation, dataExv, info);
}
bool dataExvIsAssumedSize =
Fortran::semantics::IsAssumedSizeArray(symRef->get().GetUltimate());
if (mlir::isa<fir::SequenceType>(fir::unwrapRefType(info.addr.getType())))
bounds = genBaseBoundsOps<BoundsOp, BoundsType>(
- builder, operandLocation, converter, dataExv, dataExvIsAssumedSize);
+ builder, operandLocation, dataExv, dataExvIsAssumedSize);
asFortran << symRef->get().name().ToString();
} else { // Unsupported
llvm::report_fatal_error("Unsupported type of OpenACC operand");
diff --git a/flang/lib/Lower/OpenMP/OpenMP.cpp b/flang/lib/Lower/OpenMP/OpenMP.cpp
index 0b33c2a62d388..22c41fce31723 100644
--- a/flang/lib/Lower/OpenMP/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP/OpenMP.cpp
@@ -1738,15 +1738,14 @@ genTargetOp(lower::AbstractConverter &converter, lower::SymMap &symTable,
fir::unwrapRefType(info.addr.getType())))
bounds = lower::genBoundsOpsFromBox<mlir::omp::MapBoundsOp,
mlir::omp::MapBoundsType>(
- firOpBuilder, converter.getCurrentLocation(), converter, dataExv,
- info);
+ firOpBuilder, converter.getCurrentLocation(), dataExv, info);
if (mlir::isa<fir::SequenceType>(
fir::unwrapRefType(info.addr.getType()))) {
bool dataExvIsAssumedSize =
semantics::IsAssumedSizeArray(sym.GetUltimate());
bounds = lower::genBaseBoundsOps<mlir::omp::MapBoundsOp,
mlir::omp::MapBoundsType>(
- firOpBuilder, converter.getCurrentLocation(), converter, dataExv,
+ firOpBuilder, converter.getCurrentLocation(), dataExv,
dataExvIsAssumedSize);
}
More information about the flang-commits
mailing list