summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms
diff options
context:
space:
mode:
authorJing Pu <jingpu@google.com>2019-10-30 11:21:54 -0700
committerA. Unique TensorFlower <gardener@tensorflow.org>2019-10-30 11:22:22 -0700
commit736ad2061c491199938cd6b0f31e8dfaac060974 (patch)
treed5e82107a00c29e83c4e3804042a4d99aaba7b26 /mlir/lib/Transforms
parenta32f0dcb5d963d2281bc08902468693ea2911342 (diff)
downloadbcm5719-llvm-736ad2061c491199938cd6b0f31e8dfaac060974.tar.gz
bcm5719-llvm-736ad2061c491199938cd6b0f31e8dfaac060974.zip
Dump op location in createPrintOpGraphPass for easier debugging.
PiperOrigin-RevId: 277546527
Diffstat (limited to 'mlir/lib/Transforms')
-rw-r--r--mlir/lib/Transforms/ViewOpGraph.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/mlir/lib/Transforms/ViewOpGraph.cpp b/mlir/lib/Transforms/ViewOpGraph.cpp
index 8c4820e3809..f080ccd77e9 100644
--- a/mlir/lib/Transforms/ViewOpGraph.cpp
+++ b/mlir/lib/Transforms/ViewOpGraph.cpp
@@ -71,6 +71,10 @@ std::string DOTGraphTraits<mlir::Block *>::getNodeLabel(mlir::Operation *op,
raw_string_ostream os(ostr);
os << op->getName() << "\n";
+ if (!op->getLoc().isa<mlir::UnknownLoc>()) {
+ os << op->getLoc() << "\n";
+ }
+
// Print resultant types
mlir::interleaveComma(op->getResultTypes(), os);
os << "\n";
OpenPOWER on IntegriCloud