Skip to content

Commit

Permalink
[flang][openacc/mp][NFC] Remove unused baseAddr argument (#75537)
Browse files Browse the repository at this point in the history
`baseAddr` is not used in `genBaseBoundsOps` just remove it.
  • Loading branch information
clementval committed Dec 15, 2023
1 parent ceb196d commit 43cb8f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions flang/lib/Lower/DirectivesCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ template <typename BoundsOp, typename BoundsType>
llvm::SmallVector<mlir::Value>
genBaseBoundsOps(fir::FirOpBuilder &builder, mlir::Location loc,
Fortran::lower::AbstractConverter &converter,
fir::ExtendedValue dataExv, mlir::Value baseAddr) {
fir::ExtendedValue dataExv) {
mlir::Type idxTy = builder.getIndexType();
mlir::Type boundTy = builder.getType<BoundsType>();
llvm::SmallVector<mlir::Value> bounds;
Expand Down Expand Up @@ -899,7 +899,7 @@ mlir::Value gatherDataOperandAddrAndBounds(
if (fir::unwrapRefType(baseAddr.getType())
.isa<fir::SequenceType>())
bounds = genBaseBoundsOps<BoundsOp, BoundsType>(
builder, operandLocation, converter, compExv, baseAddr);
builder, operandLocation, converter, compExv);
asFortran << (*expr).AsFortran();

if (auto loadOp = mlir::dyn_cast_or_null<fir::LoadOp>(
Expand Down Expand Up @@ -949,7 +949,7 @@ mlir::Value gatherDataOperandAddrAndBounds(
if (fir::unwrapRefType(baseAddr.getType())
.isa<fir::SequenceType>())
bounds = genBaseBoundsOps<BoundsOp, BoundsType>(
builder, operandLocation, converter, dataExv, baseAddr);
builder, operandLocation, converter, dataExv);
asFortran << name.ToString();
} else { // Unsupported
llvm::report_fatal_error(
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Lower/OpenMP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2668,7 +2668,7 @@ genTargetOp(Fortran::lower::AbstractConverter &converter,
bounds = Fortran::lower::genBaseBoundsOps<mlir::omp::DataBoundsOp,
mlir::omp::DataBoundsType>(
converter.getFirOpBuilder(), converter.getCurrentLocation(),
converter, dataExv, baseAddr);
converter, dataExv);

llvm::omp::OpenMPOffloadMappingFlags mapFlag =
llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_IMPLICIT;
Expand Down

0 comments on commit 43cb8f0

Please sign in to comment.