tvm
doc.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  */
19 #ifndef TVM_SCRIPT_PRINTER_DOC_H_
20 #define TVM_SCRIPT_PRINTER_DOC_H_
21 
22 #include <tvm/ffi/reflection/access_path.h>
23 #include <tvm/ffi/reflection/registry.h>
24 #include <tvm/ir/expr.h>
25 #include <tvm/runtime/data_type.h>
26 #include <tvm/runtime/device_api.h>
27 
28 #include <string>
29 
30 namespace tvm {
31 namespace script {
32 namespace printer {
33 
35 
36 // Forward declaration
37 class Doc;
38 
44 ffi::String DocToPythonScript(Doc doc, const PrinterConfig& cfg);
45 
57 class DocNode : public ffi::Object {
58  public:
66  mutable ffi::Array<AccessPath> source_paths;
67 
68  static void RegisterReflection() {
69  namespace refl = tvm::ffi::reflection;
70  refl::ObjectDef<DocNode>().def_rw("source_paths", &DocNode::source_paths);
71  }
72 
73  static constexpr bool _type_mutable = true;
74 
75  TVM_FFI_DECLARE_OBJECT_INFO("script.printer.Doc", DocNode, ffi::Object);
76 
77  public:
78  virtual ~DocNode() = default;
79 };
80 
86 class Doc : public ffi::ObjectRef {
87  protected:
88  Doc() = default;
89  explicit Doc(ffi::ObjectPtr<DocNode> data) : ffi::ObjectRef(data) {}
90 
91  public:
93 };
94 
95 class ExprDoc;
96 
102 class ExprDocNode : public DocNode {
103  public:
108  ExprDoc Attr(ffi::String attr) const;
109 
114  ExprDoc operator[](ffi::Array<Doc> indices) const;
115 
120  ExprDoc Call(ffi::Array<ExprDoc, void> args) const;
121 
128  ExprDoc Call(ffi::Array<ExprDoc, void> args, //
129  ffi::Array<ffi::String> kwargs_keys, //
130  ffi::Array<ExprDoc, void> kwargs_values) const;
131 
132  static void RegisterReflection() {
133  namespace refl = tvm::ffi::reflection;
134  refl::ObjectDef<ExprDocNode>();
135  }
136  TVM_FFI_DECLARE_OBJECT_INFO("script.printer.ExprDoc", ExprDocNode, DocNode);
137 };
138 
144 class ExprDoc : public Doc {
145  protected:
146  ExprDoc() = default;
147 
148  public:
153  ExprDoc operator[](ffi::Array<Doc> indices) const;
154 
155  explicit ExprDoc(ffi::ObjectPtr<ExprDocNode> data) : Doc(data) {
156  TVM_FFI_ICHECK(data != nullptr);
157  }
158 
160 };
161 
167 class StmtDocNode : public DocNode {
168  public:
177  mutable ffi::Optional<ffi::String> comment{std::nullopt};
178 
179  static void RegisterReflection() {
180  namespace refl = tvm::ffi::reflection;
181  refl::ObjectDef<StmtDocNode>().def_rw("comment", &StmtDocNode::comment);
182  }
183  TVM_FFI_DECLARE_OBJECT_INFO("script.printer.StmtDoc", StmtDocNode, DocNode);
184 };
185 
191 class StmtDoc : public Doc {
192  protected:
193  StmtDoc() = default;
194 
195  public:
197 };
198 
205 class StmtBlockDocNode : public DocNode {
206  public:
208  ffi::Array<StmtDoc> stmts;
209 
210  static void RegisterReflection() {
211  namespace refl = tvm::ffi::reflection;
212  refl::ObjectDef<StmtBlockDocNode>().def_ro("stmts", &StmtBlockDocNode::stmts);
213  }
215 };
216 
221 class StmtBlockDoc : public Doc {
222  public:
227  explicit StmtBlockDoc(ffi::Array<StmtDoc> stmts);
229 };
230 
236 class LiteralDocNode : public ExprDocNode {
237  public:
247  ffi::Any value;
248 
249  static void RegisterReflection() {
250  namespace refl = tvm::ffi::reflection;
251  refl::ObjectDef<LiteralDocNode>().def_ro("value", &LiteralDocNode::value);
252  }
254 };
255 
261 class LiteralDoc : public ExprDoc {
262  protected:
263  explicit LiteralDoc(ffi::Any value, const ffi::Optional<AccessPath>& object_path);
264 
265  public:
270  static LiteralDoc None(const ffi::Optional<AccessPath>& p) {
271  return LiteralDoc(ffi::Any(nullptr), p);
272  }
278  static LiteralDoc Int(int64_t v, const ffi::Optional<AccessPath>& p) {
279  return LiteralDoc(IntImm(DataType::Int(64), v), p);
280  }
286  static LiteralDoc Boolean(bool v, const ffi::Optional<AccessPath>& p) {
287  return LiteralDoc(IntImm(DataType::Bool(), v), p);
288  }
294  static LiteralDoc Float(double v, const ffi::Optional<AccessPath>& p) {
295  return LiteralDoc(FloatImm(DataType::Float(64), v), p);
296  }
302  static LiteralDoc Str(const ffi::String& v, const ffi::Optional<AccessPath>& p) {
303  return LiteralDoc(v, p);
304  }
310  static LiteralDoc DataType(const runtime::DataType& v, const ffi::Optional<AccessPath>& p) {
311  std::string dtype = v.is_void() ? "void" : ffi::DLDataTypeToString(v);
312  return LiteralDoc::Str(dtype, p);
313  }
319  static LiteralDoc Device(const DLDevice& v, const ffi::Optional<AccessPath>& p) {
320  std::ostringstream os;
321  runtime::operator<<(os, v);
322  return LiteralDoc::Str(os.str(), p);
323  }
324 
326 };
327 
333 class IdDocNode : public ExprDocNode {
334  public:
336  ffi::String name;
337 
338  static void RegisterReflection() {
339  namespace refl = tvm::ffi::reflection;
340  refl::ObjectDef<IdDocNode>().def_ro("name", &IdDocNode::name);
341  }
343 };
344 
350 class IdDoc : public ExprDoc {
351  public:
356  explicit IdDoc(ffi::String name);
357  explicit IdDoc(std::nullptr_t) : ExprDoc(nullptr) {}
359 };
360 
367  public:
369  ExprDoc value{ffi::UnsafeInit()};
371  ffi::String name;
372 
373  static void RegisterReflection() {
374  namespace refl = tvm::ffi::reflection;
375  refl::ObjectDef<AttrAccessDocNode>()
376  .def_ro("value", &AttrAccessDocNode::value)
377  .def_ro("name", &AttrAccessDocNode::name);
378  }
380 };
381 
387 class AttrAccessDoc : public ExprDoc {
388  public:
394  explicit AttrAccessDoc(ExprDoc value, ffi::String name);
396 };
397 
403 class IndexDocNode : public ExprDocNode {
404  public:
406  ExprDoc value{ffi::UnsafeInit()};
414  ffi::Array<Doc> indices; // Each element is union of: Slice / ExprDoc
415 
416  static void RegisterReflection() {
417  namespace refl = tvm::ffi::reflection;
418  refl::ObjectDef<IndexDocNode>()
419  .def_ro("value", &IndexDocNode::value)
420  .def_ro("indices", &IndexDocNode::indices);
421  }
423 };
424 
430 class IndexDoc : public ExprDoc {
431  public:
437  explicit IndexDoc(ExprDoc value, ffi::Array<Doc> indices);
439 };
440 
446 class CallDocNode : public ExprDocNode {
447  public:
449  ExprDoc callee{ffi::UnsafeInit()};
451  ffi::Array<ExprDoc> args;
453  ffi::Array<ffi::String> kwargs_keys;
460  ffi::Array<ExprDoc> kwargs_values;
461 
462  static void RegisterReflection() {
463  namespace refl = tvm::ffi::reflection;
464  refl::ObjectDef<CallDocNode>()
465  .def_ro("callee", &CallDocNode::callee)
466  .def_ro("args", &CallDocNode::args)
467  .def_ro("kwargs_keys", &CallDocNode::kwargs_keys)
468  .def_ro("kwargs_values", &CallDocNode::kwargs_values);
469  }
471 };
472 
478 class CallDoc : public ExprDoc {
479  public:
487  CallDoc(ExprDoc callee, ffi::Array<ExprDoc> args, ffi::Array<ffi::String> kwargs_keys,
488  ffi::Array<ExprDoc> kwargs_values);
490 };
491 
501  public:
502  enum class Kind : int32_t {
503  // Unary operators
504  kUnaryStart = 0,
505  kUSub = 1, // -x
506  kInvert = 2, // ~x
507  kNot = 3, // not x
508  kUnaryEnd = 4,
509 
510  // Binary operators
511  kBinaryStart = 5,
512  kAdd = 6, // +
513  kSub = 7, // -
514  kMult = 8, // *
515  kDiv = 9, // /
516  kFloorDiv = 10, // // in Python
517  kMod = 11, // % in Python
518  kPow = 12, // ** in Python
519  kLShift = 13, // <<
520  kRShift = 14, // >>
521  kBitAnd = 15, // &
522  kBitOr = 16, // |
523  kBitXor = 17, // ^
524  kLt = 18, // <
525  kLtE = 19, // <=
526  kEq = 20, // ==
527  kNotEq = 21, // !=
528  kGt = 22, // >
529  kGtE = 23, // >=
530  kAnd = 24, // and
531  kOr = 25, // or
532  kMatMul = 26, // @
533  kBinaryEnd = 27,
534 
535  // Special
536  kSpecialStart = 28,
537  kIfThenElse = 29, // <operands[1]> if <operands[0]> else <operands[2]>
538  kSpecialEnd = 30
539  };
540 
544  ffi::Array<ExprDoc> operands;
545 
546  static void RegisterReflection() {
547  namespace refl = tvm::ffi::reflection;
548  refl::ObjectDef<OperationDocNode>()
549  .def_ro("kind", &OperationDocNode::kind)
550  .def_ro("operands", &OperationDocNode::operands);
551  }
553 };
554 
560 class OperationDoc : public ExprDoc {
561  public:
567  explicit OperationDoc(OperationDocNode::Kind kind, ffi::Array<ExprDoc> operands);
569 };
570 
579 class LambdaDocNode : public ExprDocNode {
580  public:
582  ffi::Array<IdDoc> args;
584  ExprDoc body{ffi::UnsafeInit()};
585 
586  static void RegisterReflection() {
587  namespace refl = tvm::ffi::reflection;
588  refl::ObjectDef<LambdaDocNode>()
589  .def_ro("args", &LambdaDocNode::args)
590  .def_ro("body", &LambdaDocNode::body);
591  }
593 };
594 
600 class LambdaDoc : public ExprDoc {
601  public:
607  explicit LambdaDoc(ffi::Array<IdDoc> args, ExprDoc body);
609 };
610 
616 class TupleDocNode : public ExprDocNode {
617  public:
619  ffi::Array<ExprDoc> elements;
620 
621  static void RegisterReflection() {
622  namespace refl = tvm::ffi::reflection;
623  refl::ObjectDef<TupleDocNode>().def_ro("elements", &TupleDocNode::elements);
624  }
626 };
627 
633 class TupleDoc : public ExprDoc {
634  public:
638  TupleDoc() : ExprDoc(ffi::make_object<TupleDocNode>()) {}
643  explicit TupleDoc(ffi::Array<ExprDoc> elements);
645 };
646 
652 class ListDocNode : public ExprDocNode {
653  public:
655  ffi::Array<ExprDoc> elements;
656 
657  static void RegisterReflection() {
658  namespace refl = tvm::ffi::reflection;
659  refl::ObjectDef<ListDocNode>().def_ro("elements", &ListDocNode::elements);
660  }
662 };
663 
669 class ListDoc : public ExprDoc {
670  public:
674  ListDoc() : ExprDoc(ffi::make_object<ListDocNode>()) {}
679  explicit ListDoc(ffi::Array<ExprDoc> elements);
681 };
682 
688 class DictDocNode : public ExprDocNode {
689  public:
691  ffi::Array<ExprDoc> keys;
698  ffi::Array<ExprDoc> values;
699 
700  static void RegisterReflection() {
701  namespace refl = tvm::ffi::reflection;
702  refl::ObjectDef<DictDocNode>()
703  .def_ro("keys", &DictDocNode::keys)
704  .def_ro("values", &DictDocNode::values);
705  }
707 };
708 
714 class DictDoc : public ExprDoc {
715  public:
719  DictDoc() : ExprDoc(ffi::make_object<DictDocNode>()) {}
725  explicit DictDoc(ffi::Array<ExprDoc> keys, ffi::Array<ExprDoc> values);
727 };
728 
736 class SliceDocNode : public DocNode {
737  public:
739  ffi::Optional<ExprDoc> start;
741  ffi::Optional<ExprDoc> stop;
743  ffi::Optional<ExprDoc> step;
744 
745  static void RegisterReflection() {
746  namespace refl = tvm::ffi::reflection;
747  refl::ObjectDef<SliceDocNode>()
748  .def_ro("start", &SliceDocNode::start)
749  .def_ro("stop", &SliceDocNode::stop)
750  .def_ro("step", &SliceDocNode::step);
751  }
753 };
754 
760 class SliceDoc : public Doc {
761  public:
768  explicit SliceDoc(ffi::Optional<ExprDoc> start, ffi::Optional<ExprDoc> stop,
769  ffi::Optional<ExprDoc> step);
771 };
772 
778 class AssignDocNode : public StmtDocNode {
779  public:
781  ExprDoc lhs{ffi::UnsafeInit()};
787  ffi::Optional<ExprDoc> rhs;
789  ffi::Optional<ExprDoc> annotation;
790 
791  static void RegisterReflection() {
792  namespace refl = tvm::ffi::reflection;
793  refl::ObjectDef<AssignDocNode>()
794  .def_ro("lhs", &AssignDocNode::lhs)
795  .def_ro("rhs", &AssignDocNode::rhs)
796  .def_ro("annotation", &AssignDocNode::annotation);
797  }
799 };
800 
806 class AssignDoc : public StmtDoc {
807  public:
814  explicit AssignDoc(ExprDoc lhs, ffi::Optional<ExprDoc> rhs, ffi::Optional<ExprDoc> annotation);
816 };
817 
823 class IfDocNode : public StmtDocNode {
824  public:
826  ExprDoc predicate{ffi::UnsafeInit()};
828  ffi::Array<StmtDoc> then_branch;
830  ffi::Array<StmtDoc> else_branch;
831 
832  static void RegisterReflection() {
833  namespace refl = tvm::ffi::reflection;
834  refl::ObjectDef<IfDocNode>()
835  .def_ro("predicate", &IfDocNode::predicate)
836  .def_ro("then_branch", &IfDocNode::then_branch)
837  .def_ro("else_branch", &IfDocNode::else_branch);
838  }
840 };
841 
847 class IfDoc : public StmtDoc {
848  public:
855  explicit IfDoc(ExprDoc predicate, ffi::Array<StmtDoc> then_branch,
856  ffi::Array<StmtDoc> else_branch);
858 };
859 
865 class WhileDocNode : public StmtDocNode {
866  public:
868  ExprDoc predicate{ffi::UnsafeInit()};
870  ffi::Array<StmtDoc> body;
871 
872  static void RegisterReflection() {
873  namespace refl = tvm::ffi::reflection;
874  refl::ObjectDef<WhileDocNode>()
875  .def_ro("predicate", &WhileDocNode::predicate)
876  .def_ro("body", &WhileDocNode::body);
877  }
879 };
880 
886 class WhileDoc : public StmtDoc {
887  public:
893  explicit WhileDoc(ExprDoc predicate, ffi::Array<StmtDoc> body);
895 };
896 
902 class BreakDocNode : public StmtDocNode {
903  public:
904  static void RegisterReflection() {
905  namespace refl = tvm::ffi::reflection;
906  refl::ObjectDef<BreakDocNode>();
907  }
908 
910 };
911 
917 class BreakDoc : public StmtDoc {
918  public:
922  explicit BreakDoc();
924 };
925 
931 class ContinueDocNode : public StmtDocNode {
932  public:
933  static void RegisterReflection() {
934  namespace refl = tvm::ffi::reflection;
935  refl::ObjectDef<ContinueDocNode>();
936  }
937 
939 };
940 
946 class ContinueDoc : public StmtDoc {
947  public:
951  explicit ContinueDoc();
953 };
954 
964 class ForDocNode : public StmtDocNode {
965  public:
967  ExprDoc lhs{ffi::UnsafeInit()};
969  ExprDoc rhs{ffi::UnsafeInit()};
971  ffi::Array<StmtDoc> body;
972 
973  static void RegisterReflection() {
974  namespace refl = tvm::ffi::reflection;
975  refl::ObjectDef<ForDocNode>()
976  .def_ro("lhs", &ForDocNode::lhs)
977  .def_ro("rhs", &ForDocNode::rhs)
978  .def_ro("body", &ForDocNode::body);
979  }
981 };
982 
988 class ForDoc : public StmtDoc {
989  public:
996  explicit ForDoc(ExprDoc lhs, ExprDoc rhs, ffi::Array<StmtDoc> body);
998 };
999 
1010 class ScopeDocNode : public StmtDocNode {
1011  public:
1013  ffi::Optional<ExprDoc> lhs{std::nullopt};
1015  ExprDoc rhs{ffi::UnsafeInit()};
1017  ffi::Array<StmtDoc> body;
1018 
1019  static void RegisterReflection() {
1020  namespace refl = tvm::ffi::reflection;
1021  refl::ObjectDef<ScopeDocNode>()
1022  .def_ro("lhs", &ScopeDocNode::lhs)
1023  .def_ro("rhs", &ScopeDocNode::rhs)
1024  .def_ro("body", &ScopeDocNode::body);
1025  }
1027 };
1028 
1034 class ScopeDoc : public StmtDoc {
1035  public:
1042  explicit ScopeDoc(ffi::Optional<ExprDoc> lhs, ExprDoc rhs, ffi::Array<StmtDoc> body);
1043 
1049  explicit ScopeDoc(ExprDoc rhs, ffi::Array<StmtDoc> body);
1050 
1052 };
1053 
1060  public:
1062  ExprDoc expr{ffi::UnsafeInit()};
1063 
1064  static void RegisterReflection() {
1065  namespace refl = tvm::ffi::reflection;
1066  refl::ObjectDef<ExprStmtDocNode>().def_ro("expr", &ExprStmtDocNode::expr);
1067  }
1069 };
1070 
1076 class ExprStmtDoc : public StmtDoc {
1077  public:
1082  explicit ExprStmtDoc(ExprDoc expr);
1084 };
1085 
1091 class AssertDocNode : public StmtDocNode {
1092  public:
1094  ExprDoc test{ffi::UnsafeInit()};
1096  ffi::Optional<ExprDoc> msg{std::nullopt};
1097 
1098  static void RegisterReflection() {
1099  namespace refl = tvm::ffi::reflection;
1100  refl::ObjectDef<AssertDocNode>()
1101  .def_ro("test", &AssertDocNode::test)
1102  .def_ro("msg", &AssertDocNode::msg);
1103  }
1105 };
1106 
1112 class AssertDoc : public StmtDoc {
1113  public:
1119  explicit AssertDoc(ExprDoc test, ffi::Optional<ExprDoc> msg = std::nullopt);
1121 };
1122 
1128 class ReturnDocNode : public StmtDocNode {
1129  public:
1131  ExprDoc value{ffi::UnsafeInit()};
1132 
1133  static void RegisterReflection() {
1134  namespace refl = tvm::ffi::reflection;
1135  refl::ObjectDef<ReturnDocNode>().def_ro("value", &ReturnDocNode::value);
1136  }
1138 };
1139 
1145 class ReturnDoc : public StmtDoc {
1146  public:
1151  explicit ReturnDoc(ExprDoc value);
1153 };
1154 
1161  public:
1163  IdDoc name{ffi::UnsafeInit{}};
1171  ffi::Array<AssignDoc> args;
1173  ffi::Array<ExprDoc> decorators;
1175  ffi::Optional<ExprDoc> return_type{std::nullopt};
1177  ffi::Array<StmtDoc> body;
1178 
1179  static void RegisterReflection() {
1180  namespace refl = tvm::ffi::reflection;
1181  refl::ObjectDef<FunctionDocNode>()
1182  .def_ro("name", &FunctionDocNode::name)
1183  .def_ro("args", &FunctionDocNode::args)
1184  .def_ro("decorators", &FunctionDocNode::decorators)
1185  .def_ro("return_type", &FunctionDocNode::return_type)
1186  .def_ro("body", &FunctionDocNode::body);
1187  }
1189 };
1190 
1196 class FunctionDoc : public StmtDoc {
1197  public:
1206  explicit FunctionDoc(IdDoc name, ffi::Array<AssignDoc> args, ffi::Array<ExprDoc> decorators,
1207  ffi::Optional<ExprDoc> return_type, ffi::Array<StmtDoc> body);
1209 };
1210 
1216 class ClassDocNode : public StmtDocNode {
1217  public:
1219  IdDoc name{ffi::UnsafeInit{}};
1221  ffi::Array<ExprDoc> decorators;
1223  ffi::Array<StmtDoc> body;
1224 
1225  static void RegisterReflection() {
1226  namespace refl = tvm::ffi::reflection;
1227  refl::ObjectDef<ClassDocNode>()
1228  .def_ro("name", &ClassDocNode::name)
1229  .def_ro("decorators", &ClassDocNode::decorators)
1230  .def_ro("body", &ClassDocNode::body);
1231  }
1233 };
1234 
1240 class ClassDoc : public StmtDoc {
1241  public:
1248  explicit ClassDoc(IdDoc name, ffi::Array<ExprDoc> decorators, ffi::Array<StmtDoc> body);
1250 };
1251 
1257 class CommentDocNode : public StmtDocNode {
1258  public:
1259  static void RegisterReflection() {
1260  namespace refl = tvm::ffi::reflection;
1261  refl::ObjectDef<CommentDocNode>();
1262  }
1264 };
1265 
1271 class CommentDoc : public StmtDoc {
1272  public:
1273  explicit CommentDoc(ffi::String comment);
1275 };
1276 
1283  public:
1284  static void RegisterReflection() {
1285  namespace refl = tvm::ffi::reflection;
1286  refl::ObjectDef<DocStringDocNode>();
1287  }
1289 };
1290 
1296 class DocStringDoc : public StmtDoc {
1297  public:
1298  explicit DocStringDoc(ffi::String docs);
1300 };
1301 
1307 class OpCallDocNode : public StmtDocNode {
1308  public:
1310  ExprDoc callee{ffi::UnsafeInit()};
1312  ffi::Array<Doc> args;
1314  ffi::Optional<DictDoc> workspace{std::nullopt};
1316  ffi::Optional<DictDoc> config{std::nullopt};
1318  ffi::Optional<ExprDoc> dispatch{std::nullopt};
1319 
1320  static void RegisterReflection() {
1321  namespace refl = tvm::ffi::reflection;
1322  refl::ObjectDef<OpCallDocNode>()
1323  .def_ro("callee", &OpCallDocNode::callee)
1324  .def_ro("args", &OpCallDocNode::args)
1325  .def_ro("workspace", &OpCallDocNode::workspace)
1326  .def_ro("config", &OpCallDocNode::config)
1327  .def_ro("dispatch", &OpCallDocNode::dispatch);
1328  }
1329 
1331 };
1332 
1338 class OpCallDoc : public StmtDoc {
1339  public:
1348  explicit OpCallDoc(ExprDoc callee, ffi::Array<Doc> args, ffi::Optional<DictDoc> workspace,
1349  ffi::Optional<DictDoc> config, ffi::Optional<ExprDoc> dispatch = std::nullopt);
1351 };
1352 
1353 } // namespace printer
1354 } // namespace script
1355 } // namespace tvm
1356 
1357 #endif // TVM_SCRIPT_PRINTER_DOC_H_
Managed reference class to FloatImmNode.
Definition: expr.h:546
Managed reference class to IntImmNode.
Definition: expr.h:511
Definition: config.h:151
Runtime primitive data type.
Definition: data_type.h:45
static DataType Float(int bits, int lanes=1)
Construct an float type.
Definition: data_type.h:293
static DataType Bool(int lanes=1, bool is_scalable=false)
Construct a bool type.
Definition: data_type.h:385
static DataType Int(int bits, int lanes=1)
Construct an int type.
Definition: data_type.h:276
bool is_void() const
Definition: data_type.h:211
Doc that represents assert statement.
Definition: doc.h:1091
ffi::Optional< ExprDoc > msg
The optional error message when assertion failed.
Definition: doc.h:1096
static void RegisterReflection()
Definition: doc.h:1098
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.AssertDoc", AssertDocNode, StmtDocNode)
ExprDoc test
The expression to test.
Definition: doc.h:1094
Reference type of AssertDocNode.
Definition: doc.h:1112
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(AssertDoc, StmtDoc, AssertDocNode)
AssertDoc(ExprDoc test, ffi::Optional< ExprDoc > msg=std::nullopt)
Constructor of AssertDoc.
Doc that represents assign statement.
Definition: doc.h:778
ffi::Optional< ExprDoc > annotation
The type annotation of this assignment.
Definition: doc.h:789
ffi::Optional< ExprDoc > rhs
The right hand side of the assignment.
Definition: doc.h:787
ExprDoc lhs
The left hand side of the assignment.
Definition: doc.h:781
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.AssignDoc", AssignDocNode, StmtDocNode)
static void RegisterReflection()
Definition: doc.h:791
Reference type of AssignDocNode.
Definition: doc.h:806
AssignDoc(ExprDoc lhs, ffi::Optional< ExprDoc > rhs, ffi::Optional< ExprDoc > annotation)
Constructor of AssignDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(AssignDoc, StmtDoc, AssignDocNode)
Doc that represents attribute access on another expression.
Definition: doc.h:366
ffi::String name
The attribute to be accessed.
Definition: doc.h:371
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.AttrAccessDoc", AttrAccessDocNode, ExprDocNode)
ExprDoc value
The target expression to be accessed.
Definition: doc.h:369
static void RegisterReflection()
Definition: doc.h:373
Reference type of AttrAccessDocNode.
Definition: doc.h:387
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(AttrAccessDoc, ExprDoc, AttrAccessDocNode)
AttrAccessDoc(ExprDoc value, ffi::String name)
Constructor of AttrAccessDoc.
Doc that represents break statement.
Definition: doc.h:902
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.BreakDoc", BreakDocNode, StmtDocNode)
static void RegisterReflection()
Definition: doc.h:904
Reference type of BreakDocNode.
Definition: doc.h:917
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(BreakDoc, StmtDoc, BreakDocNode)
BreakDoc()
Constructor of BreakDoc.
Doc that represents function call.
Definition: doc.h:446
ffi::Array< ffi::String > kwargs_keys
The keys of keyword arguments.
Definition: doc.h:453
ffi::Array< ExprDoc > kwargs_values
The values of keyword arguments.
Definition: doc.h:460
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.CallDoc", CallDocNode, ExprDocNode)
static void RegisterReflection()
Definition: doc.h:462
ffi::Array< ExprDoc > args
The positional arguments.
Definition: doc.h:451
ExprDoc callee
The callee of this function call.
Definition: doc.h:449
Reference type of CallDocNode.
Definition: doc.h:478
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(CallDoc, ExprDoc, CallDocNode)
CallDoc(ExprDoc callee, ffi::Array< ExprDoc > args, ffi::Array< ffi::String > kwargs_keys, ffi::Array< ExprDoc > kwargs_values)
Constructor of CallDoc.
Doc that represents class definition.
Definition: doc.h:1216
ffi::Array< ExprDoc > decorators
Decorators of class.
Definition: doc.h:1221
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.ClassDoc", ClassDocNode, StmtDocNode)
static void RegisterReflection()
Definition: doc.h:1225
IdDoc name
The name of class.
Definition: doc.h:1219
ffi::Array< StmtDoc > body
The body of class.
Definition: doc.h:1223
Reference type of ClassDocNode.
Definition: doc.h:1240
ClassDoc(IdDoc name, ffi::Array< ExprDoc > decorators, ffi::Array< StmtDoc > body)
Constructor of ClassDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(ClassDoc, StmtDoc, ClassDocNode)
Doc that represents comment.
Definition: doc.h:1257
static void RegisterReflection()
Definition: doc.h:1259
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.CommentDoc", CommentDocNode, StmtDocNode)
Reference type of CommentDocNode.
Definition: doc.h:1271
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(CommentDoc, StmtDoc, CommentDocNode)
CommentDoc(ffi::String comment)
Doc that represents continue statement.
Definition: doc.h:931
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.ContinueDoc", ContinueDocNode, StmtDocNode)
static void RegisterReflection()
Definition: doc.h:933
Reference type of ContinueDocNode.
Definition: doc.h:946
ContinueDoc()
Constructor of ContinueDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(ContinueDoc, StmtDoc, ContinueDocNode)
Doc that represents dictionary literal.
Definition: doc.h:688
ffi::Array< ExprDoc > keys
keys of dictionary
Definition: doc.h:691
static void RegisterReflection()
Definition: doc.h:700
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.DictDoc", DictDocNode, ExprDocNode)
ffi::Array< ExprDoc > values
Values of dictionary.
Definition: doc.h:698
Reference type of DictDocNode.
Definition: doc.h:714
DictDoc(ffi::Array< ExprDoc > keys, ffi::Array< ExprDoc > values)
Constructor of DictDoc.
DictDoc()
Create an empty dictionary.
Definition: doc.h:719
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(DictDoc, ExprDoc, DictDocNode)
The base class of all Doc.
Definition: doc.h:57
static constexpr bool _type_mutable
Definition: doc.h:73
virtual ~DocNode()=default
TVM_FFI_DECLARE_OBJECT_INFO("script.printer.Doc", DocNode, ffi::Object)
static void RegisterReflection()
Definition: doc.h:68
ffi::Array< AccessPath > source_paths
The list of object paths of the source IR node.
Definition: doc.h:66
Doc that represents docstring.
Definition: doc.h:1282
static void RegisterReflection()
Definition: doc.h:1284
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.DocStringDoc", DocStringDocNode, StmtDocNode)
Reference type of DocStringDocNode.
Definition: doc.h:1296
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(DocStringDoc, StmtDoc, DocStringDocNode)
Reference type of DocNode.
Definition: doc.h:86
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(Doc, ffi::ObjectRef, DocNode)
Doc(ffi::ObjectPtr< DocNode > data)
Definition: doc.h:89
The base class of expression doc.
Definition: doc.h:102
ExprDoc Attr(ffi::String attr) const
Create a doc representing attribute access on the current ExprDoc.
static void RegisterReflection()
Definition: doc.h:132
TVM_FFI_DECLARE_OBJECT_INFO("script.printer.ExprDoc", ExprDocNode, DocNode)
ExprDoc Call(ffi::Array< ExprDoc, void > args) const
Create a doc representing calling the current ExprDoc.
ExprDoc operator[](ffi::Array< Doc > indices) const
Create a doc representing index access on the current ExprDoc.
ExprDoc Call(ffi::Array< ExprDoc, void > args, ffi::Array< ffi::String > kwargs_keys, ffi::Array< ExprDoc, void > kwargs_values) const
Create a doc representing attribute access on the current ExprDoc.
Reference type of ExprDocNode.
Definition: doc.h:144
ExprDoc(ffi::ObjectPtr< ExprDocNode > data)
Definition: doc.h:155
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(ExprDoc, Doc, ExprDocNode)
ExprDoc operator[](ffi::Array< Doc > indices) const
Create a doc representing index access on the current ExprDoc.
Doc that represents an expression as statement.
Definition: doc.h:1059
static void RegisterReflection()
Definition: doc.h:1064
ExprDoc expr
The expression represented by this doc.
Definition: doc.h:1062
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.ExprStmtDoc", ExprStmtDocNode, StmtDocNode)
Reference type of ExprStmtDocNode.
Definition: doc.h:1076
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(ExprStmtDoc, StmtDoc, ExprStmtDocNode)
ExprStmtDoc(ExprDoc expr)
Constructor of ExprStmtDoc.
Doc that represents for statement.
Definition: doc.h:964
ffi::Array< StmtDoc > body
The body of the for statement.
Definition: doc.h:971
ExprDoc lhs
The left hand side of the assignment of iterating variable.
Definition: doc.h:967
static void RegisterReflection()
Definition: doc.h:973
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.ForDoc", ForDocNode, StmtDocNode)
ExprDoc rhs
The right hand side of the assignment of iterating variable.
Definition: doc.h:969
Reference type of ForDocNode.
Definition: doc.h:988
ForDoc(ExprDoc lhs, ExprDoc rhs, ffi::Array< StmtDoc > body)
Constructor of ForDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(ForDoc, StmtDoc, ForDocNode)
Doc that represents function definition.
Definition: doc.h:1160
ffi::Array< AssignDoc > args
The arguments of function.
Definition: doc.h:1171
ffi::Array< StmtDoc > body
The body of function.
Definition: doc.h:1177
IdDoc name
The name of function.
Definition: doc.h:1163
static void RegisterReflection()
Definition: doc.h:1179
ffi::Array< ExprDoc > decorators
Decorators of function.
Definition: doc.h:1173
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.FunctionDoc", FunctionDocNode, StmtDocNode)
ffi::Optional< ExprDoc > return_type
The return type of function.
Definition: doc.h:1175
Reference type of FunctionDocNode.
Definition: doc.h:1196
FunctionDoc(IdDoc name, ffi::Array< AssignDoc > args, ffi::Array< ExprDoc > decorators, ffi::Optional< ExprDoc > return_type, ffi::Array< StmtDoc > body)
Constructor of FunctionDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(FunctionDoc, StmtDoc, FunctionDocNode)
Doc that represents identifier.
Definition: doc.h:333
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.IdDoc", IdDocNode, ExprDocNode)
ffi::String name
The name of the identifier.
Definition: doc.h:336
static void RegisterReflection()
Definition: doc.h:338
Reference type of IdDocNode.
Definition: doc.h:350
IdDoc(std::nullptr_t)
Definition: doc.h:357
IdDoc(ffi::String name)
Constructor of IdDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(IdDoc, ExprDoc, IdDocNode)
Doc that represent if-then-else statement.
Definition: doc.h:823
static void RegisterReflection()
Definition: doc.h:832
ffi::Array< StmtDoc > else_branch
The else branch of the if-then-else statement.
Definition: doc.h:830
ffi::Array< StmtDoc > then_branch
The then branch of the if-then-else statement.
Definition: doc.h:828
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.IfDoc", IfDocNode, StmtDocNode)
ExprDoc predicate
The predicate of the if-then-else statement.
Definition: doc.h:826
Reference type of IfDocNode.
Definition: doc.h:847
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(IfDoc, StmtDoc, IfDocNode)
IfDoc(ExprDoc predicate, ffi::Array< StmtDoc > then_branch, ffi::Array< StmtDoc > else_branch)
Constructor of IfDoc.
Doc that represents index access on another expression.
Definition: doc.h:403
static void RegisterReflection()
Definition: doc.h:416
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.IndexDoc", IndexDocNode, ExprDocNode)
ffi::Array< Doc > indices
The indices to access.
Definition: doc.h:414
ExprDoc value
The container value to be accessed.
Definition: doc.h:406
Reference type of IndexDocNode.
Definition: doc.h:430
IndexDoc(ExprDoc value, ffi::Array< Doc > indices)
Constructor of IndexDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(IndexDoc, ExprDoc, IndexDocNode)
Doc that represents anonymous function.
Definition: doc.h:579
static void RegisterReflection()
Definition: doc.h:586
ExprDoc body
The body of this anonymous function.
Definition: doc.h:584
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.LambdaDoc", LambdaDocNode, ExprDocNode)
ffi::Array< IdDoc > args
The arguments of this anonymous function.
Definition: doc.h:582
Reference type of LambdaDocNode.
Definition: doc.h:600
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(LambdaDoc, ExprDoc, LambdaDocNode)
LambdaDoc(ffi::Array< IdDoc > args, ExprDoc body)
Constructor of LambdaDoc.
Doc that represents list literal.
Definition: doc.h:652
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.ListDoc", ListDocNode, ExprDocNode)
ffi::Array< ExprDoc > elements
Elements of list.
Definition: doc.h:655
static void RegisterReflection()
Definition: doc.h:657
Reference type of ListDocNode.
Definition: doc.h:669
ListDoc()
Create an empty ListDoc.
Definition: doc.h:674
ListDoc(ffi::Array< ExprDoc > elements)
Constructor of ListDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(ListDoc, ExprDoc, ListDocNode)
Doc that represents literal value.
Definition: doc.h:236
ffi::Any value
the internal representation of the literal value.
Definition: doc.h:247
static void RegisterReflection()
Definition: doc.h:249
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.LiteralDoc", LiteralDocNode, ExprDocNode)
Reference type of LiteralDocNode.
Definition: doc.h:261
LiteralDoc(ffi::Any value, const ffi::Optional< AccessPath > &object_path)
static LiteralDoc Boolean(bool v, const ffi::Optional< AccessPath > &p)
Create a LiteralDoc to represent boolean.
Definition: doc.h:286
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(LiteralDoc, ExprDoc, LiteralDocNode)
static LiteralDoc DataType(const runtime::DataType &v, const ffi::Optional< AccessPath > &p)
Create a LiteralDoc to represent string.
Definition: doc.h:310
static LiteralDoc Device(const DLDevice &v, const ffi::Optional< AccessPath > &p)
Create a LiteralDoc to represent device.
Definition: doc.h:319
static LiteralDoc Int(int64_t v, const ffi::Optional< AccessPath > &p)
Create a LiteralDoc to represent integer.
Definition: doc.h:278
static LiteralDoc Float(double v, const ffi::Optional< AccessPath > &p)
Create a LiteralDoc to represent float.
Definition: doc.h:294
static LiteralDoc None(const ffi::Optional< AccessPath > &p)
Create a LiteralDoc to represent None/null/empty value.
Definition: doc.h:270
static LiteralDoc Str(const ffi::String &v, const ffi::Optional< AccessPath > &p)
Create a LiteralDoc to represent string.
Definition: doc.h:302
Doc that represents call to an TIRX operator.
Definition: doc.h:1307
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.OpCallDoc", OpCallDocNode, StmtDocNode)
ffi::Optional< ExprDoc > dispatch
The optional dispatch variant of this op call.
Definition: doc.h:1318
ffi::Array< Doc > args
The positional arguments.
Definition: doc.h:1312
static void RegisterReflection()
Definition: doc.h:1320
ffi::Optional< DictDoc > config
The config of this op call.
Definition: doc.h:1316
ffi::Optional< DictDoc > workspace
The workspace of this op call.
Definition: doc.h:1314
ExprDoc callee
The callee of this function call.
Definition: doc.h:1310
Reference type of OpCallDocNode.
Definition: doc.h:1338
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(OpCallDoc, StmtDoc, OpCallDocNode)
OpCallDoc(ExprDoc callee, ffi::Array< Doc > args, ffi::Optional< DictDoc > workspace, ffi::Optional< DictDoc > config, ffi::Optional< ExprDoc > dispatch=std::nullopt)
Constructor of OpCallDoc.
Doc that represents operation.
Definition: doc.h:500
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.OperationDoc", OperationDocNode, ExprDocNode)
ffi::Array< ExprDoc > operands
Operands of this expression.
Definition: doc.h:544
Kind kind
The kind of operation (operator)
Definition: doc.h:542
static void RegisterReflection()
Definition: doc.h:546
Reference type of OperationDocNode.
Definition: doc.h:560
OperationDoc(OperationDocNode::Kind kind, ffi::Array< ExprDoc > operands)
Constructor of OperationDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(OperationDoc, ExprDoc, OperationDocNode)
Doc that represents return statement.
Definition: doc.h:1128
ExprDoc value
The value to return.
Definition: doc.h:1131
static void RegisterReflection()
Definition: doc.h:1133
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.ReturnDoc", ReturnDocNode, StmtDocNode)
Reference type of ReturnDocNode.
Definition: doc.h:1145
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(ReturnDoc, StmtDoc, ReturnDocNode)
ReturnDoc(ExprDoc value)
Constructor of ReturnDoc.
Doc that represents special scopes.
Definition: doc.h:1010
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.ScopeDoc", ScopeDocNode, StmtDocNode)
ffi::Optional< ExprDoc > lhs
The name of the scoped variable.
Definition: doc.h:1013
ExprDoc rhs
The value of the scoped variable.
Definition: doc.h:1015
static void RegisterReflection()
Definition: doc.h:1019
ffi::Array< StmtDoc > body
The body of the scope doc.
Definition: doc.h:1017
Reference type of ScopeDocNode.
Definition: doc.h:1034
ScopeDoc(ffi::Optional< ExprDoc > lhs, ExprDoc rhs, ffi::Array< StmtDoc > body)
Constructor of ScopeDoc.
ScopeDoc(ExprDoc rhs, ffi::Array< StmtDoc > body)
Constructor of ScopeDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(ScopeDoc, StmtDoc, ScopeDocNode)
Doc that represents slice in Index expression.
Definition: doc.h:736
ffi::Optional< ExprDoc > start
The start of slice.
Definition: doc.h:739
ffi::Optional< ExprDoc > step
The step of slice.
Definition: doc.h:743
ffi::Optional< ExprDoc > stop
The exclusive end of slice.
Definition: doc.h:741
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.SliceDoc", SliceDocNode, DocNode)
static void RegisterReflection()
Definition: doc.h:745
Reference type of SliceDocNode.
Definition: doc.h:760
SliceDoc(ffi::Optional< ExprDoc > start, ffi::Optional< ExprDoc > stop, ffi::Optional< ExprDoc > step)
Constructor of SliceDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(SliceDoc, Doc, SliceDocNode)
The container doc that holds a list of StmtDoc.
Definition: doc.h:205
static void RegisterReflection()
Definition: doc.h:210
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.StmtBlockDoc", StmtBlockDocNode, DocNode)
ffi::Array< StmtDoc > stmts
The list of statements.
Definition: doc.h:208
Reference type of StmtBlockDocNode.
Definition: doc.h:221
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(StmtBlockDoc, Doc, StmtBlockDocNode)
StmtBlockDoc(ffi::Array< StmtDoc > stmts)
Constructor of StmtBlockDoc.
The base class of statement doc.
Definition: doc.h:167
ffi::Optional< ffi::String > comment
The comment of this doc.
Definition: doc.h:177
static void RegisterReflection()
Definition: doc.h:179
TVM_FFI_DECLARE_OBJECT_INFO("script.printer.StmtDoc", StmtDocNode, DocNode)
Reference type of StmtDocNode.
Definition: doc.h:191
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(StmtDoc, Doc, StmtDocNode)
Doc that represents tuple literal.
Definition: doc.h:616
ffi::Array< ExprDoc > elements
Elements of tuple.
Definition: doc.h:619
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.TupleDoc", TupleDocNode, ExprDocNode)
static void RegisterReflection()
Definition: doc.h:621
Reference type of TupleDocNode.
Definition: doc.h:633
TupleDoc(ffi::Array< ExprDoc > elements)
Constructor of TupleDoc.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(TupleDoc, ExprDoc, TupleDocNode)
TupleDoc()
Create an empty TupleDoc.
Definition: doc.h:638
Doc that represents while statement.
Definition: doc.h:865
static void RegisterReflection()
Definition: doc.h:872
ffi::Array< StmtDoc > body
The body of the while statement.
Definition: doc.h:870
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.printer.WhileDoc", WhileDocNode, StmtDocNode)
ExprDoc predicate
The predicate of the while statement.
Definition: doc.h:868
Reference type of WhileDocNode.
Definition: doc.h:886
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(WhileDoc, StmtDoc, WhileDocNode)
WhileDoc(ExprDoc predicate, ffi::Array< StmtDoc > body)
Constructor of WhileDoc.
Abstract device memory management API.
Base expr nodes in TVM.
std::ostream & operator<<(std::ostream &os, const DataType &dtype)
Definition: data_type.h:452
ffi::String DocToPythonScript(Doc doc, const PrinterConfig &cfg)
Convert Doc into Python script.
ffi::reflection::AccessPath AccessPath
Definition: doc.h:34
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition: analyzer.h:37