src/share/vm/opto/ifnode.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6915110 Sdiff src/share/vm/opto

src/share/vm/opto/ifnode.cpp

Print this page




 514   igvn->hash_delete( iff );
 515   iff->set_req_X( 1, new_bol, igvn );
 516 }
 517 
 518 //------------------------------up_one_dom-------------------------------------
 519 // Walk up the dominator tree one step.  Return NULL at root or true
 520 // complex merges.  Skips through small diamonds.
 521 Node* IfNode::up_one_dom(Node *curr, bool linear_only) {
 522   Node *dom = curr->in(0);
 523   if( !dom )                    // Found a Region degraded to a copy?
 524     return curr->nonnull_req(); // Skip thru it
 525 
 526   if( curr != dom )             // Normal walk up one step?
 527     return dom;
 528 
 529   // Use linear_only if we are still parsing, since we cannot
 530   // trust the regions to be fully filled in.
 531   if (linear_only)
 532     return NULL;
 533 



 534   // Else hit a Region.  Check for a loop header
 535   if( dom->is_Loop() )
 536     return dom->in(1);          // Skip up thru loops
 537 
 538   // Check for small diamonds
 539   Node *din1, *din2, *din3, *din4;
 540   if( dom->req() == 3 &&        // 2-path merge point
 541       (din1 = dom ->in(1)) &&   // Left  path exists
 542       (din2 = dom ->in(2)) &&   // Right path exists
 543       (din3 = din1->in(0)) &&   // Left  path up one
 544       (din4 = din2->in(0)) ) {  // Right path up one
 545     if( din3->is_Call() &&      // Handle a slow-path call on either arm
 546         (din3 = din3->in(0)) )
 547       din3 = din3->in(0);
 548     if( din4->is_Call() &&      // Handle a slow-path call on either arm
 549         (din4 = din4->in(0)) )
 550       din4 = din4->in(0);
 551     if( din3 == din4 && din3->is_If() )
 552       return din3;              // Skip around diamonds
 553   }




 514   igvn->hash_delete( iff );
 515   iff->set_req_X( 1, new_bol, igvn );
 516 }
 517 
 518 //------------------------------up_one_dom-------------------------------------
 519 // Walk up the dominator tree one step.  Return NULL at root or true
 520 // complex merges.  Skips through small diamonds.
 521 Node* IfNode::up_one_dom(Node *curr, bool linear_only) {
 522   Node *dom = curr->in(0);
 523   if( !dom )                    // Found a Region degraded to a copy?
 524     return curr->nonnull_req(); // Skip thru it
 525 
 526   if( curr != dom )             // Normal walk up one step?
 527     return dom;
 528 
 529   // Use linear_only if we are still parsing, since we cannot
 530   // trust the regions to be fully filled in.
 531   if (linear_only)
 532     return NULL;
 533 
 534   if( dom->is_Root() )
 535     return NULL;
 536 
 537   // Else hit a Region.  Check for a loop header
 538   if( dom->is_Loop() )
 539     return dom->in(1);          // Skip up thru loops
 540 
 541   // Check for small diamonds
 542   Node *din1, *din2, *din3, *din4;
 543   if( dom->req() == 3 &&        // 2-path merge point
 544       (din1 = dom ->in(1)) &&   // Left  path exists
 545       (din2 = dom ->in(2)) &&   // Right path exists
 546       (din3 = din1->in(0)) &&   // Left  path up one
 547       (din4 = din2->in(0)) ) {  // Right path up one
 548     if( din3->is_Call() &&      // Handle a slow-path call on either arm
 549         (din3 = din3->in(0)) )
 550       din3 = din3->in(0);
 551     if( din4->is_Call() &&      // Handle a slow-path call on either arm
 552         (din4 = din4->in(0)) )
 553       din4 = din4->in(0);
 554     if( din3 == din4 && din3->is_If() )
 555       return din3;              // Skip around diamonds
 556   }


src/share/vm/opto/ifnode.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File