[Synth] Add declarative cut rewrite pattern and yield op#10565
[Synth] Add declarative cut rewrite pattern and yield op#10565okekayode wants to merge 4 commits into
Conversation
5ba04fa to
59ffecd
Compare
59ffecd to
aee47a9
Compare
aee47a9 to
2318e6e
Compare
2318e6e to
030d0a0
Compare
030d0a0 to
8e7d483
Compare
|
|
||
| auto cost = getCost(); | ||
| if (auto arcs = cost.getArcs()) | ||
| if (!arcs.empty()) |
There was a problem hiding this comment.
Sorry I'm not sure I'm following this. I do expect CutRewriterPattern to use delay from arc attributes. Is it included in your plan to support this by updating MappingCostAttr?
There was a problem hiding this comment.
I added that check since the current arc representation is name-based, so non-empty arcs would suggest input/output names.
I see your confusion: this is not the intended final behaviour. My plan would be to support positional arcs in MappingCostAttr (via Dictionary form), or add another synth positional arc attribute that MappingCostAttr can contain (i think this is cleaner), and then validate those arcs in CutRewritePatternOp::verify() against the function input/result counts.
My bad, sorry for the confusion.
There was a problem hiding this comment.
It's ok to reject this if there is a plan, but please add TODO comments. Also I don't think we want to have two different linear timing arc attributes, so could you revert the new attribute? I think we can keep using the LinearTimingArcAttr by simply ignoring names (maybe in the future we also want to drop names eventually).
Also MappingCostAttr could use 2d array attributes as a container for arc, I believ,.
08f5c93 to
a4a11d2
Compare
Concerns #10485
We introduce the declarative operation
synth.cut_rewrite_patternand also the terminator operationsynth.yield.synth.cut_rewrite_patterndenotes cut rewrite patterns fori1input and result types as function-shaped regions. We also implement a custom printer and parser with attribute support forsynth.mapping_cost.In this PR we only introduce the IR representation; wiring this into consumers, for example
TechMapper.cpp, can be added later.