Lines Matching refs:lr1

239   uint lr1 = _phc.Find(n1);
241 if( lr1 != lr2 && // Different live ranges already AND
242 !_phc._ifg->test_edge_sq( lr1, lr2 ) ) { // Do not interfere
243 LRG *lrg1 = &_phc.lrgs(lr1);
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
616 lrgs(lr1)._def = (lrgs(lr1).is_multidef() ||
622 lrgs(lr1)._is_oop |= lrgs(lr2)._is_oop;
625 if (lrgs(lr1)._maxfreq < lrgs(lr2)._maxfreq)
626 lrgs(lr1)._maxfreq = lrgs(lr2)._maxfreq;
641 // Stretched lr1; add it to liveness of intermediate blocks
645 _phc._live->live(b)->insert(lr1);
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 ) {
654 assert(!lrgs(lr1)._fat_proj, "cannot coalesce fat_proj");
678 if( lidx == lr1 ) return max_juint;
712 void PhaseConservativeCoalesce::update_ifg(uint lr1, uint lr2, IndexSet *n_lr1, IndexSet *n_lr2) {
713 // Some original neighbors of lr1 might have gone away
715 // Remove lr1 from such neighbors.
718 LRG &lrg1 = lrgs(lr1);
721 if( _phc._ifg->neighbors(neighbor)->remove(lr1) )
725 // lr2 is now called (coalesced into) lr1.
737 if( _phc._ifg->neighbors(neighbor)->insert(lr1) )
742 static void record_bias( const PhaseIFG *ifg, int lr1, int lr2 ) {
744 if( !ifg->lrgs(lr1)._copy_bias )
745 ifg->lrgs(lr1)._copy_bias = lr2;
747 ifg->lrgs(lr2)._copy_bias = lr1;
759 uint lr1 = _phc.Find(dst_copy);
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;
787 RegMask rm = lrgs(lr1).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(), "" );
850 IndexSet *n_lr1 = _phc._ifg->neighbors(lr1);
854 update_ifg(lr1, lr2, n_lr1, n_lr2);
856 _ulr.remove(lr1);
863 // tty->print_cr("union %d and %d", lr1, lr2);
877 lrgs(lr1).set_degree( _phc._ifg->effective_degree(lr1) );
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 );
884 lrgs(lr1).set_mask(rm);
885 lrgs(lr1).compute_set_mask_size();
886 lrgs(lr1)._cost += lrgs(lr2)._cost;
887 lrgs(lr1)._area += lrgs(lr2)._area;
892 lrgs(lr1)._was_lo = 1;