Page MenuHomePhabricator

[mlir] Add std.source and std.sink ops.
Needs RevisionPublic

Authored by silvas on May 9 2020, 7:04 PM.



These ops are useful for test case reduction and test writing.


%0 = source : i1
sink %0 : i1

%a, %b = source : i1, i2
sink %a, %b : i1, i2

Diff Detail

Event Timeline

silvas created this revision.May 9 2020, 7:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 9 2020, 7:04 PM
silvas updated this revision to Diff 263047.May 9 2020, 7:10 PM

Make canonicalizer a bit easier to read.

I really don't feel this belongs to the standard dialect. This is very light in motivation right now. Can you expand?

Can you use the test dialect maybe?

bondhugula added a subscriber: bondhugula.EditedMay 10 2020, 5:30 PM

Could test.produce, test.consume be better names for these? Could you add a couple more lines to the commit summary? I think you also need to say in the op description that these are no ops?

bondhugula requested changes to this revision.May 10 2020, 5:30 PM
This revision now requires changes to proceed.May 10 2020, 5:30 PM

+1 to not putting these in the standard dialect. We didn't want a generic cast operation precisely because it could create values with unclear semantics. I would rather have it in a dedicated dialect rather than in the Test dialect. If you intend to build a bugpoint analog, you'd end up with a dependency of tools/bugpoint on test/lib, which sounds awkward.


You can omit this line

bondhugula resigned from this revision.Jul 19 2020, 12:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 19 2020, 12:58 PM