[Mlir-commits] [mlir] [MLIR][OpenMP] Simplify definition of the BlockArgOpenMPOpInterface, NFC (PR #128198)
Krzysztof Parzyszek
llvmlistbot at llvm.org
Fri Feb 21 08:54:28 PST 2025
================
@@ -15,6 +15,62 @@
include "mlir/IR/OpBase.td"
+
+// Internal class to hold definitions of BlockArgOpenMPOpInterface methods,
+// based on the name of the clause and what clause comes earlier in the list.
+//
+// The clause order will define the expected relative order between block
+// arguments corresponding to each of these clauses.
+class BlockArgOpenMPClause<string clauseNameSnake, string clauseNameCamel,
+ BlockArgOpenMPClause previousClause> {
+ // Default-implemented method to be overriden by the corresponding clause.
+ InterfaceMethod numArgsMethod = InterfaceMethod<
+ "Get number of block arguments defined by `" # clauseNameSnake # "`.",
+ "unsigned", "num" # clauseNameCamel # "BlockArgs", (ins), [{}], [{
----------------
kparzysz wrote:
Could you add a comment with an example of use? It's pretty clear in the code, but you need to know where to look...
https://github.com/llvm/llvm-project/pull/128198
More information about the Mlir-commits
mailing list