diff options
author | James Y Knight <jyknight@google.com> | 2015-10-27 23:09:03 +0000 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2015-10-27 23:09:03 +0000 |
commit | 14eedd189b4a91a72e96895adeb647860784395a (patch) | |
tree | db136f9928d9d69a77b6c703ac49e929e51522f9 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp | |
parent | 128a9760e0c191b1d7b5e64cee0b32497639e4b1 (diff) | |
download | bcm5719-llvm-14eedd189b4a91a72e96895adeb647860784395a.tar.gz bcm5719-llvm-14eedd189b4a91a72e96895adeb647860784395a.zip |
Make the SelectionDAG graph printer use SDNode::PersistentId labels.
r248010 changed the -debug output to use short ids, but did not
similarly modify the graph printer. Change to be consistent, for ease of
cross-reference.
llvm-svn: 251465
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp index 4df5ede388f..2764688518c 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp @@ -80,9 +80,16 @@ namespace llvm { return true; } - static bool hasNodeAddressLabel(const SDNode *Node, - const SelectionDAG *Graph) { - return true; + static std::string getNodeIdentifierLabel(const SDNode *Node, + const SelectionDAG *Graph) { + std::string R; + raw_string_ostream OS(R); +#ifndef NDEBUG + OS << 't' << Node->PersistentId; +#else + OS << static_cast<const void *>(Node); +#endif + return R; } /// If you want to override the dot attributes printed for a particular |