Skip to content

[REFACTOR][TIR] Use StructuralWalk in place of PostOrderVisit - #20308

Merged
tqchen merged 17 commits into
apache:mainfrom
tqchen:refactor-tir-structural-walk
Sep 10, 2026
Merged

[REFACTOR][TIR] Use StructuralWalk in place of PostOrderVisit#20308
tqchen merged 17 commits into
apache:mainfrom
tqchen:refactor-tir-structural-walk

Conversation

@tqchen

@tqchen tqchen commented Sep 10, 2026

Copy link
Copy Markdown
Member

This PR replaces TIR PostOrderVisit and PreOrderVisit usage with StructuralWalk.

A tree walk now uses a typed callback, and pre-order boolean descent becomes WalkResult::Advance or WalkResult::Skip. Sites retain identity sets only where a consumer depends on once-per-object behavior; buffer printer use counting instead uses def_region_kind to distinguish definitions from uses.

tirx::PostOrderVisit, tirx::PreOrderVisit, their helper visitors, FFI globals, and Python wrappers are removed. Python callers use tvm_ffi.structural_walk.

@tqchen
tqchen force-pushed the refactor-tir-structural-walk branch from 72eab11 to c50ff84 Compare September 10, 2026 12:39
@tqchen
tqchen merged commit 2ef0ae2 into apache:main Sep 10, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants