Add pass generate per block in a function a GraphViz Dot graph with ops as nodes
authorJacques Pienaar <jpienaar@google.com>
Tue, 10 Sep 2019 01:12:12 +0000 (18:12 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Tue, 10 Sep 2019 01:12:41 +0000 (18:12 -0700)
commit2660623a88d10df9ea7976d5e80704c5c7aab981
treeea30a6640a42f1c4493cfc87c8ccba170f99a365
parentf4ae4762bf7d64d7ca46d05206955c9b44cedc49
Add pass generate per block in a function a GraphViz Dot graph with ops as nodes

* Add GraphTraits that treat a block as a graph, Operation* as node and use-relationship for edges;
  - Just basic graph output;
* Add use iterator to iterate over all uses of an Operation;
* Add testing pass to generate op graph;

This does not support arbitrary operations other than function nor nested regions yet.

PiperOrigin-RevId: 268121782
mlir/include/mlir/IR/Operation.h
mlir/include/mlir/Transforms/ViewOpGraph.h [new file with mode: 0644]
mlir/lib/IR/Operation.cpp
mlir/lib/Transforms/CMakeLists.txt
mlir/lib/Transforms/ViewOpGraph.cpp [new file with mode: 0644]