1 #include "llvm/CodeGen/IGNode.h"
4 //-----------------------------------------------------------------------------
6 //-----------------------------------------------------------------------------
7 IGNode::IGNode(LiveRange *const PLR, unsigned int Ind): Index(Ind),
13 ParentLR->setUserIGNode( this );
17 //-----------------------------------------------------------------------------
18 // Sets this IGNode on stack and reduce the degree of neighbors
19 //-----------------------------------------------------------------------------
20 void IGNode::pushOnStack()
23 int neighs = AdjList.size();
26 cout << "\nAdj List size = " << neighs;
27 assert(0 && "Invalid adj list size");
30 for(int i=0; i < neighs; i++) (AdjList[i])->decCurDegree();
33 //-----------------------------------------------------------------------------
34 // Deletes an adjacency node. IGNodes are deleted when coalescing merges
35 // two IGNodes together.
36 //-----------------------------------------------------------------------------
37 void IGNode::delAdjIGNode(const IGNode *const Node) {
38 vector <IGNode *>::iterator It = AdjList.begin();
41 for( ; It != AdjList.end() && (*It != Node); It++ ) ;
42 assert( It != AdjList.end() ); // the node must be there