tlopex opened a new pull request, #20334: URL: https://github.com/apache/tvm/pull/20334
Some TIR analyses need to collect arithmetic premises at one IR location and replay them at another. The existing analyzer scope is tied to the traversal lifetime and cannot retain multiple independent snapshots. This change adds `ConstrVisitor` and `ConstrSet` to collect supported scalar predicates, bindings, and ranges while visiting TIR. Snapshots can outlive the visitor, be renamed for different executions, merged as conjunctions, and replayed through the arithmetic analyzer. Unsupported or side-effecting expressions are discarded conservatively, so omitted facts only weaken proofs. The visitor handles branches, loops, `let` bindings, `Bind`/`AssertStmt`, reduction initialization scopes, and `if_then_else`. This is adapted from TileLang: https://github.com/tile-ai/tilelang/blob/main/src/transform/common/constr_visitor.h -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
