hotspot/src/share/vm/opto/loopopts.cpp
changeset 13895 f6dfe4123709
parent 12958 009b6c9586d8
child 13969 d2a189b83b87
child 13963 e5b53c306fb5
--- a/hotspot/src/share/vm/opto/loopopts.cpp	Tue Sep 25 15:48:17 2012 -0700
+++ b/hotspot/src/share/vm/opto/loopopts.cpp	Thu Sep 27 09:38:42 2012 -0700
@@ -53,7 +53,7 @@
     int iid    = t_oop->instance_id();
     int index  = C->get_alias_index(t_oop);
     int offset = t_oop->offset();
-    phi = new (C,region->req()) PhiNode(region, type, NULL, iid, index, offset);
+    phi = new (C) PhiNode(region, type, NULL, iid, index, offset);
   } else {
     phi = PhiNode::make_blank(region, n);
   }
@@ -356,9 +356,9 @@
         _igvn.type( add->in(1) ) != TypeInt::ZERO ) {
       Node *zero = _igvn.intcon(0);
       set_ctrl(zero, C->root());
-      Node *neg = new (C, 3) SubINode( _igvn.intcon(0), add->in(2) );
+      Node *neg = new (C) SubINode( _igvn.intcon(0), add->in(2) );
       register_new_node( neg, get_ctrl(add->in(2) ) );
-      add = new (C, 3) AddINode( add->in(1), neg );
+      add = new (C) AddINode( add->in(1), neg );
       register_new_node( add, add_ctrl );
     }
     if( add->Opcode() != Op_AddI ) return NULL;
@@ -384,14 +384,14 @@
       return NULL;              // No invariant part of the add?
 
     // Yes!  Reshape address expression!
-    Node *inv_scale = new (C, 3) LShiftINode( add_invar, scale );
+    Node *inv_scale = new (C) LShiftINode( add_invar, scale );
     Node *inv_scale_ctrl =
       dom_depth(add_invar_ctrl) > dom_depth(scale_ctrl) ?
       add_invar_ctrl : scale_ctrl;
     register_new_node( inv_scale, inv_scale_ctrl );
-    Node *var_scale = new (C, 3) LShiftINode( add_var, scale );
+    Node *var_scale = new (C) LShiftINode( add_var, scale );
     register_new_node( var_scale, n_ctrl );
-    Node *var_add = new (C, 3) AddINode( var_scale, inv_scale );
+    Node *var_add = new (C) AddINode( var_scale, inv_scale );
     register_new_node( var_add, n_ctrl );
     _igvn.replace_node( n, var_add );
     return var_add;
@@ -423,10 +423,10 @@
         IdealLoopTree *n23_loop = get_loop( n23_ctrl );
         if( n22loop != n_loop && n22loop->is_member(n_loop) &&
             n23_loop == n_loop ) {
-          Node *add1 = new (C, 4) AddPNode( n->in(1), n->in(2)->in(2), n->in(3) );
+          Node *add1 = new (C) AddPNode( n->in(1), n->in(2)->in(2), n->in(3) );
           // Stuff new AddP in the loop preheader
           register_new_node( add1, n_loop->_head->in(LoopNode::EntryControl) );
-          Node *add2 = new (C, 4) AddPNode( n->in(1), add1, n->in(2)->in(3) );
+          Node *add2 = new (C) AddPNode( n->in(1), add1, n->in(2)->in(3) );
           register_new_node( add2, n_ctrl );
           _igvn.replace_node( n, add2 );
           return add2;
@@ -444,10 +444,10 @@
           Node *tmp = V; V = I; I = tmp;
         }
         if( !is_member(n_loop,get_ctrl(I)) ) {
-          Node *add1 = new (C, 4) AddPNode( n->in(1), n->in(2), I );
+          Node *add1 = new (C) AddPNode( n->in(1), n->in(2), I );
           // Stuff new AddP in the loop preheader
           register_new_node( add1, n_loop->_head->in(LoopNode::EntryControl) );
-          Node *add2 = new (C, 4) AddPNode( n->in(1), add1, V );
+          Node *add2 = new (C) AddPNode( n->in(1), add1, V );
           register_new_node( add2, n_ctrl );
           _igvn.replace_node( n, add2 );
           return add2;
@@ -1094,9 +1094,8 @@
   Node *sample_cmp  = sample_bool->in(1);
 
   // Make Phis to merge the Cmp's inputs.
-  int size = phi->in(0)->req();
-  PhiNode *phi1 = new (C, size) PhiNode( phi->in(0), Type::TOP );
-  PhiNode *phi2 = new (C, size) PhiNode( phi->in(0), Type::TOP );
+  PhiNode *phi1 = new (C) PhiNode( phi->in(0), Type::TOP );
+  PhiNode *phi2 = new (C) PhiNode( phi->in(0), Type::TOP );
   for( i = 1; i < phi->req(); i++ ) {
     Node *n1 = phi->in(i)->in(1)->in(1);
     Node *n2 = phi->in(i)->in(1)->in(2);
@@ -1163,9 +1162,8 @@
   Node *sample_cmp = phi->in(1);
 
   // Make Phis to merge the Cmp's inputs.
-  int size = phi->in(0)->req();
-  PhiNode *phi1 = new (C, size) PhiNode( phi->in(0), Type::TOP );
-  PhiNode *phi2 = new (C, size) PhiNode( phi->in(0), Type::TOP );
+  PhiNode *phi1 = new (C) PhiNode( phi->in(0), Type::TOP );
+  PhiNode *phi2 = new (C) PhiNode( phi->in(0), Type::TOP );
   for( uint j = 1; j < phi->req(); j++ ) {
     Node *cmp_top = phi->in(j); // Inputs are all Cmp or TOP
     Node *n1, *n2;
@@ -1329,7 +1327,7 @@
 
         // We need a Region to merge the exit from the peeled body and the
         // exit from the old loop body.
-        RegionNode *r = new (C, 3) RegionNode(3);
+        RegionNode *r = new (C) RegionNode(3);
         // Map the old use to the new merge point
         old_new.map( use->_idx, r );
         uint dd_r = MIN2(dom_depth(newuse),dom_depth(use));
@@ -1675,13 +1673,13 @@
   ProjNode* proj2 = proj_clone(proj, iff);
   register_node(proj2, loop, iff, ddepth);
 
-  Node* cmp = Signed ? (Node*) new (C,3)CmpINode(left, right) : (Node*) new (C,3)CmpUNode(left, right);
+  Node* cmp = Signed ? (Node*) new (C)CmpINode(left, right) : (Node*) new (C)CmpUNode(left, right);
   register_node(cmp, loop, proj2, ddepth);
 
-  BoolNode* bol = new (C,2)BoolNode(cmp, relop);
+  BoolNode* bol = new (C)BoolNode(cmp, relop);
   register_node(bol, loop, proj2, ddepth);
 
-  IfNode* new_if = new (C,2)IfNode(proj2, bol, iff->_prob, iff->_fcnt);
+  IfNode* new_if = new (C)IfNode(proj2, bol, iff->_prob, iff->_fcnt);
   register_node(new_if, loop, proj2, ddepth);
 
   proj->set_req(0, new_if); // reattach
@@ -1732,11 +1730,11 @@
   ProjNode* proj2 = proj_clone(proj, iff);
   register_node(proj2, loop, iff, ddepth);
 
-  RegionNode* reg = new (C,2)RegionNode(2);
+  RegionNode* reg = new (C)RegionNode(2);
   reg->set_req(1, proj2);
   register_node(reg, loop, iff, ddepth);
 
-  IfNode* dum_if = new (C,2)IfNode(reg, short_circuit_if(NULL, proj), iff->_prob, iff->_fcnt);
+  IfNode* dum_if = new (C)IfNode(reg, short_circuit_if(NULL, proj), iff->_prob, iff->_fcnt);
   register_node(dum_if, loop, reg, ddepth);
 
   proj->set_req(0, dum_if); // reattach
@@ -2547,7 +2545,7 @@
 
   // Create new loop head for new phis and to hang
   // the nodes being moved (sinked) from the peel region.
-  LoopNode* new_head = new (C, 3) LoopNode(last_peel, last_peel);
+  LoopNode* new_head = new (C) LoopNode(last_peel, last_peel);
   new_head->set_unswitch_count(head->unswitch_count()); // Preserve
   _igvn.register_new_node_with_optimizer(new_head);
   assert(first_not_peeled->in(0) == last_peel, "last_peel <- first_not_peeled");
@@ -2746,11 +2744,11 @@
       if (dom_lca(exit, u_ctrl) != exit) continue;
       // Hit!  Refactor use to use the post-incremented tripcounter.
       // Compute a post-increment tripcounter.
-      Node *opaq = new (C, 2) Opaque2Node( C, cle->incr() );
+      Node *opaq = new (C) Opaque2Node( C, cle->incr() );
       register_new_node( opaq, u_ctrl );
       Node *neg_stride = _igvn.intcon(-cle->stride_con());
       set_ctrl(neg_stride, C->root());
-      Node *post = new (C, 3) AddINode( opaq, neg_stride);
+      Node *post = new (C) AddINode( opaq, neg_stride);
       register_new_node( post, u_ctrl );
       _igvn.rehash_node_delayed(use);
       for (uint j = 1; j < use->req(); j++) {