X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FSelectionDAG%2FSelectionDAGPrinter.cpp;h=db119a649549c0e42dd947410101b3ebfa451ad9;hb=edfba7e707a4f2f2e800843a7ef980c27d7f4eff;hp=904638d4f7aa8fc88f09c775171eee1193556a89;hpb=639cdc210b86302bfa03e2a88266ef0d4aba102c;p=oota-llvm.git diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp index 904638d4f7a..db119a64954 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp @@ -18,6 +18,7 @@ #include "llvm/CodeGen/ScheduleDAG.h" #include "llvm/CodeGen/MachineConstantPool.h" #include "llvm/CodeGen/MachineFunction.h" +#include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/Target/TargetRegisterInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Support/GraphWriter.h" @@ -48,7 +49,7 @@ namespace llvm { template static std::string getEdgeAttributes(const void *Node, EdgeIter EI) { SDOperand Op = EI.getNode()->getOperand(EI.getOperand()); - MVT::ValueType VT = Op.getValueType(); + MVT VT = Op.getValueType(); if (VT == MVT::Flag) return "color=red,style=bold"; else if (VT == MVT::Other) @@ -90,7 +91,7 @@ std::string DOTGraphTraits::getNodeLabel(const SDNode *Node, if (Node->getValueType(i) == MVT::Other) Op += ":ch"; else - Op = Op + ":" + MVT::getValueTypeString(Node->getValueType(i)); + Op = Op + ":" + Node->getValueType(i).getMVTString(); if (const ConstantSDNode *CSDN = dyn_cast(Node)) { Op += ": " + utostr(CSDN->getValue()); @@ -138,6 +139,13 @@ std::string DOTGraphTraits::getNodeLabel(const SDNode *Node, } else { Op += " #" + utostr(R->getReg()); } + } else if (const DbgStopPointSDNode *D = dyn_cast(Node)) { + Op += ": " + D->getCompileUnit()->getFileName(); + Op += ":" + utostr(D->getLine()); + if (D->getColumn() != 0) + Op += ":" + utostr(D->getColumn()); + } else if (const LabelSDNode *L = dyn_cast(Node)) { + Op += ": LabelID=" + utostr(L->getLabelID()); } else if (const ExternalSymbolSDNode *ES = dyn_cast(Node)) { Op += "'" + std::string(ES->getSymbol()) + "'"; @@ -154,9 +162,7 @@ std::string DOTGraphTraits::getNodeLabel(const SDNode *Node, } else if (const ARG_FLAGSSDNode *N = dyn_cast(Node)) { Op = Op + " AF=" + N->getArgFlags().getArgFlagsString(); } else if (const VTSDNode *N = dyn_cast(Node)) { - Op = Op + " VT=" + MVT::getValueTypeString(N->getVT()); - } else if (const StringSDNode *N = dyn_cast(Node)) { - Op = Op + "\"" + N->getValue() + "\""; + Op = Op + " VT=" + N->getVT().getMVTString(); } else if (const LoadSDNode *LD = dyn_cast(Node)) { bool doExt = true; switch (LD->getExtensionType()) { @@ -172,7 +178,7 @@ std::string DOTGraphTraits::getNodeLabel(const SDNode *Node, break; } if (doExt) - Op += MVT::getValueTypeString(LD->getMemoryVT()) + ">"; + Op += LD->getMemoryVT().getMVTString() + ">"; if (LD->isVolatile()) Op += ""; Op += LD->getIndexedModeName(LD->getAddressingMode()); @@ -180,7 +186,7 @@ std::string DOTGraphTraits::getNodeLabel(const SDNode *Node, Op += " A=" + utostr(LD->getAlignment()); } else if (const StoreSDNode *ST = dyn_cast(Node)) { if (ST->isTruncatingStore()) - Op += "getMemoryVT()) + ">"; + Op += "getMemoryVT().getMVTString() + ">"; if (ST->isVolatile()) Op += ""; Op += ST->getIndexedModeName(ST->getAddressingMode()); @@ -301,9 +307,9 @@ namespace llvm { static void addCustomGraphFeatures(ScheduleDAG *G, GraphWriter &GW) { GW.emitSimpleNode(0, "plaintext=circle", "GraphRoot"); - if (G->DAG.getRoot().Val && - G->SUnitMap.find(G->DAG.getRoot().Val) != G->SUnitMap.end()) - GW.emitEdge(0, -1, G->SUnitMap[G->DAG.getRoot().Val].front(), -1, ""); + const SDNode *N = G->DAG.getRoot().Val; + if (N && N->getNodeId() != -1) + GW.emitEdge(0, -1, &G->SUnits[N->getNodeId()], -1, ""); } }; }