mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-09 01:38:03 +00:00
AssignNodeIds assign each node in the DAG an unique id.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29337 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b9ee9e60a9
commit
091cba1b91
@ -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
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
Loading…
x
Reference in New Issue
Block a user