This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Provide CustomOpAsmParser::parseOptionalOperand
ClosedPublic

Authored by ftynse on Mar 25 2020, 8:26 AM.

Details

Summary

Some operations have custom syntax where an operand is always followed by a
specific token of streams if the operand is present. Parsing such operations
requires the ability to optionally parse an operand. Provide a relevant
function in the custom Op parser.

Diff Detail

Event Timeline

ftynse created this revision.Mar 25 2020, 8:26 AM
Herald added a project: Restricted Project. · View Herald Transcript
rriddle accepted this revision.Mar 25 2020, 11:34 AM

Are there any existing users that can take advantage of this?

This revision is now accepted and ready to land.Mar 25 2020, 11:34 AM

Are there any existing users that can take advantage of this?

Yes, but in a private repo.

This revision was automatically updated to reflect the committed changes.

Could you add something in the test dialect to have upstream coverage?