Add Single-Source-Single-Sink Patterns in canonicalize-live-in Pass#180
Add Single-Source-Single-Sink Patterns in canonicalize-live-in Pass#180tancheng merged 6 commits intocoredac:mainfrom
Conversation
|
Can you please elaborate on the "avoid creating block arguments and branch operands for live-ins in the sink block" via your example? Some args are still needed, but what are skipped. And mentioning how is this PR different from the suggestion I gave in #159 (comment). |
Q1. Elaborate on the pass via an example.Sure~ Take
We identify the live-ins in
Here we need to pass Q2. Difference from Proposal in #159In #159 (comment). We use simple dominance and post-dominance relationships to identify the source and sink blocks.
This 2-step identification is incomplete for this pass. Because Step 1 & Step 2 can also match with block A -> block B in this figure, which is not our target. We want to identify relationships like B <-> E, B <-> F, etc. So we add another constraint beyond the dominance check --- the two blocks must cross a |
A -> B (i.e., |
I think for A->B, they need to be handled in this step. It is orthogonal to this pr. For this pr, we only care about BBs crossing
|
okay. i feel it is quite trivial. it is like A dominates B via |
Yes, it's quite simple to address this. But I just do not want to introduce too many patterns in this pr. I add a |




In this PR, we add a new pattern able to identify the following patterns in
canonicalize-live-inpass. And avoid creating block arguments and branch operands for live-ins in the sink block.The patterns are like: