[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Evan Cheng
evan.cheng at apple.com
Wed Jul 26 23:39:20 PDT 2006
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAG.cpp updated: 1.311 -> 1.312
---
Log message:
AssignNodeIds assign each node in the DAG an unique id.
---
Diffs of the changes: (+12 -0)
SelectionDAG.cpp | 12 ++++++++++++
1 files changed, 12 insertions(+)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.311 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.312
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.311 Tue Jul 18 19:00:37 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Thu Jul 27 01:39:06 2006
@@ -2698,6 +2698,18 @@
}
+/// AssignNodeIds - Assign a unique node id for each node in the DAG. It returns
+/// the maximum id.
+int SelectionDAG::AssignNodeIds() {
+ int Id = 0;
+ for (allnodes_iterator I = allnodes_begin(), E = allnodes_end(); I != E; ++I){
+ SDNode *N = I;
+ N->setNodeId(Id++);
+ }
+ return Id;
+}
+
+
//===----------------------------------------------------------------------===//
// SDNode Class
//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list