[Mlir-commits] [flang] [mlir] [MLIR][OpenMP] Improve assemblyFormat handling for clause-based ops (PR #108023)

Tom Eccles llvmlistbot at llvm.org
Wed Sep 11 02:51:51 PDT 2024


================
@@ -59,26 +59,21 @@ def OpenMP_MapBoundsType : OpenMP_Type<"MapBounds", "map_bounds_ty"> {
 // Optionally, operation traits and extra class declarations might be attached
 // to clauses, which will be forwarded to all operations that include them.
 //
-// Each clause must specify whether it's required or optional. This impacts how
-// the `assemblyFormat` for operations including it get generated.
-//
 // An `OpenMP_Op` can inhibit the inheritance of `traits`, `arguments`,
-// `assemblyFormat`, `description` and `extraClassDeclaration` fields from any
-// given `OpenMP_Clause` by setting to 1 the corresponding "skip" template
-// argument bit.
-class OpenMP_Clause<bit isRequired, bit skipTraits, bit skipArguments,
-                    bit skipAssemblyFormat, bit skipDescription,
-                    bit skipExtraClassDeclaration> {
-  bit required = isRequired;
-
+// `{opt,req}assemblyFormat`, `description` and `extraClassDeclaration` fields
+// from any given `OpenMP_Clause` by setting to 1 the corresponding "skip"
+// template argument bit.
+class OpenMP_Clause<bit skipTraits, bit skipArguments, bit skipAssemblyFormat,
----------------
tblah wrote:

Yeah if we don't need it then lets not add that. I was confused because I missread the documentation comment above. Thanks for clarifying

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


More information about the Mlir-commits mailing list