[flang-commits] [flang] [flang] Lowering changes for assigning dummy_scope to hlfir.declare. (PR #90989)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Mon May 6 11:36:39 PDT 2024


================
@@ -5375,6 +5400,23 @@ class FirConverter : public Fortran::lower::AbstractConverter {
                                         globalOmpRequiresSymbol);
   }
 
+  /// Record fir.dummy_scope operation for this function.
+  /// It will be used to set dummy_scope operand of the hlfir.declare
+  /// operations.
+  void setDummyArgsScope(mlir::Value val) {
+    assert(!dummyArgsScope && val);
+    dummyArgsScope = val;
+  }
+
+  /// Record the given symbol as a dummy argument of this function.
+  void registerDummySymbol(Fortran::semantics::SymbolRef symRef) {
+    auto *sym = symRef->HasLocalLocality() ? &*symRef : &symRef->GetUltimate();
----------------
vzakhari wrote:

Nope, I do not have an example for this.  I was just following the `lookupSymbol` impl.  I will remove it here and in `isRegisteredDummySymbol`. Thanks!

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


More information about the flang-commits mailing list