forked from OSchip/llvm-project
Print result types when dumping graphviz.
PiperOrigin-RevId: 273406833
This commit is contained in:
parent
6b3462a77b
commit
17606a108b
|
@ -20,6 +20,7 @@
|
||||||
#include "mlir/IR/Operation.h"
|
#include "mlir/IR/Operation.h"
|
||||||
#include "mlir/IR/StandardTypes.h"
|
#include "mlir/IR/StandardTypes.h"
|
||||||
#include "mlir/Pass/Pass.h"
|
#include "mlir/Pass/Pass.h"
|
||||||
|
#include "mlir/Support/STLExtras.h"
|
||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
|
|
||||||
static llvm::cl::opt<int> elideIfLarger(
|
static llvm::cl::opt<int> elideIfLarger(
|
||||||
|
@ -69,6 +70,11 @@ std::string DOTGraphTraits<mlir::Block *>::getNodeLabel(mlir::Operation *op,
|
||||||
std::string ostr;
|
std::string ostr;
|
||||||
raw_string_ostream os(ostr);
|
raw_string_ostream os(ostr);
|
||||||
os << op->getName() << "\n";
|
os << op->getName() << "\n";
|
||||||
|
|
||||||
|
// Print resultant types
|
||||||
|
mlir::interleaveComma(op->getResultTypes(), os);
|
||||||
|
os << "\n";
|
||||||
|
|
||||||
for (auto attr : op->getAttrs()) {
|
for (auto attr : op->getAttrs()) {
|
||||||
os << '\n' << attr.first << ": ";
|
os << '\n' << attr.first << ": ";
|
||||||
// Always emit splat attributes.
|
// Always emit splat attributes.
|
||||||
|
|
Loading…
Reference in New Issue