Page MenuHomePhabricator

[mlir][AsmPrinter] WIP - Attempt to fix roundtripping issue on op names containing multiple '.' characters.
Needs ReviewPublic

Authored by nicolasvasilache on May 13 2022, 10:00 AM.

Details

Summary

Operations such as transform.structured.tile currently do not properly roundtrip.
I am looking for guidance on how to fix and what generic test to add.
This current change solves the problem on my end but may not be desirable.

Please advise.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMay 13 2022, 10:00 AM
nicolasvasilache requested review of this revision.May 13 2022, 10:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 13 2022, 10:00 AM

We should have some test dialect operations that use default dialect, should be easy to use a test dialect operation with multiple dots within the regions of one of those operations.

mlir/lib/IR/AsmPrinter.cpp
2713

We'll likely want to shift checks like this to OpState::printOpName(in Operation.cpp). I agree with the direction of the patch though, if there are multiple . I think we should always print the full name. We only need to check for that if we would have stripped the dialect prefix, though. It should be easy to work that check into the function mentioned above.