projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9ee9e6
)
AssignNodeIds assign each node in the DAG an unique id.
author
Evan Cheng
<evan.cheng@apple.com>
Thu, 27 Jul 2006 06:39:06 +0000
(06:39 +0000)
committer
Evan Cheng
<evan.cheng@apple.com>
Thu, 27 Jul 2006 06:39:06 +0000
(06:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29337
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 07b7c88829e03c1346ee97ae8247cfa249616d41..77904bf8287bb85132af65b2a48470c0a84e92b5 100644
(file)
--- a/
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@
-2698,6
+2698,18
@@
void SelectionDAG::ReplaceAllUsesOfValueWith(SDOperand From, SDOperand To,
}
+/// 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
//===----------------------------------------------------------------------===//