src/share/vm/opto/ifg.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/opto/ifg.cpp Fri Feb 21 17:40:44 2014
--- new/src/share/vm/opto/ifg.cpp Fri Feb 21 17:40:44 2014
*** 701,711 ****
--- 701,711 ----
lrg._area += cost;
raise_pressure(b, lrg, int_pressure, float_pressure);
assert(int_pressure._current_pressure == count_int_pressure(liveout), "the int pressure is incorrect");
assert(float_pressure._current_pressure == count_float_pressure(liveout), "the float pressure is incorrect");
}
! assert(!(lrg._area < 0.0), "negative spill area" );
! assert(lrg._area >= 0.0, "negative spill area" );
}
}
/*
* If we run off the top of the block with high pressure just record that the
*** 770,780 ****
--- 770,780 ----
block->_reg_pressure = 0;
block->_freg_pressure = 0;
int inst_count = last_inst - first_inst;
double cost = (inst_count <= 0) ? 0.0 : block->_freq * double(inst_count);
! assert(!(cost < 0.0), "negative spill cost" );
! assert(cost >= 0.0, "negative spill cost" );
compute_initial_block_pressure(block, &liveout, int_pressure, float_pressure, cost);
for (uint location = last_inst; location > 0; location--) {
Node* n = block->get_node(location);
*** 797,807 ****
--- 797,811 ----
check_for_high_pressure_transition_at_fatproj(block->_reg_pressure, location, lrg, int_pressure, Op_RegI);
check_for_high_pressure_transition_at_fatproj(block->_freg_pressure, location, lrg, float_pressure, Op_RegD);
}
} else {
// A live range ends at its definition, remove the remaining area.
+ // If the cost is +Inf (which might happen in extreme cases), the lrg area will also be +Inf,
+ // and +Inf - +Inf = NaN. So let's not do that subtraction.
+ if (g_isfinite(cost)) {
lrg._area -= cost;
+ }
assert(lrg._area >= 0.0, "negative spill area" );
assign_high_score_to_immediate_copies(block, n, lrg, location + 1, last_inst);
if (liveout.remove(lid)) {
src/share/vm/opto/ifg.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File