[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
Mon Jun 8 08:25:28 PDT 2026
================
@@ -408,6 +408,30 @@ static void PutOpenMPDeclarativeDirectives(llvm::raw_ostream &os,
decls->printClauseSet(os, dtgt, symbol.name());
os << "\n";
}
+ // Re-emit `!$omp groupprivate` (and any recorded device_type) so a TU
+ // that `use`s this module recovers the directive from the .mod file.
+ // Common-block names must be wrapped in slashes when reparsed.
+ if (symbol.test(Symbol::Flag::OmpGroupPrivate)) {
+ os << "!$omp groupprivate(";
----------------
skatrak wrote:
Nit: Use `parser::ToLowerCaseLetters(llvm::omp::llvm::omp::Directive::OMPD_groupprivate, version))`, so that we can deal with directive name updates over time.
https://github.com/llvm/llvm-project/pull/180934
More information about the flang-commits
mailing list