forked from OSchip/llvm-project
AssignNodeIds assign each node in the DAG an unique id.
llvm-svn: 29337
This commit is contained in:
parent
ad4b9f58f5
commit
29eefc164c
|
@ -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
|
// SDNode Class
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
Loading…
Reference in New Issue