FreeTensor
Loading...
Searching...
No Matches
stmt.h
Go to the documentation of this file.
1#ifndef FREE_TENSOR_STMT_H
2#define FREE_TENSOR_STMT_H
3
4#include <string>
5#include <vector>
6
7#include <ast.h>
8#include <buffer.h>
9#include <container_utils.h>
11#include <except.h>
12#include <for_property.h>
13#include <reduce_op.h>
14
15namespace freetensor {
16
22class AnyNode : public StmtNode {
23 public:
24 void compHash() override;
26};
28inline Stmt
29makeAny(std::source_location loc = std::source_location::current()) {
30 Any a = Any::make();
31 a->setDebugBlame(loc);
32 return a;
33}
34
42class StmtSeqNode : public StmtNode {
43 public:
45 std::vector<Stmt> children() const override { return stmts_; }
46 void compHash() override;
48};
50template <class Tstmts>
51Stmt makeStmtSeq(Tstmts &&stmts, const Metadata &metadata = nullptr,
52 const ID &id = {},
53 std::source_location loc = std::source_location::current()) {
55 s->metadata() = metadata;
56 s->setId(id);
57 s->stmts_ = std::forward<Tstmts>(stmts);
58 s->setDebugBlame(loc);
59 return s;
60}
61inline Stmt
62makeStmtSeq(std::initializer_list<Stmt> stmts,
63 const Metadata &metadata = nullptr, const ID &id = {},
64 std::source_location loc = std::source_location::current()) {
66 s->metadata() = metadata;
67 s->setId(id);
68 s->stmts_ = stmts;
69 s->setDebugBlame(loc);
70 return s;
71}
72
83class VarDefNode : public StmtNode {
84 public:
85 std::string name_;
87
99 std::optional<std::string> viewOf_;
100
102 bool pinned_;
103 std::vector<Stmt> children() const override { return {body_}; }
104 void compHash() override;
106};
108template <class Tbuffer, class Tbody>
109Stmt makeVarDef(const std::string &name, Tbuffer &&buffer,
110 const std::optional<std::string> &viewOf, Tbody &&body,
111 bool pinned, const Metadata &metadata = nullptr,
112 const ID &id = {},
113 std::source_location loc = std::source_location::current()) {
114 ASSERT(!name.empty());
115 VarDef d = VarDef::make();
116 d->metadata() = metadata;
117 d->setId(id);
118 d->name_ = name;
119 d->buffer_ = std::forward<Tbuffer>(buffer);
120 d->viewOf_ = viewOf;
121 d->body_ = std::forward<Tbody>(body);
122 d->pinned_ = pinned;
123 d->setDebugBlame(loc);
124 return d;
125}
126
132class StoreNode : public StmtNode {
133 public:
134 std::string var_;
137 void compHash() override;
139};
141template <class Tindices, class Texpr>
142Stmt makeStore(const std::string &var, Tindices &&indices, Texpr &&expr,
143 const Metadata &metadata = nullptr, const ID &id = {},
144 std::source_location loc = std::source_location::current()) {
145 ASSERT(!var.empty());
146 Store s = Store::make();
147 s->metadata() = metadata;
148 s->setId(id);
149 s->var_ = var;
150 s->indices_ = std::forward<Tindices>(indices);
151 s->expr_ = std::forward<Texpr>(expr);
152 s->setDebugBlame(loc);
153 return s;
154}
155template <class Texpr>
156Stmt makeStore(const std::string &var, const std::vector<Expr> &indices,
157 Texpr &&expr, const Metadata &metadata = nullptr,
158 const ID &id = {},
159 std::source_location loc = std::source_location::current()) {
160 ASSERT(!var.empty());
161 Store s = Store::make();
162 s->metadata() = metadata;
163 s->setId(id);
164 s->var_ = var;
165 s->indices_ = indices;
166 s->expr_ = std::forward<Texpr>(expr);
167 s->setDebugBlame(loc);
168 return s;
169}
170
176class AllocNode : public StmtNode {
177 public:
178 std::string var_;
179 void compHash() override;
181};
183inline Stmt
184makeAlloc(const std::string &var, const Metadata &metadata = nullptr,
185 const ID &id = {},
186 std::source_location loc = std::source_location::current()) {
187 ASSERT(!var.empty());
188 Alloc a = Alloc::make();
189 a->metadata() = metadata;
190 a->setId(id);
191 a->var_ = var;
192 a->setDebugBlame(loc);
193 return a;
194}
195
201class FreeNode : public StmtNode {
202 public:
203 std::string var_;
204 void compHash() override;
206};
208inline Stmt
209makeFree(const std::string &var, const Metadata &metadata = nullptr,
210 const ID &id = {},
211 std::source_location loc = std::source_location::current()) {
212 ASSERT(!var.empty());
213 Free f = Free::make();
214 f->metadata() = metadata;
215 f->setId(id);
216 f->var_ = var;
217 f->setDebugBlame(loc);
218 return f;
219}
220
229class ReduceToNode : public StmtNode {
230 public:
231 std::string var_;
235
243 bool sync_;
244
245 void compHash() override;
247};
249template <class Tindices, class Texpr>
250Stmt makeReduceTo(const std::string &var, Tindices &&indices, ReduceOp op,
251 Texpr &&expr, bool sync, const Metadata &metadata = nullptr,
252 const ID &id = {},
253 std::source_location loc = std::source_location::current()) {
254 ASSERT(!var.empty());
256 a->metadata() = metadata;
257 a->setId(id);
258 a->var_ = var;
259 a->indices_ = std::forward<Tindices>(indices);
260 a->op_ = op;
261 a->expr_ = std::forward<Texpr>(expr);
262 a->sync_ = sync;
263 a->setDebugBlame(loc);
264 return a;
265}
266template <class Texpr>
267Stmt makeReduceTo(const std::string &var, const std::vector<Expr> &indices,
268 ReduceOp op, Texpr &&expr, bool sync,
269 const Metadata &metadata = nullptr, const ID &id = {},
270 std::source_location loc = std::source_location::current()) {
271 ASSERT(!var.empty());
273 a->metadata() = metadata;
274 a->setId(id);
275 a->var_ = var;
276 a->indices_ = indices;
277 a->op_ = op;
278 a->expr_ = std::forward<Texpr>(expr);
279 a->sync_ = sync;
280 a->setDebugBlame(loc);
281 return a;
282}
283
287class ForNode : public StmtNode {
288 public:
289 std::string iter_;
290
291 // We also record len_ because it is used in may passes. If we computes len_
292 // every time and call simplify to propagate the constants, it is very
293 // time consuming
300
301 bool isCtrlFlow() const override { return true; }
302 std::vector<Stmt> children() const override { return {body_}; }
303
304 void compHash() override;
305
307};
309template <class Tbegin, class Tend, class Tstep, class Tlen, class Tbody,
310 class Tproperty>
311Stmt makeFor(const std::string &iter, Tbegin &&begin, Tend &&end, Tstep &&step,
312 Tlen &&len, Tproperty &&property, Tbody &&body,
313 const Metadata &metadata = nullptr, const ID &id = {},
314 std::source_location loc = std::source_location::current()) {
315 ASSERT(!iter.empty());
316 For f = For::make();
317 f->metadata() = metadata;
318 f->setId(id);
319 f->iter_ = iter;
320 f->begin_ = std::forward<Tbegin>(begin);
321 f->end_ = std::forward<Tend>(end);
322 f->step_ = std::forward<Tstep>(step);
323 f->len_ = std::forward<Tlen>(len);
324 f->property_ = std::forward<Tproperty>(property);
325 f->body_ = std::forward<Tbody>(body);
326 f->setDebugBlame(loc);
327 return f;
328}
329
333class IfNode : public StmtNode {
334 public:
338
339 bool isCtrlFlow() const override { return true; }
340 std::vector<Stmt> children() const override {
341 if (elseCase_.isValid()) {
342 return {thenCase_, elseCase_};
343 } else {
344 return {thenCase_};
345 }
346 }
347
348 void compHash() override;
349
351};
353template <class Tcond, class Tthen, class Telse = std::nullptr_t>
354Stmt makeIf(Tcond &&cond, Tthen &&thenCase, Telse &&elseCase,
355 const Metadata &metadata = nullptr, const ID &id = {},
356 std::source_location loc = std::source_location::current()) {
357 If i = If::make();
358 i->metadata() = metadata;
359 i->setId(id);
360 i->cond_ = std::forward<Tcond>(cond);
361 i->thenCase_ = std::forward<Tthen>(thenCase);
362 i->elseCase_ = std::forward<Telse>(elseCase);
363 i->setDebugBlame(loc);
364 return i;
365}
366template <class Tcond, class Tthen, class Telse = std::nullptr_t>
367Stmt makeIf(Tcond &&cond, Tthen &&thenCase, const Metadata &metadata = nullptr,
368 const ID &id = {},
369 std::source_location loc = std::source_location::current()) {
370 return makeIf(cond, thenCase, nullptr, metadata, id, loc);
371}
372
383class AssertNode : public StmtNode {
384 public:
387 bool isCtrlFlow() const override { return true; }
388 std::vector<Stmt> children() const override { return {body_}; }
389 void compHash() override;
391};
393template <class Tcond, class Tbody>
394Stmt makeAssert(Tcond &&cond, Tbody &&body, const Metadata &metadata = nullptr,
395 const ID &id = {},
396 std::source_location loc = std::source_location::current()) {
397 Assert a = Assert::make();
398 a->metadata() = metadata;
399 a->setId(id);
400 a->cond_ = std::forward<Tcond>(cond);
401 a->body_ = std::forward<Tbody>(body);
402 a->setDebugBlame(loc);
403 return a;
404}
405
417class AssumeNode : public StmtNode {
418 public:
421 std::vector<Stmt> children() const override { return {body_}; }
422 void compHash() override;
424};
426template <class Tcond, class Tbody>
427Stmt makeAssume(Tcond &&cond, Tbody &&body, const Metadata &metadata = nullptr,
428 const ID &id = {},
429 std::source_location loc = std::source_location::current()) {
430 Assume a = Assume::make();
431 a->metadata() = metadata;
432 a->setId(id);
433 a->cond_ = std::forward<Tcond>(cond);
434 a->body_ = std::forward<Tbody>(body);
435 a->setDebugBlame(loc);
436 return a;
437}
438
444class EvalNode : public StmtNode {
445 public:
447 void compHash() override;
449};
451template <class T>
452Stmt makeEval(T &&expr, const Metadata &metadata = nullptr, const ID &id = {},
453 std::source_location loc = std::source_location::current()) {
454 Eval e = Eval::make();
455 e->metadata() = metadata;
456 e->setId(id);
457 e->expr_ = std::forward<T>(expr);
458 e->setDebugBlame(loc);
459 return e;
460}
461
465enum class MatMulBackend : size_t {
466 Mkl = 0,
467 Cublas,
468 Cutlass,
469 CutlassMicroBlock, // CUTLASS's micro kernel, invocable by a single
470 // thread-block
471 // ------ THE FOLLOWING BACKENDS CAN ONLY BE LOWERED TO ------
472 CutlassMicroThread, // CUTLASS's micro kernel, invocable by a single thread
473 // ----------------------------
475};
476
477constexpr std::array matMulBackendNames = {
478 "mkl", "cublas", "cutlass", "cutlass-micro-block", "cutlass-micro-thread",
479};
480static_assert(baseDataTypeNames.size() == (size_t)BaseDataType::NumTypes);
481
482inline std::ostream &operator<<(std::ostream &os, MatMulBackend backend) {
483 return os << matMulBackendNames.at((size_t)backend);
484}
485
486inline MatMulBackend parseMatMulBackend(const std::string &_str) {
487 auto &&str = tolower(_str);
488 for (auto &&[i, s] : views::enumerate(matMulBackendNames)) {
489 if (s == str) {
490 return (MatMulBackend)i;
491 }
492 }
493 ERROR(FT_MSG << "Unrecognized MatMul backend \"" << _str
494 << "\". Candidates are (case-insensitive): "
495 << (matMulBackendNames | join(", ")));
496}
497
501class MatMulNode : public StmtNode {
502 public:
506
507 // c_ = alpha_ * a_ * b_ + beta_ * c_
508 // a_ is an m_ * k_ matrix
509 // b_ is a k_ * n_ matrix
510 // c_ is an m_ * n_ matrix
528 this}; // Equivalent loop statements, to help dependence analysis
529 std::vector<Stmt> children() const override { return {equivalent_}; }
530 void compHash() override;
532};
534inline Stmt
536 const Ref<CutlassMicroKernelProperty> &cutlassMicroKernelProperty,
537 const Expr &a, const Expr &b, const Expr &c, const Expr &alpha,
538 const Expr &beta, const Expr &m, const Expr &k, const Expr &n,
539 const Expr &lda, const Expr &ldb, const Expr &ldc,
540 const Expr &stridea, const Expr &strideb, const Expr &stridec,
541 const Expr &batchSize, bool aIsRowMajor, bool bIsRowMajor,
542 bool cIsRowMajor, const Stmt &equivalent,
543 const Metadata &metadata = nullptr, const ID &id = {},
544 std::source_location loc = std::source_location::current()) {
545 MatMul s = MatMul::make();
546 s->metadata() = metadata;
547 s->setId(id);
548 s->backend_ = backend;
549 s->cutlassMicroKernelProperty_ = cutlassMicroKernelProperty;
550 s->a_ = a;
551 s->b_ = b;
552 s->c_ = c;
553 s->alpha_ = alpha;
554 s->beta_ = beta;
555 s->m_ = m;
556 s->k_ = k;
557 s->n_ = n;
558 s->lda_ = lda;
559 s->ldb_ = ldb;
560 s->ldc_ = ldc;
561 s->stridea_ = stridea;
562 s->strideb_ = strideb;
563 s->stridec_ = stridec;
564 s->batchSize_ = batchSize;
565 s->aIsRowMajor_ = aIsRowMajor;
566 s->bIsRowMajor_ = bIsRowMajor;
567 s->cIsRowMajor_ = cIsRowMajor;
568 s->equivalent_ = equivalent;
569 s->setDebugBlame(loc);
570 return s;
571}
572
573class MarkVersionNode : public StmtNode {
574 public:
575 std::string tapeName_, var_;
576 void compHash() override;
578};
580inline Stmt
581makeMarkVersion(const std::string &tapeName, const std::string &var,
582 const Metadata &metadata = nullptr, const ID &id = {},
583 std::source_location loc = std::source_location::current()) {
585 s->metadata() = metadata;
586 s->setId(id);
587 s->tapeName_ = tapeName;
588 s->var_ = var;
589 s->setDebugBlame(loc);
590 return s;
591}
592
593} // namespace freetensor
594
595#endif // FREE_TENSOR_STMT_H
#define DEFINE_NODE_TRAIT(name)
Definition: ast.h:106
void setDebugBlame(std::source_location loc)
Definition: ast.h:141
Definition: stmt.h:176
std::string var_
Definition: stmt.h:178
void compHash() override
Definition: stmt.cc:10
Definition: stmt.h:22
void compHash() override
Definition: stmt.cc:6
Definition: stmt.h:383
void compHash() override
Definition: stmt.cc:15
SubTree< StmtNode > body_
Definition: stmt.h:386
SubTree< ExprNode > cond_
Definition: stmt.h:385
std::vector< Stmt > children() const override
Definition: stmt.h:388
bool isCtrlFlow() const override
Definition: stmt.h:387
Definition: stmt.h:417
void compHash() override
Definition: stmt.cc:16
std::vector< Stmt > children() const override
Definition: stmt.h:421
SubTree< StmtNode > body_
Definition: stmt.h:420
SubTree< ExprNode > cond_
Definition: stmt.h:419
Definition: stmt.h:444
SubTree< ExprNode > expr_
Definition: stmt.h:446
void compHash() override
Definition: stmt.cc:17
Definition: stmt.h:287
void compHash() override
Definition: stmt.cc:13
SubTree< ForProperty > property_
Definition: stmt.h:298
SubTree< ExprNode > begin_
Definition: stmt.h:294
SubTree< ExprNode > step_
Definition: stmt.h:296
std::vector< Stmt > children() const override
Definition: stmt.h:302
SubTree< ExprNode > len_
Definition: stmt.h:297
bool isCtrlFlow() const override
Definition: stmt.h:301
SubTree< ExprNode > end_
Definition: stmt.h:295
std::string iter_
Definition: stmt.h:289
SubTree< StmtNode > body_
Definition: stmt.h:299
Definition: stmt.h:201
void compHash() override
Definition: stmt.cc:11
std::string var_
Definition: stmt.h:203
Definition: id.h:18
Definition: stmt.h:333
SubTree< ExprNode > cond_
Definition: stmt.h:335
std::vector< Stmt > children() const override
Definition: stmt.h:340
SubTree< StmtNode > thenCase_
Definition: stmt.h:336
bool isCtrlFlow() const override
Definition: stmt.h:339
void compHash() override
Definition: stmt.cc:14
SubTree< StmtNode, NullPolicy::Nullable > elseCase_
Definition: stmt.h:337
Definition: stmt.h:573
std::string tapeName_
Definition: stmt.h:575
std::string var_
Definition: stmt.h:575
void compHash() override
Definition: stmt.cc:19
Definition: stmt.h:501
bool aIsRowMajor_
Definition: stmt.h:526
MatMulBackend backend_
Definition: stmt.h:503
std::vector< Stmt > children() const override
Definition: stmt.h:529
SubTree< ExprNode > ldb_
Definition: stmt.h:520
SubTree< ExprNode > beta_
Definition: stmt.h:515
SubTree< ExprNode > alpha_
Definition: stmt.h:514
SubTree< ExprNode > m_
Definition: stmt.h:516
SubTree< ExprNode > stridec_
Definition: stmt.h:524
SubTree< ExprNode > batchSize_
Definition: stmt.h:525
SubTree< ExprNode > k_
Definition: stmt.h:517
SubTree< ExprNode > lda_
Definition: stmt.h:519
SubTree< ExprNode > n_
Definition: stmt.h:518
SubTree< ExprNode > ldc_
Definition: stmt.h:521
SubTree< StmtNode > equivalent_
Definition: stmt.h:527
bool bIsRowMajor_
Definition: stmt.h:526
SubTree< CutlassMicroKernelProperty, NullPolicy::Nullable > cutlassMicroKernelProperty_
Definition: stmt.h:505
bool cIsRowMajor_
Definition: stmt.h:526
void compHash() override
Definition: stmt.cc:18
SubTree< ExprNode > c_
Definition: stmt.h:513
SubTree< ExprNode > a_
Definition: stmt.h:511
SubTree< ExprNode > b_
Definition: stmt.h:512
SubTree< ExprNode > strideb_
Definition: stmt.h:523
SubTree< ExprNode > stridea_
Definition: stmt.h:522
Definition: stmt.h:229
void compHash() override
Definition: stmt.cc:12
std::string var_
Definition: stmt.h:231
SubTreeList< ExprNode > indices_
Definition: stmt.h:232
ReduceOp op_
Definition: stmt.h:233
SubTree< ExprNode > expr_
Definition: stmt.h:234
bool sync_
Definition: stmt.h:243
Definition: ref.h:24
static Ref make()
Definition: ref.h:105
Definition: ast.h:223
Definition: stmt.h:42
SubTreeList< StmtNode > stmts_
Definition: stmt.h:44
std::vector< Stmt > children() const override
Definition: stmt.h:45
void compHash() override
Definition: stmt.cc:7
Definition: stmt.h:132
std::string var_
Definition: stmt.h:134
void compHash() override
Definition: stmt.cc:9
SubTree< ExprNode > expr_
Definition: stmt.h:136
SubTreeList< ExprNode > indices_
Definition: stmt.h:135
Definition: sub_tree.h:305
Definition: sub_tree.h:134
Definition: stmt.h:83
bool pinned_
Definition: stmt.h:102
SubTree< StmtNode > body_
Definition: stmt.h:101
void compHash() override
Definition: stmt.cc:8
SubTree< Buffer > buffer_
Definition: stmt.h:86
std::vector< Stmt > children() const override
If pinned, SinkVar and ShrinkVar will not alter this node.
Definition: stmt.h:103
std::optional< std::string > viewOf_
Definition: stmt.h:99
std::string name_
Definition: stmt.h:85
#define ASSERT(expr)
Definition: except.h:152
#define ERROR(msg)
Definition: except.h:141
#define FT_MSG
Definition: except.h:23
int n
Definition: metadata.cc:15
Definition: allocator.h:9
Ref< AssumeNode > Assume
Definition: stmt.h:425
Ref< FreeNode > Free
Definition: stmt.h:207
Ref< VarDefNode > VarDef
Definition: stmt.h:107
Stmt makeEval(T &&expr, const Metadata &metadata=nullptr, const ID &id={}, std::source_location loc=std::source_location::current())
Definition: stmt.h:452
Stmt makeAssume(Tcond &&cond, Tbody &&body, const Metadata &metadata=nullptr, const ID &id={}, std::source_location loc=std::source_location::current())
Definition: stmt.h:427
Ref< MarkVersionNode > MarkVersion
Definition: stmt.h:579
std::string tolower(const std::string &s)
Definition: container_utils.h:142
Ref< StoreNode > Store
Definition: stmt.h:140
Ref< ReduceToNode > ReduceTo
Definition: stmt.h:248
Ref< IfNode > If
Definition: stmt.h:352
Stmt makeAssert(Tcond &&cond, Tbody &&body, const Metadata &metadata=nullptr, const ID &id={}, std::source_location loc=std::source_location::current())
Definition: stmt.h:394
Ref< ForNode > For
Definition: stmt.h:308
MatMulBackend
Definition: stmt.h:465
Ref< EvalNode > Eval
Definition: stmt.h:450
constexpr std::array matMulBackendNames
Definition: stmt.h:477
Stmt makeStore(const std::string &var, Tindices &&indices, Texpr &&expr, const Metadata &metadata=nullptr, const ID &id={}, std::source_location loc=std::source_location::current())
Definition: stmt.h:142
Stmt makeAny(std::source_location loc=std::source_location::current())
Definition: stmt.h:29
Stmt makeReduceTo(const std::string &var, Tindices &&indices, ReduceOp op, Texpr &&expr, bool sync, const Metadata &metadata=nullptr, const ID &id={}, std::source_location loc=std::source_location::current())
Definition: stmt.h:250
Ref< StmtNode > Stmt
Definition: ast.h:152
Stmt makeStmtSeq(Tstmts &&stmts, const Metadata &metadata=nullptr, const ID &id={}, std::source_location loc=std::source_location::current())
Definition: stmt.h:51
Stmt makeMatMul(MatMulBackend backend, const Ref< CutlassMicroKernelProperty > &cutlassMicroKernelProperty, const Expr &a, const Expr &b, const Expr &c, const Expr &alpha, const Expr &beta, const Expr &m, const Expr &k, const Expr &n, const Expr &lda, const Expr &ldb, const Expr &ldc, const Expr &stridea, const Expr &strideb, const Expr &stridec, const Expr &batchSize, bool aIsRowMajor, bool bIsRowMajor, bool cIsRowMajor, const Stmt &equivalent, const Metadata &metadata=nullptr, const ID &id={}, std::source_location loc=std::source_location::current())
Definition: stmt.h:535
Stmt makeMarkVersion(const std::string &tapeName, const std::string &var, const Metadata &metadata=nullptr, const ID &id={}, std::source_location loc=std::source_location::current())
Definition: stmt.h:581
Stmt makeIf(Tcond &&cond, Tthen &&thenCase, Telse &&elseCase, const Metadata &metadata=nullptr, const ID &id={}, std::source_location loc=std::source_location::current())
Definition: stmt.h:354
ReduceOp
Definition: reduce_op.h:30
std::string join(Container &&c, const std::string &splitter)
Definition: container_utils.h:194
Stmt makeVarDef(const std::string &name, Tbuffer &&buffer, const std::optional< std::string > &viewOf, Tbody &&body, bool pinned, const Metadata &metadata=nullptr, const ID &id={}, std::source_location loc=std::source_location::current())
Definition: stmt.h:109
constexpr std::array baseDataTypeNames
Definition: data_type.h:27
Stmt makeFor(const std::string &iter, Tbegin &&begin, Tend &&end, Tstep &&step, Tlen &&len, Tproperty &&property, Tbody &&body, const Metadata &metadata=nullptr, const ID &id={}, std::source_location loc=std::source_location::current())
Definition: stmt.h:311
std::ostream & operator<<(std::ostream &os, const Dependence &dep)
Definition: deps.cc:1404
MatMulBackend parseMatMulBackend(const std::string &_str)
Definition: stmt.h:486
Ref< AssertNode > Assert
Definition: stmt.h:392
Ref< AllocNode > Alloc
Definition: stmt.h:182
Ref< MatMulNode > MatMul
Definition: stmt.h:533
Stmt makeFree(const std::string &var, const Metadata &metadata=nullptr, const ID &id={}, std::source_location loc=std::source_location::current())
Definition: stmt.h:209
Stmt makeAlloc(const std::string &var, const Metadata &metadata=nullptr, const ID &id={}, std::source_location loc=std::source_location::current())
Definition: stmt.h:184
Ref< AnyNode > Any
Definition: stmt.h:27
Ref< StmtSeqNode > StmtSeq
Definition: stmt.h:49
Definition: sub_tree.h:20