Lines Matching defs:lr2

240   uint lr2 = _phc.Find(n2);
241 if( lr1 != lr2 && // Different live ranges already AND
242 !_phc._ifg->test_edge_sq( lr1, lr2 ) ) { // Do not interfere
244 LRG *lrg2 = &_phc.lrgs(lr2);
261 if( lr1 > lr2 ) {
262 uint tmp = lr1; lr1 = lr2; lr2 = tmp;
266 // Union lr2 into lr1
271 _phc._ifg->Union( lr1, lr2 );
607 void PhaseConservativeCoalesce::union_helper( Node *lr1_node, Node *lr2_node, uint lr1, uint lr2, Node *src_def, Node *dst_copy, Node *src_copy, Block *b, uint bindex ) {
608 // Join live ranges. Merge larger into smaller. Union lr2 into lr1 in the
617 lrgs(lr2).is_multidef() )
619 lrgs(lr2)._def = NULL; // No def for lrg 2
620 lrgs(lr2).Clear(); // Force empty mask for LRG 2
621 //lrgs(lr2)._size = 0; // Live-range 2 goes dead
622 lrgs(lr1)._is_oop |= lrgs(lr2)._is_oop;
623 lrgs(lr2)._is_oop = 0; // In particular, not an oop for GC info
625 if (lrgs(lr1)._maxfreq < lrgs(lr2)._maxfreq)
626 lrgs(lr1)._maxfreq = lrgs(lr2)._maxfreq;
652 uint PhaseConservativeCoalesce::compute_separating_interferences(Node *dst_copy, Node *src_copy, Block *b, uint bindex, RegMask &rm, uint reg_degree, uint rm_size, uint lr1, uint lr2 ) {
655 assert(!lrgs(lr2)._fat_proj, "cannot coalesce fat_proj");
679 if( lidx == lr2 ) return max_juint;
712 void PhaseConservativeCoalesce::update_ifg(uint lr1, uint lr2, IndexSet *n_lr1, IndexSet *n_lr2) {
725 // lr2 is now called (coalesced into) lr1.
726 // Remove lr2 from the IFG.
728 LRG &lrg2 = lrgs(lr2);
730 if( _phc._ifg->neighbors(neighbor)->remove(lr2) )
742 static void record_bias( const PhaseIFG *ifg, int lr1, int lr2 ) {
745 ifg->lrgs(lr1)._copy_bias = lr2;
746 if( !ifg->lrgs(lr2)._copy_bias )
747 ifg->lrgs(lr2)._copy_bias = lr1;
760 uint lr2 = _phc.Find(src_def );
763 if( lr1 == lr2 ) return false;
766 if( _phc._ifg->test_edge_sq( lr1, lr2 ) ) return false;
769 if( !lrgs(lr1)._is_oop && lrgs(lr2)._is_oop ) // not an oop->int cast
774 if( lrgs(lr1)._fat_proj != lrgs(lr2)._fat_proj )
780 if( lr1 > lr2 ) {
781 uint tmp = lr1; lr1 = lr2; lr2 = tmp;
788 rm.AND(lrgs(lr2).mask());
816 //record_bias( _phc._lrgs, lr1, lr2 );
824 uint reg_degree = _ulr.lrg_union( lr1, lr2, rm_size, _phc._ifg, rm );
827 record_bias( _phc._ifg, lr1, lr2 );
837 reg_degree = compute_separating_interferences(dst_copy, src_copy, b, bindex, rm, rm_size, reg_degree, lr1, lr2 );
839 record_bias( _phc._ifg, lr1, lr2 );
848 assert( lrgs(lr1).num_regs() == lrgs(lr2).num_regs(), "" );
851 IndexSet *n_lr2 = _phc._ifg->neighbors(lr2);
854 update_ifg(lr1, lr2, n_lr1, n_lr2);
863 // tty->print_cr("union %d and %d", lr1, lr2);
878 lrgs(lr2).set_degree( 0 );
880 // Join live ranges. Merge larger into smaller. Union lr2 into lr1 in the
882 union_helper( lr1_node, lr2_node, lr1, lr2, src_def, dst_copy, src_copy, b, bindex );
886 lrgs(lr1)._cost += lrgs(lr2)._cost;
887 lrgs(lr1)._area += lrgs(lr2)._area;