[llvm-branch-commits] [mlir] [MLIR][OpenMP] Automate operand structure definition (PR #99508)
Sergio Afonso via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jul 19 07:02:55 PDT 2024
================
@@ -23,303 +23,31 @@
#define GET_ATTRDEF_CLASSES
#include "mlir/Dialect/OpenMP/OpenMPOpsAttributes.h.inc"
+#include "mlir/Dialect/OpenMP/OpenMPClauseOps.h.inc"
+
namespace mlir {
namespace omp {
//===----------------------------------------------------------------------===//
-// Mixin structures defining MLIR operands associated with each OpenMP clause.
+// Extra clause operand structures.
//===----------------------------------------------------------------------===//
-struct AlignedClauseOps {
- llvm::SmallVector<Value> alignedVars;
- llvm::SmallVector<Attribute> alignments;
-};
-
-struct AllocateClauseOps {
- llvm::SmallVector<Value> allocateVars, allocatorVars;
-};
-
-struct CancelDirectiveNameClauseOps {
- ClauseCancellationConstructTypeAttr cancelDirective;
-};
-
-struct CollapseClauseOps {
- llvm::SmallVector<Value> collapseLowerBound, collapseUpperBound, collapseStep;
-};
-
-struct CopyprivateClauseOps {
- llvm::SmallVector<Value> copyprivateVars;
- llvm::SmallVector<Attribute> copyprivateSyms;
-};
-
-struct CriticalNameClauseOps {
- StringAttr symName;
-};
-
-struct DependClauseOps {
- llvm::SmallVector<Attribute> dependKinds;
- llvm::SmallVector<Value> dependVars;
-};
-
-struct DeviceClauseOps {
- Value device;
-};
-
struct DeviceTypeClauseOps {
----------------
skatrak wrote:
This is because it's not defined as an `OpenMP_Clause` in OpenMPClauses.td, so it can't be generated by this pass. Same case below with `DeclareTargetOperands`, which is not based on an `OpenMP_Op` definition.
https://github.com/llvm/llvm-project/pull/99508
More information about the llvm-branch-commits
mailing list