hotspot/src/share/vm/opto/ifnode.cpp
changeset 9446 748a37b25d10
parent 9101 ff58f9a8e31c
child 9449 b2c921e1f46d
equal deleted inserted replaced
9445:af37395bda58 9446:748a37b25d10
   234       predicate_proj = proj;
   234       predicate_proj = proj;
   235     }
   235     }
   236   }
   236   }
   237   Node* predicate_c = NULL;
   237   Node* predicate_c = NULL;
   238   Node* predicate_x = NULL;
   238   Node* predicate_x = NULL;
       
   239   bool counted_loop = r->is_CountedLoop();
   239 
   240 
   240   Node *region_c = new (igvn->C, req_c + 1) RegionNode(req_c + 1);
   241   Node *region_c = new (igvn->C, req_c + 1) RegionNode(req_c + 1);
   241   Node *phi_c    = con1;
   242   Node *phi_c    = con1;
   242   uint  len      = r->req();
   243   uint  len      = r->req();
   243   Node *region_x = new (igvn->C, len - req_c) RegionNode(len - req_c);
   244   Node *region_x = new (igvn->C, len - req_c) RegionNode(len - req_c);
   292   Node *iff_c_t = phase->transform(new (igvn->C, 1) IfTrueNode (iff_c));
   293   Node *iff_c_t = phase->transform(new (igvn->C, 1) IfTrueNode (iff_c));
   293   Node *iff_c_f = phase->transform(new (igvn->C, 1) IfFalseNode(iff_c));
   294   Node *iff_c_f = phase->transform(new (igvn->C, 1) IfFalseNode(iff_c));
   294   if (predicate_c != NULL) {
   295   if (predicate_c != NULL) {
   295     assert(predicate_x == NULL, "only one predicate entry expected");
   296     assert(predicate_x == NULL, "only one predicate entry expected");
   296     // Clone loop predicates to each path
   297     // Clone loop predicates to each path
   297     iff_c_t = igvn->clone_loop_predicates(predicate_c, iff_c_t);
   298     iff_c_t = igvn->clone_loop_predicates(predicate_c, iff_c_t, !counted_loop);
   298     iff_c_f = igvn->clone_loop_predicates(predicate_c, iff_c_f);
   299     iff_c_f = igvn->clone_loop_predicates(predicate_c, iff_c_f, !counted_loop);
   299   }
   300   }
   300   Node *iff_x_t = phase->transform(new (igvn->C, 1) IfTrueNode (iff_x));
   301   Node *iff_x_t = phase->transform(new (igvn->C, 1) IfTrueNode (iff_x));
   301   Node *iff_x_f = phase->transform(new (igvn->C, 1) IfFalseNode(iff_x));
   302   Node *iff_x_f = phase->transform(new (igvn->C, 1) IfFalseNode(iff_x));
   302   if (predicate_x != NULL) {
   303   if (predicate_x != NULL) {
   303     assert(predicate_c == NULL, "only one predicate entry expected");
   304     assert(predicate_c == NULL, "only one predicate entry expected");
   304     // Clone loop predicates to each path
   305     // Clone loop predicates to each path
   305     iff_x_t = igvn->clone_loop_predicates(predicate_x, iff_x_t);
   306     iff_x_t = igvn->clone_loop_predicates(predicate_x, iff_x_t, !counted_loop);
   306     iff_x_f = igvn->clone_loop_predicates(predicate_x, iff_x_f);
   307     iff_x_f = igvn->clone_loop_predicates(predicate_x, iff_x_f, !counted_loop);
   307   }
   308   }
   308 
   309 
   309   // Merge the TRUE paths
   310   // Merge the TRUE paths
   310   Node *region_s = new (igvn->C, 3) RegionNode(3);
   311   Node *region_s = new (igvn->C, 3) RegionNode(3);
   311   igvn->_worklist.push(region_s);
   312   igvn->_worklist.push(region_s);