Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REFACTOR] Remove old Low-level Visitor/Mutator #4612

Merged
merged 1 commit into from
Jan 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 0 additions & 127 deletions include/tvm/ir_mutator.h

This file was deleted.

151 changes: 0 additions & 151 deletions include/tvm/ir_visitor.h

This file was deleted.

8 changes: 4 additions & 4 deletions src/autotvm/feature_visitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ enum AnnotationType {
class FeatureVisitor : public StmtExprVisitor {
public:
// for loop
void VisitStmt_(const For *op);
void VisitStmt_(const AttrStmt *op);
void VisitStmt_(const For* op) final;
void VisitStmt_(const AttrStmt* op) final;

// memory access
void VisitExpr_(const Load *op);
void VisitStmt_(const Store *op);
void VisitExpr_(const Load* op) final;
void VisitStmt_(const Store* op) final;

using StmtExprVisitor::VisitStmt_;
using StmtExprVisitor::VisitExpr_;
Expand Down
4 changes: 2 additions & 2 deletions src/autotvm/touch_extractor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class IndexParser: public ExprVisitor {
this->VisitExpr(expr);
}

void VisitExpr_(const Variable *op) {
void VisitExpr_(const Variable* op) final {
// TODO(lmzheng): handle more index types (multiple occurrence)
if (pattern_map.count(op) == 0) {
pattern_map[op] = TouchPattern();
Expand All @@ -60,7 +60,7 @@ class IndexParser: public ExprVisitor {
}
}

void VisitExpr_(const Mul *op) {
void VisitExpr_(const Mul* op) final {
if (op->a.as<Variable>()) {
if (const auto stride = op->b.as<IntImm>()) {
next_stride_ = stride->value;
Expand Down
10 changes: 5 additions & 5 deletions src/autotvm/touch_extractor.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,31 +90,31 @@ class TouchExtractor : public FeatureVisitor {
}

// arithmetic stats
void VisitExpr_(const Add *op) {
void VisitExpr_(const Add* op) final {
if (op->dtype.is_float())
itervar_map[itervar_stack_.back()].add_ct++;
FeatureVisitor::VisitExpr_(op);
}

void VisitExpr_(const Sub *op) {
void VisitExpr_(const Sub* op) final {
if (op->dtype.is_float())
itervar_map[itervar_stack_.back()].add_ct++;
FeatureVisitor::VisitExpr_(op);
}

void VisitExpr_(const Mul *op) {
void VisitExpr_(const Mul* op) final {
if (op->dtype.is_float())
itervar_map[itervar_stack_.back()].mul_ct++;
FeatureVisitor::VisitExpr_(op);
}

void VisitExpr_(const Div *op) {
void VisitExpr_(const Div* op) final {
if (op->dtype.is_float())
itervar_map[itervar_stack_.back()].div_ct++;
FeatureVisitor::VisitExpr_(op);
}

void VisitExpr_(const Mod *op) {
void VisitExpr_(const Mod* op) final {
if (op->dtype.is_float())
itervar_map[itervar_stack_.back()].div_ct++;
FeatureVisitor::VisitExpr_(op);
Expand Down
Loading