6684385: Loop unswitching crashes without LoopNode

Without LoopNode, exit early from loop unswitching and partial peeling

Reviewed-by: kvn, never, sgoldman
This commit is contained in:
Chuck Rasbold 2008-04-09 09:25:45 -07:00
parent c89e39d40a
commit ba411c2466
2 changed files with 6 additions and 0 deletions

View file

@ -51,6 +51,9 @@ bool IdealLoopTree::policy_unswitching( PhaseIdealLoop *phase ) const {
if( !LoopUnswitching ) {
return false;
}
if (!_head->is_Loop()) {
return false;
}
uint nodes_left = MaxNodeLimit - phase->C->unique();
if (2 * _body.size() > nodes_left) {
return false; // Too speculative if running low on nodes.