380 spill->set_req(i, rdef); 381 } 382 } 383 } 384 } 385 386 387 assert( spill->out_RegMask().is_UP(), "rematerialize to a reg" ); 388 // Rematerialized op is def->spilled+1 389 set_was_spilled(spill); 390 if( _spilled_once.test(def->_idx) ) 391 set_was_spilled(spill); 392 393 insert_proj( b, insidx, spill, maxlrg++ ); 394 #ifdef ASSERT 395 // Increment the counter for this lrg 396 splits.at_put(slidx, splits.at(slidx)+1); 397 #endif 398 // See if the cloned def kills any flags, and copy those kills as well 399 uint i = insidx+1; 400 if( clone_projs( b, i, def, spill, maxlrg) ) { 401 // Adjust the point where we go hi-pressure 402 if( i <= b->_ihrp_index ) b->_ihrp_index++; 403 if( i <= b->_fhrp_index ) b->_fhrp_index++; 404 } 405 406 return spill; 407 } 408 409 //------------------------------is_high_pressure------------------------------- 410 // Function to compute whether or not this live range is "high pressure" 411 // in this block - whether it spills eagerly or not. 412 bool PhaseChaitin::is_high_pressure( Block *b, LRG *lrg, uint insidx ) { 413 if( lrg->_was_spilled1 ) return true; 414 // Forced spilling due to conflict? Then split only at binding uses 415 // or defs, not for supposed capacity problems. 416 // CNC - Turned off 7/8/99, causes too much spilling 417 // if( lrg->_is_bound ) return false; 418 419 // Use float pressure numbers for vectors. 420 bool is_float_or_vector = lrg->_is_float || lrg->_is_vector; 421 // Not yet reached the high-pressure cutoff point, so low pressure 422 uint hrp_idx = is_float_or_vector ? b->_fhrp_index : b->_ihrp_index; 423 if( insidx < hrp_idx ) return false; | 380 spill->set_req(i, rdef); 381 } 382 } 383 } 384 } 385 386 387 assert( spill->out_RegMask().is_UP(), "rematerialize to a reg" ); 388 // Rematerialized op is def->spilled+1 389 set_was_spilled(spill); 390 if( _spilled_once.test(def->_idx) ) 391 set_was_spilled(spill); 392 393 insert_proj( b, insidx, spill, maxlrg++ ); 394 #ifdef ASSERT 395 // Increment the counter for this lrg 396 splits.at_put(slidx, splits.at(slidx)+1); 397 #endif 398 // See if the cloned def kills any flags, and copy those kills as well 399 uint i = insidx+1; 400 int found_projs = clone_projs( b, i, def, spill, maxlrg); 401 if (found_projs > 0) { 402 // Adjust the point where we go hi-pressure 403 if (i <= b->_ihrp_index) { 404 b->_ihrp_index += found_projs; 405 } 406 if (i <= b->_fhrp_index) { 407 b->_fhrp_index += found_projs; 408 } 409 } 410 411 return spill; 412 } 413 414 //------------------------------is_high_pressure------------------------------- 415 // Function to compute whether or not this live range is "high pressure" 416 // in this block - whether it spills eagerly or not. 417 bool PhaseChaitin::is_high_pressure( Block *b, LRG *lrg, uint insidx ) { 418 if( lrg->_was_spilled1 ) return true; 419 // Forced spilling due to conflict? Then split only at binding uses 420 // or defs, not for supposed capacity problems. 421 // CNC - Turned off 7/8/99, causes too much spilling 422 // if( lrg->_is_bound ) return false; 423 424 // Use float pressure numbers for vectors. 425 bool is_float_or_vector = lrg->_is_float || lrg->_is_vector; 426 // Not yet reached the high-pressure cutoff point, so low pressure 427 uint hrp_idx = is_float_or_vector ? b->_fhrp_index : b->_ihrp_index; 428 if( insidx < hrp_idx ) return false; |