forked from OSchip/llvm-project
Teach the graph viewer to handle register operands that are zero.
llvm-svn: 24421
This commit is contained in:
parent
301015a703
commit
a22eae0163
|
@ -82,7 +82,7 @@ std::string DOTGraphTraits<SelectionDAG*>::getNodeLabel(const SDNode *Node,
|
||||||
Op += LBB->getName();
|
Op += LBB->getName();
|
||||||
//Op += " " + (const void*)BBDN->getBasicBlock();
|
//Op += " " + (const void*)BBDN->getBasicBlock();
|
||||||
} else if (const RegisterSDNode *R = dyn_cast<RegisterSDNode>(Node)) {
|
} else if (const RegisterSDNode *R = dyn_cast<RegisterSDNode>(Node)) {
|
||||||
if (G && MRegisterInfo::isPhysicalRegister(R->getReg())) {
|
if (G && R->getReg() != 0 && MRegisterInfo::isPhysicalRegister(R->getReg())) {
|
||||||
Op = Op + " " + G->getTarget().getRegisterInfo()->getName(R->getReg());
|
Op = Op + " " + G->getTarget().getRegisterInfo()->getName(R->getReg());
|
||||||
} else {
|
} else {
|
||||||
Op += " #" + utostr(R->getReg());
|
Op += " #" + utostr(R->getReg());
|
||||||
|
|
Loading…
Reference in New Issue