[Pass] Implement Tile Loop Fusion#109
[Pass] Implement Tile Loop Fusion#109JiaqiGuoSunlune wants to merge 13 commits intotilelang_mesh_mainfrom
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
firefrogliu666
left a comment
There was a problem hiding this comment.
I went through this PR carefully and at this point I understand the main idea and implementation structure well enough.
My understanding is that this pass discovers adjacent lowered tile.scope_entry regions, builds a window-local dependence/planning problem, and rewrites them into shared execution-shell trees . The implementation follows a discovery -> problem -> plan -> rewrite decomposition. The core method to find the best rewriting plan is a DP algorithm that priorizes lowering write_cut_cost, shared_read_cost, live_range_penalty, and reorder_penalty.
The important part for me is that the pass reasons in terms of logical execution prefixes, normalized use_in / def_out, dependence depth rho, and resident values, instead of trying to do a purely syntactic rewrite.
I also checked the rewrite side and the test intent. Preserving local wrappers like LetStmt / AttrStmt, supporting partial-prefix fusion, and keeping planning window boundaries conservative all make sense to me. Overall, the decomposition into discovery, planning, and rewrite is clear, and the implementation direction looks sound.
Approved.
Uh oh!
There was an error while loading. Please reload this page.