slyubomirsky commented on PR #15916:
URL: https://github.com/apache/tvm/pull/15916#issuecomment-1782267071

   If we intend to have special cases like `call_tir` where one argument _must_ 
be a tuple literal (i.e., not following the normal rule of the type system that 
any member of the type should be permitted to stand in for any other), we 
should probably have some centralized place or an API where these rules are 
defined so that passes know to handle them. I'm not sure what form this should 
take, but such special cases make it trickier to implement passes like common 
subexpression elimination: the passes have to know about which operators are 
special and have special handling for them (as @Lunderberg noted).
   
   I would argue that it doesn't bring that many advantages to require the 
argument to `call_tir` be a tuple literal, since the only other possibility (in 
normal form) is for the argument to a variable, and it is easy to look up the 
definitions of variables (if they're from the same function) or to use 
`TupleGetItem` if necessary (like the `GetTupleIndex` method in this PR).


-- 
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: commits-unsubscr...@tvm.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to