(ctx, x)
| 424 | """Top-down walk fires pm after children are processed (post-order).""" |
| 425 | visited = [] |
| 426 | def track_visit(ctx, x): |
| 427 | ctx.append(x.arg if x.op is Ops.CONST else x.op) |
| 428 | return None |
| 429 | pm = PatternMatcher([(UPat(GroupOp.All, name="x"), track_visit)]) |
| 430 | a = UOp.const(dtypes.int, 1) |
| 431 | b = UOp.const(dtypes.int, 2) |