[flang] [llvm] [FLANG][OpenMP]Add frontend support for ASSUME and ASSUMES (PR #120770)
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 2 12:00:05 PST 2025
================
@@ -4174,6 +4215,49 @@ struct OmpClauseList {
// --- Directives and constructs
+// Ref: [5.2: 213-216]
+//
+// assume-construct ->
+// ASSUME absent-clause | contains-clause | holds-clause | no-openmp-clause |
+// no-openmp-routines-clause | no-parallelism-clause
+struct OpenMPAssumeConstruct {
+ TUPLE_CLASS_BOILERPLATE(OpenMPAssumeConstruct);
+ std::tuple<Verbatim, OmpClauseList> t;
+ CharBlock source;
+};
+
+struct OpenMPDeclarativeAssumes {
+ TUPLE_CLASS_BOILERPLATE(OpenMPDeclarativeAssumes);
+ std::tuple<Verbatim, OmpClauseList> t;
+ CharBlock source;
+};
+
+struct OmpAssumesDirective {
+ TUPLE_CLASS_BOILERPLATE(OmpAssumesDirective);
+ std::tuple<Verbatim, OmpClauseList> t;
+ CharBlock source;
+};
+
+struct OmpEndAssumesDirective {
+ WRAPPER_CLASS_BOILERPLATE(OmpEndAssumesDirective, Verbatim);
+ CharBlock source;
+};
+
+// structured-block
+// ...
+struct OmpAssumesPartConstruct {
+ WRAPPER_CLASS_BOILERPLATE(OmpAssumesPartConstruct, Block);
+ CharBlock source;
+};
+
+struct OpenMPAssumesConstruct {
+ TUPLE_CLASS_BOILERPLATE(OpenMPAssumesConstruct);
+ std::tuple<OmpAssumesDirective, OmpAssumesPartConstruct,
+ OmpEndAssumesDirective>
+ t;
+ CharBlock source;
----------------
kparzysz wrote:
This should be `Assume` (note no `s` at the end). The `ASSUME` directive is associated with a block (and it has `END ASSUME` counterpart).
https://github.com/llvm/llvm-project/pull/120770
More information about the llvm-commits
mailing list