diff options
author | Dan Gohman <gohman@apple.com> | 2008-06-21 19:18:17 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-06-21 19:18:17 +0000 |
commit | 94d7a5f8156e62532870fbaf197377b34e52ff2a (patch) | |
tree | 1dd752a40251eb875de5187342991e2508e8d6e2 /lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp | |
parent | 3627e34486db088661bc7fb6c0dde6a18a543217 (diff) | |
download | external_llvm-94d7a5f8156e62532870fbaf197377b34e52ff2a.zip external_llvm-94d7a5f8156e62532870fbaf197377b34e52ff2a.tar.gz external_llvm-94d7a5f8156e62532870fbaf197377b34e52ff2a.tar.bz2 |
Remove ScheduleDAG's SUnitMap altogether. Instead, use SDNode's NodeId
field, which is otherwise unused after instruction selection, as an index
into the SUnit array.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52583 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp index 995d877..07f3221 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp @@ -301,9 +301,9 @@ namespace llvm { static void addCustomGraphFeatures(ScheduleDAG *G, GraphWriter<ScheduleDAG*> &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], -1, ""); + const SDNode *N = G->DAG.getRoot().Val; + if (N && N->getNodeId() != -1) + GW.emitEdge(0, -1, &G->SUnits[N->getNodeId()], -1, ""); } }; } |