[flang] [llvm] [Proof-of-Concept][flang][OpenMP] Implicitely map allocatable record fields (PR #117867)

via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 27 09:43:50 PST 2024


================
@@ -609,32 +609,22 @@ void createEmptyRegionBlocks(
   }
 }
 
-inline AddrAndBoundsInfo
-getDataOperandBaseAddr(Fortran::lower::AbstractConverter &converter,
-                       fir::FirOpBuilder &builder,
-                       Fortran::lower::SymbolRef sym, mlir::Location loc) {
-  mlir::Value symAddr = converter.getSymbolAddress(sym);
+inline AddrAndBoundsInfo getDataOperandBaseAddr(fir::FirOpBuilder &builder,
+                                                mlir::Value symAddr,
+                                                bool isOptional,
+                                                mlir::Location loc) {
   mlir::Value rawInput = symAddr;
   if (auto declareOp =
           mlir::dyn_cast_or_null<hlfir::DeclareOp>(symAddr.getDefiningOp())) {
     symAddr = declareOp.getResults()[0];
     rawInput = declareOp.getResults()[1];
   }
 
-  // TODO: Might need revisiting to handle for non-shared clauses
-  if (!symAddr) {
-    if (const auto *details =
-            sym->detailsIf<Fortran::semantics::HostAssocDetails>()) {
-      symAddr = converter.getSymbolAddress(details->symbol());
-      rawInput = symAddr;
-    }
-  }
-
----------------
agozillon wrote:

Might be worth tagging some of the OpenACC guys to have a review of the DirectivesCommon.h changes either now or when it's in final PR form, primarily as they're the main caretakers of DirectivesCommon.h or at least the original implementors :-) I'm of course fine with the changes, but they might have some better insight than I do in this case! Although, very doubtful they'd have issues with the changeset. 

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


More information about the llvm-commits mailing list