[flang-commits] [flang] [llvm] [Flang][OpenMP] Defer descriptor mapping for assumed dummy argument types (PR #154349)
Kareem Ergawy via flang-commits
flang-commits at lists.llvm.org
Thu Aug 21 02:28:04 PDT 2025
================
@@ -75,6 +75,38 @@ class MapInfoFinalizationPass
/// | |
std::map<mlir::Operation *, mlir::Value> localBoxAllocas;
+ // List of deferrable descriptors to process at the end of
+ // the pass.
+ llvm::SmallVector<mlir::Operation *> deferrableDesc;
+
+ // Check if the declaration operation we have refers to a dummy
+ // function argument.
+ bool isDummyArgument(mlir::Operation *op) {
+ if (auto declareOp = mlir::dyn_cast<hlfir::DeclareOp>(op))
----------------
ergawy wrote:
nit: The name implies that we are passing a value.
```suggestion
bool isDummyArgument(mlir::Value mappedValue) {
if (auto declareOp = mlir::dyn_cast_if_present<hlfir::DeclareOp>(mappedValue.getDefiningOp()))
```
https://github.com/llvm/llvm-project/pull/154349
More information about the flang-commits
mailing list