[flang-commits] [flang] [flang][mlir] Add flang to mlir lowering for groupprivate (PR #180934)
via flang-commits
flang-commits at lists.llvm.org
Wed Jun 10 02:50:42 PDT 2026
================
@@ -76,8 +76,22 @@ class WithOmpDeclarative {
ompDeviceType_ = device;
}
+ const OmpClauseSet &ompGroupprivate() const { return ompGroupprivate_; }
+ void set_ompGroupprivate(OmpClauseSet clauses) { ompGroupprivate_ = clauses; }
+
+ const std::optional<common::OmpDeviceType> &
+ ompGroupprivateDeviceType() const {
+ return ompGroupprivateDeviceType_;
+ }
+ void set_ompGroupprivateDeviceType(common::OmpDeviceType device) {
+ ompGroupprivateDeviceType_ = device;
+ }
+
+ // \p deviceType overrides the DEVICE_TYPE clause value to print (used for
+ // GROUPPRIVATE); when absent the DECLARE_TARGET device_type is used.
void printClauseSet(llvm::raw_ostream &os, const OmpClauseSet &clauses,
- parser::CharBlock name = parser::CharBlock{}) const;
+ parser::CharBlock name = parser::CharBlock{},
+ std::optional<common::OmpDeviceType> deviceType = std::nullopt) const;
----------------
skc7 wrote:
`printClauseSet` now takes an `llvm::omp::Directive` and selects the right `device_type` value internally. Updated all callers.
https://github.com/llvm/llvm-project/pull/180934
More information about the flang-commits
mailing list