YuchenJin opened a new pull request, #14079:
URL: https://github.com/apache/tvm/pull/14079

   It may be useful for some passes to collapse chains of definitions, 
particularly after other compiler transformations that may reduce or simplify 
some expressions.
   
   This pass will take chains of definitions and replace references to later 
definitions to the original one. It works by checking `LookupBinding` for each 
var use-site and replacing the var with its definition if the definition was 
another var. Additionally, `MatchCast` bindings where the LHS and the RHS are 
guaranteed to match at compile time are canonicalized into ordinary 
`VarBinding`s.
   
   Example:
   ```python
   y = x
   z = y
   w = z
   o = w
   p = o
   ```
   Will be replaced with
   ```python
   y = x
   z = x
   w = x
   o = x
   p = x
   ```
   
   Original PR: https://github.com/tlc-pack/relax/pull/233
   
   Co-authored-by: Steven S. Lyubomirsky <[email protected]>


-- 
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]

Reply via email to