Page MenuHomePhabricator

[DialectAsmPrinter] Add missing 'printAttributeWithoutType' member.

Authored by lattner on Sep 21 2021, 6:06 PM.



DialectAsmParser has a parseAttribute member that takes a
contextual type, but DialectAsmPrinter doesn't have the corresponding
member to take advantage of it. As such, custom attribute
implementations can't really use it. This adds the obvious missing
method which fills this hole.

Diff Detail

Event Timeline

lattner created this revision.Sep 21 2021, 6:06 PM
lattner requested review of this revision.Sep 21 2021, 6:06 PM

I plan to land this as "obvious" after the smoke tests pass. Incidentally, there is a ton of duplication between DialectImplementation.h and OpImplemention.h, I wonder if there is a way to factor this better?

Any chance we can get a test op to use this?

lattner updated this revision to Diff 374087.Sep 21 2021, 6:40 PM

Fix this to build.

This revision was not accepted when it landed; it landed in state Needs Review.Sep 21 2021, 6:45 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.

Any chance we can get a test op to use this?

Oh sorry, didn't see this. Yes, I can add a test for this if needed, is circt using this enough? This isn't likely to break or regress.

If that's not enough, I'll have to add a custom attribute, because ops don't use this printer path (that's the root problem :)