Dump op location in createPrintOpGraphPass for easier debugging.

PiperOrigin-RevId: 277546527
This commit is contained in:
Jing Pu 2019-10-30 11:21:54 -07:00 committed by A. Unique TensorFlower
parent a32f0dcb5d
commit 736ad2061c
1 changed files with 4 additions and 0 deletions

View File

@ -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";