yzh119 commented on code in PR #14185:
URL: https://github.com/apache/tvm/pull/14185#discussion_r1124366735


##########
include/tvm/tir/analysis.h:
##########
@@ -86,6 +87,58 @@ TVM_DLL double EstimateTIRFlops(const Stmt& stmt);
  */
 TVM_DLL double EstimateTIRFlops(const IRModule& mod);
 
+/*!
+ * \brief Visitor class to perform use/def analysis, also delete unreferenced 
lets.
+ * \sa UndefinedVars
+ */
+class VarUseDefAnalyzer : public StmtExprMutator {

Review Comment:
   In some cases, we might need to visit structures that are neither an `Stmt` 
nor a `PrimExpr`, with the result type set instead of an array, existing 
`UndefinedVars` API is not convenient in this case.



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