Commit 400cd2a
Address review comments: worklist transitive closure, single early-terminating walk
Two efficiency improvements identified in self-review:
1. collectHerdBodyOpsToKeep: replace fixed-point iteration (copies toKeep
set each round) with a worklist algorithm. Each newly-added op is pushed
once and processed once, avoiding redundant re-scanning of already-kept
ops in subsequent rounds.
2. loopUnrollFullWithAsyncTokenPreserved: replace two sequential walks (one
for SegmentOp, one for HerdOp) with a single interruptible walk that
stops as soon as the first SegmentOp or HerdOp is found. Avoids walking
the entire IR a second time in the common case where a segment is present.
No functional change; build and all tests pass (same 2 pre-existing ROCDL
failures unrelated to T003).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 0fdae09 commit 400cd2a
1 file changed
Lines changed: 15 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
983 | 983 | | |
984 | 984 | | |
985 | 985 | | |
986 | | - | |
987 | | - | |
988 | | - | |
989 | | - | |
990 | | - | |
991 | | - | |
992 | | - | |
993 | | - | |
994 | | - | |
995 | | - | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
996 | 994 | | |
997 | 995 | | |
998 | 996 | | |
| |||
1200 | 1198 | | |
1201 | 1199 | | |
1202 | 1200 | | |
1203 | | - | |
1204 | | - | |
1205 | | - | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
1206 | 1208 | | |
1207 | 1209 | | |
1208 | 1210 | | |
| |||
0 commit comments