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

src/share/vm/opto/ifnode.cpp

Print this page




 238   Node* predicate_x = NULL;
 239   bool counted_loop = r->is_CountedLoop();
 240 
 241   Node *region_c = new (igvn->C, req_c + 1) RegionNode(req_c + 1);
 242   Node *phi_c    = con1;
 243   uint  len      = r->req();
 244   Node *region_x = new (igvn->C, len - req_c) RegionNode(len - req_c);
 245   Node *phi_x    = PhiNode::make_blank(region_x, phi);
 246   for (uint i = 1, i_c = 1, i_x = 1; i < len; i++) {
 247     if (phi->in(i) == con1) {
 248       region_c->init_req( i_c++, r  ->in(i) );
 249       if (r->in(i) == predicate_proj)
 250         predicate_c = predicate_proj;
 251     } else {
 252       region_x->init_req( i_x,   r  ->in(i) );
 253       phi_x   ->init_req( i_x++, phi->in(i) );
 254       if (r->in(i) == predicate_proj)
 255         predicate_x = predicate_proj;
 256     }
 257   }








 258 
 259   // Register the new RegionNodes but do not transform them.  Cannot
 260   // transform until the entire Region/Phi conglomerate has been hacked
 261   // as a single huge transform.
 262   igvn->register_new_node_with_optimizer( region_c );
 263   igvn->register_new_node_with_optimizer( region_x );
 264   // Prevent the untimely death of phi_x.  Currently he has no uses.  He is
 265   // about to get one.  If this only use goes away, then phi_x will look dead.
 266   // However, he will be picking up some more uses down below.
 267   Node *hook = new (igvn->C, 4) Node(4);
 268   hook->init_req(0, phi_x);
 269   hook->init_req(1, phi_c);
 270   phi_x = phase->transform( phi_x );
 271 
 272   // Make the compare
 273   Node *cmp_c = phase->makecon(t);
 274   Node *cmp_x = cmp->clone();
 275   cmp_x->set_req(1,phi_x);
 276   cmp_x->set_req(2,con2);
 277   cmp_x = phase->transform(cmp_x);




 238   Node* predicate_x = NULL;
 239   bool counted_loop = r->is_CountedLoop();
 240 
 241   Node *region_c = new (igvn->C, req_c + 1) RegionNode(req_c + 1);
 242   Node *phi_c    = con1;
 243   uint  len      = r->req();
 244   Node *region_x = new (igvn->C, len - req_c) RegionNode(len - req_c);
 245   Node *phi_x    = PhiNode::make_blank(region_x, phi);
 246   for (uint i = 1, i_c = 1, i_x = 1; i < len; i++) {
 247     if (phi->in(i) == con1) {
 248       region_c->init_req( i_c++, r  ->in(i) );
 249       if (r->in(i) == predicate_proj)
 250         predicate_c = predicate_proj;
 251     } else {
 252       region_x->init_req( i_x,   r  ->in(i) );
 253       phi_x   ->init_req( i_x++, phi->in(i) );
 254       if (r->in(i) == predicate_proj)
 255         predicate_x = predicate_proj;
 256     }
 257   }
 258   if (predicate_c != NULL && (req_c > 1)) {
 259     assert(predicate_x == NULL, "only one predicate entry expected");
 260     predicate_c = NULL; // Do not clone predicate below merge point
 261   }
 262   if (predicate_x != NULL && ((len - req_c) > 2)) {
 263     assert(predicate_c == NULL, "only one predicate entry expected");
 264     predicate_x = NULL; // Do not clone predicate below merge point
 265   }
 266 
 267   // Register the new RegionNodes but do not transform them.  Cannot
 268   // transform until the entire Region/Phi conglomerate has been hacked
 269   // as a single huge transform.
 270   igvn->register_new_node_with_optimizer( region_c );
 271   igvn->register_new_node_with_optimizer( region_x );
 272   // Prevent the untimely death of phi_x.  Currently he has no uses.  He is
 273   // about to get one.  If this only use goes away, then phi_x will look dead.
 274   // However, he will be picking up some more uses down below.
 275   Node *hook = new (igvn->C, 4) Node(4);
 276   hook->init_req(0, phi_x);
 277   hook->init_req(1, phi_c);
 278   phi_x = phase->transform( phi_x );
 279 
 280   // Make the compare
 281   Node *cmp_c = phase->makecon(t);
 282   Node *cmp_x = cmp->clone();
 283   cmp_x->set_req(1,phi_x);
 284   cmp_x->set_req(2,con2);
 285   cmp_x = phase->transform(cmp_x);


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