You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "yzh119 (via GitHub)" <gi...@apache.org> on 2023/03/04 18:33:51 UTC

[GitHub] [tvm] yzh119 commented on pull request #14185: [Refactor] Move `VarUseDefAnalysis` to header file

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

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