mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-22 10:33:23 +00:00
Make flag and chain edges visually distinguishable from value edges in DOT
output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31067 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
986cc38613
commit
34ab4d45d2
@ -41,6 +41,20 @@ namespace llvm {
|
||||
const SelectionDAG *Graph) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/// If you want to override the dot attributes printed for a particular
|
||||
/// edge, override this method.
|
||||
template<typename EdgeIter>
|
||||
static std::string getEdgeAttributes(const void *Node, EdgeIter EI) {
|
||||
SDOperand Op = EI.getNode()->getOperand(EI.getOperand());
|
||||
MVT::ValueType VT = Op.getValueType();
|
||||
if (VT == MVT::Flag)
|
||||
return "color=red,style=bold";
|
||||
else if (VT == MVT::Other)
|
||||
return "style=dashed";
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
static std::string getNodeLabel(const SDNode *Node,
|
||||
const SelectionDAG *Graph);
|
||||
@ -114,7 +128,8 @@ std::string DOTGraphTraits<SelectionDAG*>::getNodeLabel(const SDNode *Node,
|
||||
Op += LBB->getName();
|
||||
//Op += " " + (const void*)BBDN->getBasicBlock();
|
||||
} else if (const RegisterSDNode *R = dyn_cast<RegisterSDNode>(Node)) {
|
||||
if (G && R->getReg() != 0 && MRegisterInfo::isPhysicalRegister(R->getReg())) {
|
||||
if (G && R->getReg() != 0 &&
|
||||
MRegisterInfo::isPhysicalRegister(R->getReg())) {
|
||||
Op = Op + " " + G->getTarget().getRegisterInfo()->getName(R->getReg());
|
||||
} else {
|
||||
Op += " #" + utostr(R->getReg());
|
||||
|
Loading…
x
Reference in New Issue
Block a user