Skip to content

[REFACTOR][TIR] Inline StructuralWalk at variable-use checks - #20306

Merged
tqchen merged 4 commits into
apache:mainfrom
tqchen:refactor-tir-convert-usesvar-to-structuralwalk
Sep 10, 2026
Merged

[REFACTOR][TIR] Inline StructuralWalk at variable-use checks#20306
tqchen merged 4 commits into
apache:mainfrom
tqchen:refactor-tir-convert-usesvar-to-structuralwalk

Conversation

@tqchen

@tqchen tqchen commented Sep 10, 2026

Copy link
Copy Markdown
Member

Remove the public UsesVar helper and inline preorder ffi::StructuralWalk at each variable-use check.

Each matching callback returns the encountered Var in VisitInterrupt and uses the walk result as the signal, preserving reflected traversal and immediate early exit. Adjacent SideEffect behavior remains unchanged.

Validation: LLVM 23 CPU build; full C++ suite (133/133); clang-format.

@tqchen tqchen changed the title [TIR] Use StructuralWalk in UsesVar [REFACTOR][TIR] Inline StructuralWalk at variable-use checks Sep 10, 2026
@tqchen
tqchen merged commit e30f859 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