1#ifndef FREE_TENSOR_SHRINK_FOR_H
2#define FREE_TENSOR_SHRINK_FOR_H
16 bool hasSideEffect_ =
false;
33 std::vector<Var> iterStack_;
34 std::vector<std::unordered_set<std::string>> namesStack_;
37 std::unordered_set<Stmt> subASTAncestors_;
38 bool inSubAST_ =
false;
41 ShrinkFor(
bool unordered =
false) : unordered_(unordered) {}
48 virtual std::unordered_set<std::string>
78 bool unordered =
false);
80 bool doSimplify =
true,
bool unordered =
false) {
Definition: shrink_for.h:15
void visit(const Store &op) override
Definition: shrink_for.cc:180
bool hasSideEffect() const
Definition: shrink_for.h:19
Definition: comp_transient_bounds.h:50
BaseClass::StmtRetType visit(const For &op) override
Definition: comp_transient_bounds.h:128
bool isValid() const
Definition: ref.h:89
Definition: shrink_for.h:27
Stmt visitStmt(const Stmt &stmt) override
Definition: shrink_for.cc:192
void setSubAST(const Stmt &subAST)
Definition: shrink_for.cc:390
virtual std::unordered_set< std::string > filterNames(const std::unordered_set< std::string > &names)
Definition: shrink_for.h:49
ShrinkFor(bool unordered=false)
Definition: shrink_for.h:41
virtual bool filterLoop(const For &op)
Definition: shrink_for.h:46
Stmt visit(const For &op) override
Definition: shrink_for.cc:248
ID id() const
Definition: ast.cc:362
const std::unordered_set< std::string > & names() const override
Definition: symbol_table.h:129
#define DEFINE_PASS_FOR_FUNC(pass)
Definition: func.h:88
Definition: allocator.h:9
std::unordered_map< K, V, Hasher, HashComparator > ASTHashMap
Definition: hash.h:114
Stmt shrinkFor(const Stmt &op, const ID &subAST=ID(), bool doSimplify=true, bool unordered=false)
Definition: shrink_for.cc:396
Ref< StmtNode > Stmt
Definition: ast.h:152