This adds a parseOptionalAttribute method to the OpAsmParser that allows for parsing optional attributes, in a similar fashion to how optional types are parsed. This also enables the use of attribute values as the first element of an assembly format optional group.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Nice, thanks (just small nits)
mlir/lib/Parser/AttributeParser.cpp | ||
---|---|---|
194 | Is there a reason for the ordering or could we keep it sorted? | |
mlir/tools/mlir-tblgen/OpFormatGen.cpp | ||
635–639 | Nit: firstElement is not that much longer, lets just spell it out (I was going to say firstElem so that we use element's actual abbreviation but then it was even closer to full). | |
646 | Could we do this one first and so keep these sorted? | |
1954 | Same re sorted |
mlir/lib/Parser/AttributeParser.cpp | ||
---|---|---|
194 | No particular reason, this was just the order from parseAttribute. |
Is there a reason for the ordering or could we keep it sorted?