[flang-commits] [flang] [llvm] [flang][OpenMP] Split DEFAULT into DEFAULT(dsa) and DEFAULT(variant) (PR #212128)
Sairudra More via flang-commits
flang-commits at lists.llvm.org
Mon Jul 27 06:11:49 PDT 2026
================
@@ -147,13 +147,19 @@ def OMPC_Counts : Clause<[Spelling<"counts">]> {
let clangClass = "OMPCountsClause";
}
def OMPC_Default : Clause<[Spelling<"default">]> {
+ // This is for default DSA.
+ // For the "otherwise" clause, use OMPC_DefaultVariant.
let clangClass = "OMPDefaultClause";
let flangClass = "OmpDefaultClause";
}
def OMPC_DefaultMap : Clause<[Spelling<"defaultmap">]> {
let clangClass = "OMPDefaultmapClause";
let flangClass = "OmpDefaultmapClause";
}
+def OMPC_DefaultVariant : Clause<[Spelling<"default">]> {
----------------
Saieiei wrote:
Non-blocking: `OMPC_Default` and `OMPC_DefaultVariant` now share the `"default"` spelling, so the generated spelling-to-kind switch contains two `.Case("default", ...)` entries and the selected value depends on record ordering. Is that intentional? If so, could we add a DirectiveEmitter test covering the duplicate spelling together with `name = "default_variant"?`
https://github.com/llvm/llvm-project/pull/212128
More information about the flang-commits
mailing list