[REFACTOR] Establish printer in the source folder (#4752)
authorTianqi Chen <tqchen@users.noreply.github.com>
Tue, 21 Jan 2020 04:06:17 +0000 (20:06 -0800)
committerGitHub <noreply@github.com>
Tue, 21 Jan 2020 04:06:17 +0000 (20:06 -0800)
commite4d817d4c63b1f9881e5085e6a18c856770bae14
treea64878fcb1fdc1dd22604c641c27b6c6f9783be6
parentf8f75ca2ee109b7a9a62e93b8523ae41983d45aa
[REFACTOR] Establish printer in the source folder (#4752)

* [REFACTOR] Establish printer in the source folder.

As we move towards the unified IR, we will eventually want to build a unified
printers for both relay and TIR.

This PR isolate the printer component into a separate folder in src as a first step.

- Refactored the Doc DSL using Object, clean up APIs.
- Isolate out the meta data into a header.
- move printer into relay_text_printer, add comments about further TODos.

* Rename NodePrinter -> ReprPrinter to distinguish it from other printers
51 files changed:
CMakeLists.txt
apps/lldb/tvm.py
include/tvm/ir/module.h
include/tvm/node/functor.h
include/tvm/node/node.h
include/tvm/node/repr_printer.h [moved from include/tvm/node/printer.h with 85% similarity]
include/tvm/relay/expr.h
src/arith/const_int_bound.cc
src/arith/int_set.cc
src/arith/modular_set.cc
src/ir/adt.cc
src/ir/attrs.cc
src/ir/env_func.cc
src/ir/error.cc
src/ir/expr.cc
src/ir/module.cc
src/ir/op.cc
src/ir/span.cc
src/ir/tensor_type.cc
src/ir/transform.cc
src/ir/type.cc
src/ir/type_relation.cc
src/node/repr_printer.cc [moved from src/node/printer.cc with 87% similarity]
src/printer/doc.cc [new file with mode: 0644]
src/printer/doc.h [new file with mode: 0644]
src/printer/meta_data.h [new file with mode: 0644]
src/printer/relay_text_printer.cc [moved from src/relay/ir/pretty_printer.cc with 74% similarity]
src/relay/backend/interpreter.cc
src/relay/ir/adt.cc
src/relay/ir/doc.cc [deleted file]
src/relay/ir/doc.h [deleted file]
src/relay/ir/expr.cc
src/relay/ir/transform.cc
src/relay/pass/fuse_ops.cc
src/relay/pass/quantize/quantize.cc
src/target/generic_func.cc
src/target/target.cc
src/target/target_info.cc
src/tir/ir/buffer.cc
src/tir/ir/data_layout.cc
src/tir/ir/expr.cc
src/tir/ir/lowered_func.cc
src/tir/ir/stmt.cc
src/top/operation/compute_op.cc
src/top/operation/extern_op.cc
src/top/operation/hybrid_op.cc
src/top/operation/placeholder_op.cc
src/top/operation/scan_op.cc
src/top/operation/tensor_compute_op.cc
src/top/schedule/schedule_lang.cc
src/top/tensor.cc