This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Add custom directive hooks for printing mixed integer or value operands.
ClosedPublic

Authored by mravishankar on Jan 31 2021, 10:42 PM.

Details

Summary

Add printer and parser hooks for a custom directive that allows
parsing and printing of idioms that can represent a list of values
each of which is either an integer or an SSA value. For example in

subview %source[%offset_0, 1] [4, %size_1] [%stride_0, 3]

each of the list (which represents offset, size and strides) is a mix
of either statically know integer values or dynamically computed SSA
values. Since this is used in many places adding a custom directive to
parse/print this idiom allows using assembly format on operations
which use this idiom.

Diff Detail

Event Timeline

mravishankar created this revision.Jan 31 2021, 10:42 PM
mravishankar requested review of this revision.Jan 31 2021, 10:42 PM
nicolasvasilache accepted this revision.Feb 1 2021, 12:32 AM

Thanks for refactoring this soreness!

This revision is now accepted and ready to land.Feb 1 2021, 12:32 AM
rriddle accepted this revision.Feb 1 2021, 11:30 AM

This is a really nice cleanup, thanks!

Minor edit to trigger build bots