yzh119 commented on PR #14185:
URL: https://github.com/apache/tvm/pull/14185#issuecomment-1454834630

   @Hzfengsy @Lunderberg @tqchen  I have decoupled the previous 
`VarDefUseAnalyzer` class into three classes:
   1. `VarUseDefAnalyzer` which is a `StmtExprVisitor`, we expose it to our 
files via a header under `src`
   2. `DeviceInfoCollector` which is a `StmtVisitor` that collects program 
information about shared memory usage, thread axis/extents etc.
   3. `UnreferencedLetRemover` which removes redundant let stmt/exprs.
   
   I know this class has been used for long time and we don't want any changes 
on its behavior, so we need to be careful in this refactor, and please correct 
me if I made any mistakes. One thing I'm not sure is if we need to couple the 
three functionalities together in a single pass, or we can decouple them like 
what I did in the refactor.
   
   If my refactor doesn't work, I'm totally okay if we keep the original class 
and create a simpler `VarDefUseAnalyzer` for light-weight analysis use (e.g. 
UndefinedVars).


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