[flang-commits] [flang] [flang][openacc/mp][NFC] Remove unused baseAddr argument (PR #75537)

via flang-commits flang-commits at lists.llvm.org
Thu Dec 14 14:00:02 PST 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-flang-fir-hlfir

Author: Valentin Clement (バレンタイン クレメン) (clementval)

<details>
<summary>Changes</summary>

`baseAddr` is not used in `genBaseBoundsOps` just remove it. 

---
Full diff: https://github.com/llvm/llvm-project/pull/75537.diff


2 Files Affected:

- (modified) flang/lib/Lower/DirectivesCommon.h (+3-3) 
- (modified) flang/lib/Lower/OpenMP.cpp (+1-1) 


``````````diff
diff --git a/flang/lib/Lower/DirectivesCommon.h b/flang/lib/Lower/DirectivesCommon.h
index 88a8916663df75..5168fb902df923 100644
--- a/flang/lib/Lower/DirectivesCommon.h
+++ b/flang/lib/Lower/DirectivesCommon.h
@@ -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;
@@ -899,7 +899,7 @@ mlir::Value gatherDataOperandAddrAndBounds(
                 if (fir::unwrapRefType(baseAddr.getType())
                         .isa<fir::SequenceType>())
                   bounds = genBaseBoundsOps<BoundsType, BoundsOp>(
-                      builder, operandLocation, converter, compExv, baseAddr);
+                      builder, operandLocation, converter, compExv);
                 asFortran << (*expr).AsFortran();
 
                 if (auto loadOp = mlir::dyn_cast_or_null<fir::LoadOp>(
@@ -949,7 +949,7 @@ mlir::Value gatherDataOperandAddrAndBounds(
                   if (fir::unwrapRefType(baseAddr.getType())
                           .isa<fir::SequenceType>())
                     bounds = genBaseBoundsOps<BoundsType, BoundsOp>(
-                        builder, operandLocation, converter, dataExv, baseAddr);
+                        builder, operandLocation, converter, dataExv);
                   asFortran << name.ToString();
                 } else { // Unsupported
                   llvm::report_fatal_error(
diff --git a/flang/lib/Lower/OpenMP.cpp b/flang/lib/Lower/OpenMP.cpp
index eeba87fcd15116..7ad644f55f5076 100644
--- a/flang/lib/Lower/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP.cpp
@@ -2671,7 +2671,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;

``````````

</details>


https://github.com/llvm/llvm-project/pull/75537


More information about the flang-commits mailing list