529 // bail (or bomb[ASSERT/DEBUG]) if NOT projection-->IfNode-->BoolNode
530 DEBUG_ONLY( if( !bol->is_Bool() ) { proj->dump(3); fatal("Expect projection-->IfNode-->BoolNode"); } )
531 if( !bol->is_Bool() ) return;
532
533 Node *cmp = bol->in(1);
534 // Compute a new check
535 Node *new_add = gvn->intcon(off_lo);
536 if( index ) {
537 new_add = off_lo ? gvn->transform(new (gvn->C, 3) AddINode( index, new_add )) : index;
538 }
539 Node *new_cmp = (flip == 1)
540 ? new (gvn->C, 3) CmpUNode( new_add, range )
541 : new (gvn->C, 3) CmpUNode( range, new_add );
542 new_cmp = gvn->transform(new_cmp);
543 // See if no need to adjust the existing check
544 if( new_cmp == cmp ) return;
545 // Else, adjust existing check
546 Node *new_bol = gvn->transform( new (gvn->C, 2) BoolNode( new_cmp, bol->as_Bool()->_test._test ) );
547 igvn->hash_delete( iff );
548 iff->set_req_X( 1, new_bol, igvn );
549 }
550
551 //------------------------------up_one_dom-------------------------------------
552 // Walk up the dominator tree one step. Return NULL at root or true
553 // complex merges. Skips through small diamonds.
554 Node* IfNode::up_one_dom(Node *curr, bool linear_only) {
555 Node *dom = curr->in(0);
556 if( !dom ) // Found a Region degraded to a copy?
557 return curr->nonnull_req(); // Skip thru it
558
559 if( curr != dom ) // Normal walk up one step?
560 return dom;
561
562 // Use linear_only if we are still parsing, since we cannot
563 // trust the regions to be fully filled in.
564 if (linear_only)
565 return NULL;
566
567 if( dom->is_Root() )
568 return NULL;
|
529 // bail (or bomb[ASSERT/DEBUG]) if NOT projection-->IfNode-->BoolNode
530 DEBUG_ONLY( if( !bol->is_Bool() ) { proj->dump(3); fatal("Expect projection-->IfNode-->BoolNode"); } )
531 if( !bol->is_Bool() ) return;
532
533 Node *cmp = bol->in(1);
534 // Compute a new check
535 Node *new_add = gvn->intcon(off_lo);
536 if( index ) {
537 new_add = off_lo ? gvn->transform(new (gvn->C, 3) AddINode( index, new_add )) : index;
538 }
539 Node *new_cmp = (flip == 1)
540 ? new (gvn->C, 3) CmpUNode( new_add, range )
541 : new (gvn->C, 3) CmpUNode( range, new_add );
542 new_cmp = gvn->transform(new_cmp);
543 // See if no need to adjust the existing check
544 if( new_cmp == cmp ) return;
545 // Else, adjust existing check
546 Node *new_bol = gvn->transform( new (gvn->C, 2) BoolNode( new_cmp, bol->as_Bool()->_test._test ) );
547 igvn->hash_delete( iff );
548 iff->set_req_X( 1, new_bol, igvn );
549 igvn->_worklist.push( iff );
550 }
551
552 //------------------------------up_one_dom-------------------------------------
553 // Walk up the dominator tree one step. Return NULL at root or true
554 // complex merges. Skips through small diamonds.
555 Node* IfNode::up_one_dom(Node *curr, bool linear_only) {
556 Node *dom = curr->in(0);
557 if( !dom ) // Found a Region degraded to a copy?
558 return curr->nonnull_req(); // Skip thru it
559
560 if( curr != dom ) // Normal walk up one step?
561 return dom;
562
563 // Use linear_only if we are still parsing, since we cannot
564 // trust the regions to be fully filled in.
565 if (linear_only)
566 return NULL;
567
568 if( dom->is_Root() )
569 return NULL;
|