SelectionDAGDumper: Hide [ID=X], [ORD=X] and source locations by default.

You can show them with the new -dag-dump-verbose switch.

Differential Revision: http://reviews.llvm.org/D12566

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248011 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matthias Braun 2015-09-18 17:57:28 +00:00
parent 6c76d11db8
commit d53e4c92e5
3 changed files with 25 additions and 18 deletions

View File

@ -30,6 +30,11 @@
#include "llvm/Target/TargetSubtargetInfo.h"
using namespace llvm;
static cl::opt<bool>
VerboseDAGDumping("dag-dump-verbose", cl::Hidden,
cl::desc("Display more information when dumping selection "
"DAG nodes."));
std::string SDNode::getOperationName(const SelectionDAG *G) const {
switch (getOpcode()) {
default:
@ -553,6 +558,7 @@ void SDNode::print_details(raw_ostream &OS, const SelectionDAG *G) const {
<< ']';
}
if (VerboseDAGDumping) {
if (unsigned Order = getIROrder())
OS << " [ORD=" << Order << ']';
@ -574,6 +580,7 @@ void SDNode::print_details(raw_ostream &OS, const SelectionDAG *G) const {
if (unsigned C = L->getColumn())
OS << ':' << C;
}
}
static void DumpNodes(const SDNode *N, unsigned indent, const SelectionDAG *G) {
for (const SDValue &Op : N->op_values())

View File

@ -1,4 +1,4 @@
; RUN: llc -debug < %s 2>&1 | FileCheck %s
; RUN: llc -debug -dag-dump-verbose < %s 2>&1 | FileCheck %s
; REQUIRES: asserts
; CHECK: t{{[0-9]+}}: i32 = Constant<-1>test.c:4:5

View File

@ -1,4 +1,4 @@
; RUN: llc -debug < %s 2>&1 | FileCheck %s
; RUN: llc -debug -dag-dump-verbose < %s 2>&1 | FileCheck %s
; REQUIRES: asserts
; CHECK: t{{[0-9]+}}: f64 = ConstantFP<1.500000e+00>test.c:3:5