src/share/vm/opto/split_if.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8034812 Sdiff src/share/vm/opto

src/share/vm/opto/split_if.cpp

Print this page




  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "memory/allocation.inline.hpp"
  27 #include "opto/callnode.hpp"
  28 #include "opto/loopnode.hpp"
  29 #include "opto/movenode.hpp"
  30 
  31 
  32 //------------------------------split_thru_region------------------------------
  33 // Split Node 'n' through merge point.
  34 Node *PhaseIdealLoop::split_thru_region( Node *n, Node *region ) {
  35   uint wins = 0;
  36   assert( n->is_CFG(), "" );
  37   assert( region->is_Region(), "" );
  38   Node *r = new (C) RegionNode( region->req() );
  39   IdealLoopTree *loop = get_loop( n );
  40   for( uint i = 1; i < region->req(); i++ ) {
  41     Node *x = n->clone();
  42     Node *in0 = n->in(0);
  43     if( in0->in(0) == region ) x->set_req( 0, in0->in(i) );
  44     for( uint j = 1; j < n->req(); j++ ) {
  45       Node *in = n->in(j);
  46       if( get_ctrl(in) == region )
  47         x->set_req( j, in->in(i) );
  48     }
  49     _igvn.register_new_node_with_optimizer(x);
  50     set_loop(x, loop);
  51     set_idom(x, x->in(0), dom_depth(x->in(0))+1);
  52     r->init_req(i, x);
  53   }
  54 
  55   // Record region
  56   r->set_req(0,region);         // Not a TRUE RegionNode
  57   _igvn.register_new_node_with_optimizer(r);
  58   set_loop(r, loop);




  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "memory/allocation.inline.hpp"
  27 #include "opto/callnode.hpp"
  28 #include "opto/loopnode.hpp"
  29 #include "opto/movenode.hpp"
  30 
  31 
  32 //------------------------------split_thru_region------------------------------
  33 // Split Node 'n' through merge point.
  34 Node *PhaseIdealLoop::split_thru_region( Node *n, Node *region ) {
  35   uint wins = 0;
  36   assert( n->is_CFG(), "" );
  37   assert( region->is_Region(), "" );
  38   Node *r = new RegionNode( region->req() );
  39   IdealLoopTree *loop = get_loop( n );
  40   for( uint i = 1; i < region->req(); i++ ) {
  41     Node *x = n->clone();
  42     Node *in0 = n->in(0);
  43     if( in0->in(0) == region ) x->set_req( 0, in0->in(i) );
  44     for( uint j = 1; j < n->req(); j++ ) {
  45       Node *in = n->in(j);
  46       if( get_ctrl(in) == region )
  47         x->set_req( j, in->in(i) );
  48     }
  49     _igvn.register_new_node_with_optimizer(x);
  50     set_loop(x, loop);
  51     set_idom(x, x->in(0), dom_depth(x->in(0))+1);
  52     r->init_req(i, x);
  53   }
  54 
  55   // Record region
  56   r->set_req(0,region);         // Not a TRUE RegionNode
  57   _igvn.register_new_node_with_optimizer(r);
  58   set_loop(r, loop);


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