1 #include "llvm/CodeGen/IGNode.h"
6 //-----------------------------------------------------------------------------
7 // Sets this IGNode on stack and reduce the degree of neighbors
8 //-----------------------------------------------------------------------------
10 void IGNode::pushOnStack() {
12 int neighs = AdjList.size();
15 cerr << "\nAdj List size = " << neighs;
16 assert(0 && "Invalid adj list size");
19 for(int i=0; i < neighs; i++)
20 AdjList[i]->decCurDegree();
23 //-----------------------------------------------------------------------------
24 // Deletes an adjacency node. IGNodes are deleted when coalescing merges
25 // two IGNodes together.
26 //-----------------------------------------------------------------------------
28 void IGNode::delAdjIGNode(const IGNode *Node) {
29 std::vector<IGNode *>::iterator It=find(AdjList.begin(), AdjList.end(), Node);
30 assert( It != AdjList.end() ); // the node must be there