hotspot/src/share/vm/opto/split_if.cpp
changeset 12958 009b6c9586d8
parent 10502 17598114b94c
child 13895 f6dfe4123709
equal deleted inserted replaced
12957:f3cc386f349e 12958:009b6c9586d8
   135             assert( iff->in(1) == bol, "" );
   135             assert( iff->in(1) == bol, "" );
   136             // Get control block of either the CMove or the If input
   136             // Get control block of either the CMove or the If input
   137             Node *iff_ctrl = iff->is_If() ? iff->in(0) : get_ctrl(iff);
   137             Node *iff_ctrl = iff->is_If() ? iff->in(0) : get_ctrl(iff);
   138             Node *x = bol->clone();
   138             Node *x = bol->clone();
   139             register_new_node(x, iff_ctrl);
   139             register_new_node(x, iff_ctrl);
   140             _igvn.hash_delete(iff);
   140             _igvn.replace_input_of(iff, 1, x);
   141             iff->set_req(1, x);
       
   142             _igvn._worklist.push(iff);
       
   143           }
   141           }
   144           _igvn.remove_dead_node( bol );
   142           _igvn.remove_dead_node( bol );
   145           --i;
   143           --i;
   146         }
   144         }
   147       }
   145       }
   149       for (DUIterator_Last jmin, j = n->last_outs(jmin); j >= jmin; --j) {
   147       for (DUIterator_Last jmin, j = n->last_outs(jmin); j >= jmin; --j) {
   150         Node* bol = n->last_out(j);
   148         Node* bol = n->last_out(j);
   151         assert( bol->in(1) == n, "" );
   149         assert( bol->in(1) == n, "" );
   152         Node *x = n->clone();
   150         Node *x = n->clone();
   153         register_new_node(x, get_ctrl(bol));
   151         register_new_node(x, get_ctrl(bol));
   154         _igvn.hash_delete(bol);
   152         _igvn.replace_input_of(bol, 1, x);
   155         bol->set_req(1, x);
       
   156         _igvn._worklist.push(bol);
       
   157       }
   153       }
   158       _igvn.remove_dead_node( n );
   154       _igvn.remove_dead_node( n );
   159 
   155 
   160       return true;
   156       return true;
   161     }
   157     }
   385   uint i;
   381   uint i;
   386   for( i = 0; i < use->req(); i++ )
   382   for( i = 0; i < use->req(); i++ )
   387     if( use->in(i) == def )
   383     if( use->in(i) == def )
   388       break;
   384       break;
   389   assert( i < use->req(), "def should be among use's inputs" );
   385   assert( i < use->req(), "def should be among use's inputs" );
   390   _igvn.hash_delete(use);
   386   _igvn.replace_input_of(use, i, new_def);
   391   use->set_req(i, new_def);
       
   392   _igvn._worklist.push(use);
       
   393 }
   387 }
   394 
   388 
   395 //------------------------------do_split_if------------------------------------
   389 //------------------------------do_split_if------------------------------------
   396 // Found an If getting its condition-code input from a Phi in the same block.
   390 // Found an If getting its condition-code input from a Phi in the same block.
   397 // Split thru the Region.
   391 // Split thru the Region.