FreeTensor
Loading...
Searching...
No Matches
annotate_conds.h
Go to the documentation of this file.
1#ifndef FREE_TENSOR_ANNOTATE_CONDS_H
2#define FREE_TENSOR_ANNOTATE_CONDS_H
3
4#include <mutator.h>
5
6namespace freetensor {
7
8class AnnotateConds : public Mutator {
9 std::vector<Expr> conds_; // stack of conditions, may be null
10
11 private:
12 void addCond(const Expr &expr);
13
14 protected:
15 Stmt visit(const StmtSeq &op) override;
16 Stmt visit(const For &op) override;
17 Stmt visit(const If &op) override;
18 Stmt visit(const Assert &op) override;
19 Stmt visit(const Assume &op) override;
20};
21
56inline Stmt annotateConds(const Stmt &op) { return AnnotateConds()(op); }
57
58} // namespace freetensor
59
60#endif // FREE_TENSOR_ANNOTATE_CONDS_H
Definition: annotate_conds.h:8
Stmt visit(const StmtSeq &op) override
Definition: annotate_conds.cc:19
Definition: mutator.h:11
Definition: allocator.h:9
Stmt annotateConds(const Stmt &op)
Definition: annotate_conds.h:56