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/03 10:18:54 UTC
[GitHub] [tvm] yzh119 opened a new pull request, #14185: [Refactor] Move `VarUseDefAnalysis` to header file
yzh119 opened a new pull request, #14185:
URL: https://github.com/apache/tvm/pull/14185
# Motivation
`UndefinedVars` is a frequently used function in our codebase and its implementation relies on `VarUseDefAnalysis` class which is more general, currently we expose `UndefinedVars` in `analysis.h`, but both the definitions of `UndefinedVars` and `VarUseDefAnalysis` resides in `split_host_device.cc`.
This PR moves `VarUseDefAnalysis` class to `analysis.h` so that developers can use it in other files that requires use/def analysis than `split_host_devices.cc`. We create a `var_use_def_analysis.cc` under `src/src/analysis` for the implementations of both `UndefinedVars` and `VarUseDefAnalysis`.
# Notes
We rename `VarUseDefAnalysis` to `VarUseDefAnalyzer`.
cc @Hzfengsy @Lunderberg
--
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
[GitHub] [tvm] Hzfengsy commented on a diff in pull request #14185: [Refactor] Move `VarUseDefAnalysis` to header file
Posted by "Hzfengsy (via GitHub)" <gi...@apache.org>.
Hzfengsy commented on code in PR #14185:
URL: https://github.com/apache/tvm/pull/14185#discussion_r1124305655
##########
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:
Do we really need to move the mutator to the public header file?
--
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
[GitHub] [tvm] Lunderberg commented on a diff in pull request #14185: [Refactor] Move `VarUseDefAnalysis` to header file
Posted by "Lunderberg (via GitHub)" <gi...@apache.org>.
Lunderberg commented on code in PR #14185:
URL: https://github.com/apache/tvm/pull/14185#discussion_r1126604368
##########
src/tir/analysis/var_use_def_analysis.h:
##########
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*!
+ * \file tvm/src/tir/analysis/var_use_def_analyzer.h
+ * \brief Variable definition and usage analysis class.
+ */
+#ifndef TVM_TIR_ANALYSIS_VAR_USE_DEF_ANALYSIS_H_
+#define TVM_TIR_ANALYSIS_VAR_USE_DEF_ANALYSIS_H_
+
+#include <tvm/tir/analysis.h>
+
+#include <unordered_map>
+
+#include "../../runtime/thread_storage_scope.h"
+#include "../transforms/ir_utils.h"
+
+namespace tvm {
+namespace tir {
+
+/*!
+ * \brief Visitor class to perform use/def analysis, also delete unreferenced lets.
+ * \param defined_vars Variables that have been defined.
+ * \param visit_thread_extent Whether enters thread extent expressions or not.
+ * \sa UndefinedVars
+ */
+class VarUseDefAnalyzer : public StmtExprVisitor {
+ public:
+ explicit VarUseDefAnalyzer(const Array<Var>& defined_vars, bool visit_thread_extent = true);
+ // The fields are publically readible to
+ // be accessible to the users.
+ bool visit_thread_extent_{true};
+ Array<Var> undefined_;
+
+ std::unordered_map<const VarNode*, int> use_count_;
Review Comment:
The `use_count_` and `def_count_` use `const VarNode*` as the map key, whereas `let_binding_` uses `Var`. I know that they're used somewhat interchangeably throughout the codebase, but it seems odd to have different usage so clsoe together. Is there a reason for the different usage, and if so, could we add a comment explaining why they were chosen?
##########
include/tvm/tir/analysis.h:
##########
@@ -30,6 +30,7 @@
#include <tvm/tir/function.h>
#include <tvm/tir/op_attr_types.h>
#include <tvm/tir/stmt.h>
+#include <tvm/tir/stmt_functor.h>
Review Comment:
Is this include file required, now that the visitor/mutator are in a separate header file?
##########
src/tir/analysis/var_use_def_analysis.h:
##########
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*!
+ * \file tvm/src/tir/analysis/var_use_def_analyzer.h
+ * \brief Variable definition and usage analysis class.
+ */
+#ifndef TVM_TIR_ANALYSIS_VAR_USE_DEF_ANALYSIS_H_
+#define TVM_TIR_ANALYSIS_VAR_USE_DEF_ANALYSIS_H_
+
+#include <tvm/tir/analysis.h>
+
+#include <unordered_map>
+
+#include "../../runtime/thread_storage_scope.h"
+#include "../transforms/ir_utils.h"
Review Comment:
This would probably be a better place for the `stmt_functor.h` include file, rather than being included as part of `ir_utils.h`.
##########
src/tir/transforms/split_host_device.cc:
##########
@@ -104,44 +81,42 @@ class VarUseDefAnalysis : public StmtExprMutator {
dyn_shmem_size_ = dyn_shmem_size_ * (op->dtype.bytes());
use_dyn_shmem_ = true;
}
- return StmtExprMutator::VisitStmt_(op);
+ StmtVisitor::VisitStmt_(op);
}
- Stmt VisitStmt_(const AllocateConstNode* op) final {
- this->HandleDef(op->buffer_var.get());
- return StmtExprMutator::VisitStmt_(op);
- }
+ // recording what thread axis have been visited.
+ std::unordered_set<const IterVarNode*> defined_thread;
+};
- Stmt VisitStmt_(const StoreNode* op) final {
- LOG(FATAL) << "Unexpected use of deprecated StoreNode. Please use BufferStoreNode instead.";
- }
+/*!
+ * \brief Mutator class to remove unrefenced let stmt/expressions.
+ * \param use_count The pre-computed variable to use count map.
+ */
+class UnreferencedLetRemover : public StmtExprMutator {
Review Comment:
Thank you for making this change, and it really helps in the readability to have the analysis/mutation be separated out!
--
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
[GitHub] [tvm] yzh119 commented on a diff in pull request #14185: [Refactor] Move `VarUseDefAnalysis` to header file
Posted by "yzh119 (via GitHub)" <gi...@apache.org>.
yzh119 commented on code in PR #14185:
URL: https://github.com/apache/tvm/pull/14185#discussion_r1126682172
##########
src/tir/transforms/split_host_device.cc:
##########
@@ -104,44 +81,42 @@ class VarUseDefAnalysis : public StmtExprMutator {
dyn_shmem_size_ = dyn_shmem_size_ * (op->dtype.bytes());
use_dyn_shmem_ = true;
}
- return StmtExprMutator::VisitStmt_(op);
+ StmtVisitor::VisitStmt_(op);
}
- Stmt VisitStmt_(const AllocateConstNode* op) final {
- this->HandleDef(op->buffer_var.get());
- return StmtExprMutator::VisitStmt_(op);
- }
+ // recording what thread axis have been visited.
+ std::unordered_set<const IterVarNode*> defined_thread;
+};
- Stmt VisitStmt_(const StoreNode* op) final {
- LOG(FATAL) << "Unexpected use of deprecated StoreNode. Please use BufferStoreNode instead.";
- }
+/*!
+ * \brief Mutator class to remove unrefenced let stmt/expressions.
+ * \param use_count The pre-computed variable to use count map.
+ */
+class UnreferencedLetRemover : public StmtExprMutator {
Review Comment:
Thank you for your review! I have updated the code according to your suggestions.
--
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
[GitHub] [tvm] yzh119 commented on a diff in pull request #14185: [Refactor] Move `VarUseDefAnalysis` to header file
Posted by "yzh119 (via GitHub)" <gi...@apache.org>.
yzh119 commented on code in PR #14185:
URL: https://github.com/apache/tvm/pull/14185#discussion_r1126669729
##########
src/tir/analysis/var_use_def_analysis.h:
##########
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*!
+ * \file tvm/src/tir/analysis/var_use_def_analyzer.h
+ * \brief Variable definition and usage analysis class.
+ */
+#ifndef TVM_TIR_ANALYSIS_VAR_USE_DEF_ANALYSIS_H_
+#define TVM_TIR_ANALYSIS_VAR_USE_DEF_ANALYSIS_H_
+
+#include <tvm/tir/analysis.h>
+
+#include <unordered_map>
+
+#include "../../runtime/thread_storage_scope.h"
+#include "../transforms/ir_utils.h"
+
+namespace tvm {
+namespace tir {
+
+/*!
+ * \brief Visitor class to perform use/def analysis, also delete unreferenced lets.
+ * \param defined_vars Variables that have been defined.
+ * \param visit_thread_extent Whether enters thread extent expressions or not.
+ * \sa UndefinedVars
+ */
+class VarUseDefAnalyzer : public StmtExprVisitor {
+ public:
+ explicit VarUseDefAnalyzer(const Array<Var>& defined_vars, bool visit_thread_extent = true);
+ // The fields are publically readible to
+ // be accessible to the users.
+ bool visit_thread_extent_{true};
+ Array<Var> undefined_;
+
+ std::unordered_map<const VarNode*, int> use_count_;
Review Comment:
I don't think there are any specific reasons and I just kept their original type in `split_host_device.cc`. I've changed to use `const VarNode*` for all cases.
--
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
[GitHub] [tvm] yzh119 commented on pull request #14185: [Refactor] Move `VarUseDefAnalysis` to header file
Posted by "yzh119 (via GitHub)" <gi...@apache.org>.
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
[GitHub] [tvm] Lunderberg commented on a diff in pull request #14185: [Refactor] Move `VarUseDefAnalysis` to header file
Posted by "Lunderberg (via GitHub)" <gi...@apache.org>.
Lunderberg commented on code in PR #14185:
URL: https://github.com/apache/tvm/pull/14185#discussion_r1124539436
##########
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:
I agree, the collected variable definitions may be useful in a lot of cases. Exposing the visitor itself also allows for analyzing multiple expressions, then examining variables that are undefined in any of them. I'm wondering if there's a tighter API that we'd want to expose, but nothing is coming to mind.
--
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
[GitHub] [tvm] Lunderberg commented on a diff in pull request #14185: [Refactor] Move `VarUseDefAnalysis` to header file
Posted by "Lunderberg (via GitHub)" <gi...@apache.org>.
Lunderberg commented on code in PR #14185:
URL: https://github.com/apache/tvm/pull/14185#discussion_r1124541359
##########
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:
Though, could we inherit from `StmtExprVisitor` instead of `StmtExprMutator`? The only modification done is the deletion of unreferenced lets, but that really feels like something that should be part of the `RemoveNoOp` pass.
##########
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:
Though, could we inherit from `StmtExprVisitor` instead of `StmtExprMutator`? The only modification done is the deletion of unreferenced lets, but that really feels like something that should be part of the `RemoveNoOp` pass rather than an analysis pass.
--
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
[GitHub] [tvm] tqchen commented on a diff in pull request #14185: [Refactor] Move `VarUseDefAnalysis` to header file
Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen commented on code in PR #14185:
URL: https://github.com/apache/tvm/pull/14185#discussion_r1125547313
##########
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:
That works
--
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
[GitHub] [tvm] Hzfengsy merged pull request #14185: [Refactor] Move `VarUseDefAnalysis` to header file
Posted by "Hzfengsy (via GitHub)" <gi...@apache.org>.
Hzfengsy merged PR #14185:
URL: https://github.com/apache/tvm/pull/14185
--
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
[GitHub] [tvm] yzh119 commented on a diff in pull request #14185: [Refactor] Move `VarUseDefAnalysis` to header file
Posted by "yzh119 (via GitHub)" <gi...@apache.org>.
yzh119 commented on code in PR #14185:
URL: https://github.com/apache/tvm/pull/14185#discussion_r1125446681
##########
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:
@Lunderberg I'll try to decouple these functionalities and make it a `StmtExprVisitor`.
--
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
[GitHub] [tvm] yzh119 commented on a diff in pull request #14185: [Refactor] Move `VarUseDefAnalysis` to header file
Posted by "yzh119 (via GitHub)" <gi...@apache.org>.
yzh119 commented on code in PR #14185:
URL: https://github.com/apache/tvm/pull/14185#discussion_r1125502947
##########
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:
Sounds good, besides the location issue. Should we decouple the Analyzer into 3 functions?
1. VarUseDefAnalyzer
2. DeviceInfoCollector
3. SimplifyingLetStmt
I suppose 2 and 3 are not necessary for the general def-use analysis case but necessary for `SplitHostDevice` pass, I prefer doing the refactor and only keeping `VarUseDefAnalyzer` in the header, and making 2 & 3 parts of `split_host_device.cc`.
##########
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:
@tqchen Sounds good, besides the location issue. Should we decouple the Analyzer into 3 functions?
1. VarUseDefAnalyzer
2. DeviceInfoCollector
3. SimplifyingLetStmt
I suppose 2 and 3 are not necessary for the general def-use analysis case but necessary for `SplitHostDevice` pass, I prefer doing the refactor and only keeping `VarUseDefAnalyzer` in the header, and making 2 & 3 parts of `split_host_device.cc`.
--
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
[GitHub] [tvm] yzh119 commented on a diff in pull request #14185: [Refactor] Move `VarUseDefAnalysis` to header file
Posted by "yzh119 (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] tqchen commented on a diff in pull request #14185: [Refactor] Move `VarUseDefAnalysis` to header file
Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen commented on code in PR #14185:
URL: https://github.com/apache/tvm/pull/14185#discussion_r1125462325
##########
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:
This is a case where hiding things internally still helps, for advanced use-cases, we can put it as an internal header under src/tir/analysis/var_def_analyzer.h
--
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
[GitHub] [tvm] tqchen commented on pull request #14185: [Refactor] Move `VarUseDefAnalysis` to header file
Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen commented on PR #14185:
URL: https://github.com/apache/tvm/pull/14185#issuecomment-1458188752
cc @Hzfengsy please take another look and manage the 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-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org