Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flang][openacc/mp][NFC] Remove unused baseAddr argument #75537

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

clementval
Copy link
Contributor

baseAddr is not used in genBaseBoundsOps just remove it.

@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir flang:openmp labels Dec 14, 2023
@llvmbot
Copy link
Collaborator

llvmbot commented Dec 14, 2023

@llvm/pr-subscribers-flang-openmp

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

Changes

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 --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;

@llvmbot
Copy link
Collaborator

llvmbot commented Dec 14, 2023

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

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

Changes

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 --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;

Copy link
Contributor

@agozillon agozillon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@clementval clementval merged commit 43cb8f0 into llvm:main Dec 15, 2023
3 of 4 checks passed
@clementval clementval deleted the acc_genbaseboundsop_addr branch January 18, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:fir-hlfir flang:openmp flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants