471 } |
471 } |
472 |
472 |
473 } // End of is two-adr |
473 } // End of is two-adr |
474 |
474 |
475 // Insert a copy at a debug use for a lrg which has high frequency |
475 // Insert a copy at a debug use for a lrg which has high frequency |
476 if( (b->_freq < OPTO_DEBUG_SPLIT_FREQ) && n->is_MachSafePoint() ) { |
476 if( b->_freq < OPTO_DEBUG_SPLIT_FREQ || b->is_uncommon(_phc._cfg._bbs) ) { |
477 // Walk the debug inputs to the node and check for lrg freq |
477 // Walk the debug inputs to the node and check for lrg freq |
478 JVMState* jvms = n->jvms(); |
478 JVMState* jvms = n->jvms(); |
479 uint debug_start = jvms ? jvms->debug_start() : 999999; |
479 uint debug_start = jvms ? jvms->debug_start() : 999999; |
480 uint debug_end = jvms ? jvms->debug_end() : 999999; |
480 uint debug_end = jvms ? jvms->debug_end() : 999999; |
481 for(uint inpidx = debug_start; inpidx < debug_end; inpidx++) { |
481 for(uint inpidx = debug_start; inpidx < debug_end; inpidx++) { |
485 Node *inp = n->in(inpidx); |
485 Node *inp = n->in(inpidx); |
486 uint nidx = _phc.n2lidx(inp); |
486 uint nidx = _phc.n2lidx(inp); |
487 LRG &lrg = lrgs(nidx); |
487 LRG &lrg = lrgs(nidx); |
488 |
488 |
489 // If this lrg has a high frequency use/def |
489 // If this lrg has a high frequency use/def |
490 if( lrg._maxfreq >= OPTO_LRG_HIGH_FREQ ) { |
490 if( lrg._maxfreq >= _phc.high_frequency_lrg() ) { |
491 // If the live range is also live out of this block (like it |
491 // If the live range is also live out of this block (like it |
492 // would be for a fast/slow idiom), the normal spill mechanism |
492 // would be for a fast/slow idiom), the normal spill mechanism |
493 // does an excellent job. If it is not live out of this block |
493 // does an excellent job. If it is not live out of this block |
494 // (like it would be for debug info to uncommon trap) splitting |
494 // (like it would be for debug info to uncommon trap) splitting |
495 // the live range now allows a better allocation in the high |
495 // the live range now allows a better allocation in the high |