1#ifndef FREE_TENSOR_CACHE_H
2#define FREE_TENSOR_CACHE_H
12 std::string oldVar_, newVar_;
21 : stmt_(stmt), oldVar_(oldVar), mtype_(mtype) {
22 newVar_ = oldVar_ + (isReduction ?
".r" :
".c");
40 const std::string &
newVar()
const {
return newVar_; }
56 std::string oldVar_, newVar_;
57 ID oldDef_, fillStmt_, flushStmt_;
63 const std::string &newVar,
const ID &oldDef,
65 : stmt_(stmt), oldVar_(oldVar), newVar_(newVar), oldDef_(oldDef),
66 rwRange_(rwRange), wRange_(wRange) {}
80 std::string oldVar_, newVar_;
81 ID oldDef_, newDef_, initStmt_, reduceStmt_;
85 bool inNewVar_ =
false;
89 const std::string &newVar,
const ID &oldDef,
91 : stmt_(stmt), oldVar_(oldVar), newVar_(newVar), oldDef_(oldDef),
92 newDef_(newDef), range_(
range) {}
106std::pair<Stmt, std::tuple<ID, ID, std::string, ID>>
107cache(
const Stmt &ast,
const ID &stmt,
const std::string &var,
MemType mtype);
109std::pair<Stmt, std::tuple<ID, ID, std::string, ID>>
MakeCacheVar(const ID &stmt, const std::string &oldVar, MemType mtype, bool isReduction)
Definition: cache.h:19
const std::string & newVar() const
Definition: cache.h:40
Stmt visit(const VarDef &op) override
Definition: cache.cc:36
const ID & newDef() const
Definition: cache.h:42
const ID & oldDef() const
Definition: cache.h:41
Stmt visitStmt(const Stmt &op) override
Definition: cache.cc:16
Stmt visitStmt(const Stmt &op) override
Definition: cache.cc:81
MakeFillAndFlush(const ID &stmt, const std::string &oldVar, const std::string &newVar, const ID &oldDef, const AccessBound &rwRange, const AccessBound &wRange)
Definition: cache.h:62
Stmt visit(const VarDef &op) override
Definition: cache.cc:144
const ID & fillStmt() const
Definition: cache.h:68
const ID & flushStmt() const
Definition: cache.h:69
Stmt visit(const VarDef &op) override
Definition: cache.cc:216
const ID & initStmt() const
Definition: cache.h:94
const ID & reduceStmt() const
Definition: cache.h:95
MakeInitAndReduce(const ID &stmt, const std::string &oldVar, const std::string &newVar, const ID &oldDef, const ID &newDef, const AccessBound &range)
Definition: cache.h:88
Stmt visitStmt(const Stmt &op) override
Definition: cache.cc:155
Definition: symbol_table.h:122
BaseClass::StmtRetType visit(const VarDef &op) override
Definition: symbol_table.h:167
Definition: allocator.h:9
std::pair< Stmt, std::tuple< ID, ID, std::string, ID > > cache(const Stmt &ast, const ID &stmt, const std::string &var, MemType mtype)
Definition: cache.cc:264
Ref< StmtNode > Stmt
Definition: ast.h:152
std::pair< Stmt, std::tuple< ID, ID, std::string, ID > > cacheReduction(const Stmt &ast, const ID &stmt, const std::string &var, MemType mtype)
Definition: cache.cc:295
PBSet range(T &&map)
Definition: presburger.h:1054
MemType
Definition: mem_type.h:14
Definition: comp_access_bound.h:15