< prev index next >

src/share/vm/opto/loopopts.cpp

Print this page




 895     if( !C->major_progress() )   // If chance of no more loop opts...
 896       _igvn._worklist.push(n);  // maybe we'll remove them
 897     return n;
 898   }
 899 
 900   if( n->is_Con() ) return n;   // No cloning for Con nodes
 901 
 902   Node *n_ctrl = get_ctrl(n);
 903   if( !n_ctrl ) return n;       // Dead node
 904 
 905   Node* res = try_move_store_before_loop(n, n_ctrl);
 906   if (res != NULL) {
 907     return n;
 908   }
 909 
 910   // Attempt to remix address expressions for loop invariants
 911   Node *m = remix_address_expressions( n );
 912   if( m ) return m;
 913 
 914   if (n->is_ConstraintCast()) {
 915     Node* dom_cast = n->as_ConstraintCast()->dominating_cast(this);
 916     if (dom_cast != NULL) {
 917       _igvn.replace_node(n, dom_cast);
 918       return dom_cast;
 919     }
 920   }
 921 
 922   // Determine if the Node has inputs from some local Phi.
 923   // Returns the block to clone thru.
 924   Node *n_blk = has_local_phi_input( n );
 925   if( !n_blk ) return n;
 926 
 927   // Do not clone the trip counter through on a CountedLoop
 928   // (messes up the canonical shape).
 929   if( n_blk->is_CountedLoop() && n->Opcode() == Op_AddI ) return n;
 930 
 931   // Check for having no control input; not pinned.  Allow
 932   // dominating control.
 933   if (n->in(0)) {
 934     Node *dom = idom(n_blk);
 935     if (dom_lca(n->in(0), dom) != n->in(0)) {




 895     if( !C->major_progress() )   // If chance of no more loop opts...
 896       _igvn._worklist.push(n);  // maybe we'll remove them
 897     return n;
 898   }
 899 
 900   if( n->is_Con() ) return n;   // No cloning for Con nodes
 901 
 902   Node *n_ctrl = get_ctrl(n);
 903   if( !n_ctrl ) return n;       // Dead node
 904 
 905   Node* res = try_move_store_before_loop(n, n_ctrl);
 906   if (res != NULL) {
 907     return n;
 908   }
 909 
 910   // Attempt to remix address expressions for loop invariants
 911   Node *m = remix_address_expressions( n );
 912   if( m ) return m;
 913 
 914   if (n->is_ConstraintCast()) {
 915     Node* dom_cast = n->as_ConstraintCast()->dominating_cast(&_igvn, this);
 916     if (dom_cast != NULL) {
 917       _igvn.replace_node(n, dom_cast);
 918       return dom_cast;
 919     }
 920   }
 921 
 922   // Determine if the Node has inputs from some local Phi.
 923   // Returns the block to clone thru.
 924   Node *n_blk = has_local_phi_input( n );
 925   if( !n_blk ) return n;
 926 
 927   // Do not clone the trip counter through on a CountedLoop
 928   // (messes up the canonical shape).
 929   if( n_blk->is_CountedLoop() && n->Opcode() == Op_AddI ) return n;
 930 
 931   // Check for having no control input; not pinned.  Allow
 932   // dominating control.
 933   if (n->in(0)) {
 934     Node *dom = idom(n_blk);
 935     if (dom_lca(n->in(0), dom) != n->in(0)) {


< prev index next >