[flang-commits] [flang] [flang][mlir] Add flang to mlir lowering for groupprivate (PR #180934)

Sergio Afonso via flang-commits flang-commits at lists.llvm.org
Wed May 13 05:14:30 PDT 2026


================
@@ -401,6 +402,12 @@ class AbstractConverter {
 
   virtual mlir::StateStack &getStateStack() = 0;
 
+  /// Return the per-converter table recording the device_type clause
+  /// associated with each groupprivate symbol. Used to communicate state from
+  /// the lowering of a `!$omp groupprivate` directive to the later creation of
+  /// `omp.groupprivate` operations inside teams regions.
+  virtual OMPGroupprivateDeviceTypeInfo &getOMPGroupprivateDeviceTypeInfo() = 0;
----------------
skatrak wrote:

Is the purpose of adding this being able to access groupprivate information from other Fortran modules / from the current function?

If the module with `groupprivate` variables is located in another file, I believe this won't find it. It seems like a similar case to what we did for the `requires` directive, where `.mod` files had to be augmented to include it and its information had to be propagated in advance prior to entering lowering. This would avoid the ordering issue I mention in another comment.

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


More information about the flang-commits mailing list