[Mlir-commits] [mlir] [MLIR][OpenMP]Add prescriptiveness-modifier support to grainsize and … (PR #128477)
Kaviya Rajendiran
llvmlistbot at llvm.org
Thu Feb 27 03:29:03 PST 2025
================
@@ -472,6 +472,99 @@ static void printOrderClause(OpAsmPrinter &p, Operation *op,
p << stringifyClauseOrderKind(order.getValue());
}
+template <typename ClauseTypeAttr, typename ClauseType>
+static ParseResult
+parseGranularityClause(OpAsmParser &parser, ClauseTypeAttr &prescriptiveness,
+ std::optional<OpAsmParser::UnresolvedOperand> &operand,
+ Type &operandType,
+ std::optional<ClauseType> (*symbolizeClause)(StringRef),
+ StringRef clauseName) {
+ StringRef enumStr;
+ if (succeeded(parser.parseOptionalKeyword(&enumStr))) {
+ if (std::optional<ClauseType> enumValue = symbolizeClause(enumStr)) {
+ prescriptiveness = ClauseTypeAttr::get(parser.getContext(), *enumValue);
+ if (parser.parseColon())
----------------
kaviya2510 wrote:
Thanks for the review comments @skatrak.
I agree with you. I updated the changes in the recent commit. Kindly go through it.
https://github.com/llvm/llvm-project/pull/128477
More information about the Mlir-commits
mailing list