[Mlir-commits] [mlir] [MLIR][OpenMP] Add the host_eval clause (PR #116048)
Sergio Afonso
llvmlistbot at llvm.org
Fri Jan 10 04:26:07 PST 2025
================
@@ -444,6 +444,44 @@ class OpenMP_HintClauseSkip<
def OpenMP_HintClause : OpenMP_HintClauseSkip<>;
+//===----------------------------------------------------------------------===//
+// Not in the spec: Clause-like structure to hold host-evaluated values.
+//===----------------------------------------------------------------------===//
+
+class OpenMP_HostEvalClauseSkip<
+ bit traits = false, bit arguments = false, bit assemblyFormat = false,
+ bit description = false, bit extraClassDeclaration = false
+ > : OpenMP_Clause<traits, arguments, assemblyFormat, description,
+ extraClassDeclaration> {
+ let traits = [
+ BlockArgOpenMPOpInterface
+ ];
+
+ let arguments = (ins
+ Variadic<AnyType>:$host_eval_vars
+ );
+
+ let extraClassDeclaration = [{
+ unsigned numHostEvalBlockArgs() {
+ return getHostEvalVars().size();
+ }
+ }];
+
+ let description = [{
+ The optional `host_eval_vars` holds values defined outside of the region of
+ the `IsolatedFromAbove` operation for which a corresponding entry block
----------------
skatrak wrote:
Are you ok with this solution @kiranchandramohan? This PR stack is now almost ready to be merged, I just want to make sure there are no blockers
https://github.com/llvm/llvm-project/pull/116048
More information about the Mlir-commits
mailing list