1.1 --- a/src/share/vm/opto/parse1.cpp Tue Sep 25 15:48:17 2012 -0700 1.2 +++ b/src/share/vm/opto/parse1.cpp Thu Sep 27 09:38:42 2012 -0700 1.3 @@ -107,10 +107,10 @@ 1.4 // doubles on Sparc. Intel can handle them just fine directly. 1.5 Node *l; 1.6 switch( bt ) { // Signature is flattened 1.7 - case T_INT: l = new (C, 3) LoadINode( ctl, mem, adr, TypeRawPtr::BOTTOM ); break; 1.8 - case T_FLOAT: l = new (C, 3) LoadFNode( ctl, mem, adr, TypeRawPtr::BOTTOM ); break; 1.9 - case T_ADDRESS: l = new (C, 3) LoadPNode( ctl, mem, adr, TypeRawPtr::BOTTOM, TypeRawPtr::BOTTOM ); break; 1.10 - case T_OBJECT: l = new (C, 3) LoadPNode( ctl, mem, adr, TypeRawPtr::BOTTOM, TypeInstPtr::BOTTOM ); break; 1.11 + case T_INT: l = new (C) LoadINode( ctl, mem, adr, TypeRawPtr::BOTTOM ); break; 1.12 + case T_FLOAT: l = new (C) LoadFNode( ctl, mem, adr, TypeRawPtr::BOTTOM ); break; 1.13 + case T_ADDRESS: l = new (C) LoadPNode( ctl, mem, adr, TypeRawPtr::BOTTOM, TypeRawPtr::BOTTOM ); break; 1.14 + case T_OBJECT: l = new (C) LoadPNode( ctl, mem, adr, TypeRawPtr::BOTTOM, TypeInstPtr::BOTTOM ); break; 1.15 case T_LONG: 1.16 case T_DOUBLE: { 1.17 // Since arguments are in reverse order, the argument address 'adr' 1.18 @@ -118,12 +118,12 @@ 1.19 adr = basic_plus_adr( local_addrs_base, local_addrs, -(index+1)*wordSize ); 1.20 if( Matcher::misaligned_doubles_ok ) { 1.21 l = (bt == T_DOUBLE) 1.22 - ? (Node*)new (C, 3) LoadDNode( ctl, mem, adr, TypeRawPtr::BOTTOM ) 1.23 - : (Node*)new (C, 3) LoadLNode( ctl, mem, adr, TypeRawPtr::BOTTOM ); 1.24 + ? (Node*)new (C) LoadDNode( ctl, mem, adr, TypeRawPtr::BOTTOM ) 1.25 + : (Node*)new (C) LoadLNode( ctl, mem, adr, TypeRawPtr::BOTTOM ); 1.26 } else { 1.27 l = (bt == T_DOUBLE) 1.28 - ? (Node*)new (C, 3) LoadD_unalignedNode( ctl, mem, adr, TypeRawPtr::BOTTOM ) 1.29 - : (Node*)new (C, 3) LoadL_unalignedNode( ctl, mem, adr, TypeRawPtr::BOTTOM ); 1.30 + ? (Node*)new (C) LoadD_unalignedNode( ctl, mem, adr, TypeRawPtr::BOTTOM ) 1.31 + : (Node*)new (C) LoadL_unalignedNode( ctl, mem, adr, TypeRawPtr::BOTTOM ); 1.32 } 1.33 break; 1.34 } 1.35 @@ -147,11 +147,11 @@ 1.36 if (type == TypePtr::NULL_PTR || 1.37 (tp != NULL && !tp->klass()->is_loaded())) { 1.38 // Value must be null, not a real oop. 1.39 - Node* chk = _gvn.transform( new (C, 3) CmpPNode(l, null()) ); 1.40 - Node* tst = _gvn.transform( new (C, 2) BoolNode(chk, BoolTest::eq) ); 1.41 + Node* chk = _gvn.transform( new (C) CmpPNode(l, null()) ); 1.42 + Node* tst = _gvn.transform( new (C) BoolNode(chk, BoolTest::eq) ); 1.43 IfNode* iff = create_and_map_if(control(), tst, PROB_MAX, COUNT_UNKNOWN); 1.44 - set_control(_gvn.transform( new (C, 1) IfTrueNode(iff) )); 1.45 - Node* bad_type = _gvn.transform( new (C, 1) IfFalseNode(iff) ); 1.46 + set_control(_gvn.transform( new (C) IfTrueNode(iff) )); 1.47 + Node* bad_type = _gvn.transform( new (C) IfFalseNode(iff) ); 1.48 bad_type_exit->control()->add_req(bad_type); 1.49 l = null(); 1.50 } 1.51 @@ -218,7 +218,7 @@ 1.52 Node *monitors_addr = basic_plus_adr(osr_buf, osr_buf, (max_locals+mcnt*2-1)*wordSize); 1.53 for (index = 0; index < mcnt; index++) { 1.54 // Make a BoxLockNode for the monitor. 1.55 - Node *box = _gvn.transform(new (C, 1) BoxLockNode(next_monitor())); 1.56 + Node *box = _gvn.transform(new (C) BoxLockNode(next_monitor())); 1.57 1.58 1.59 // Displaced headers and locked objects are interleaved in the 1.60 @@ -233,7 +233,7 @@ 1.61 1.62 // Build a bogus FastLockNode (no code will be generated) and push the 1.63 // monitor into our debug info. 1.64 - const FastLockNode *flock = _gvn.transform(new (C, 3) FastLockNode( 0, lock_object, box ))->as_FastLock(); 1.65 + const FastLockNode *flock = _gvn.transform(new (C) FastLockNode( 0, lock_object, box ))->as_FastLock(); 1.66 map()->push_monitor(flock); 1.67 1.68 // If the lock is our method synchronization lock, tuck it away in 1.69 @@ -323,7 +323,7 @@ 1.70 // Now that the interpreter state is loaded, make sure it will match 1.71 // at execution time what the compiler is expecting now: 1.72 SafePointNode* bad_type_exit = clone_map(); 1.73 - bad_type_exit->set_control(new (C, 1) RegionNode(1)); 1.74 + bad_type_exit->set_control(new (C) RegionNode(1)); 1.75 1.76 assert(osr_block->flow()->jsrs()->size() == 0, "should be no jsrs live at osr point"); 1.77 for (index = 0; index < max_locals; index++) { 1.78 @@ -647,7 +647,7 @@ 1.79 add_predicate(); 1.80 // Add new region for back branches. 1.81 int edges = block->pred_count() - block->preds_parsed() + 1; // +1 for original region 1.82 - RegionNode *r = new (C, edges+1) RegionNode(edges+1); 1.83 + RegionNode *r = new (C) RegionNode(edges+1); 1.84 _gvn.set_type(r, Type::CONTROL); 1.85 record_for_igvn(r); 1.86 r->init_req(edges, control()); 1.87 @@ -714,14 +714,14 @@ 1.88 _exits.clean_stack(_exits.sp()); 1.89 _exits.sync_jvms(); 1.90 1.91 - RegionNode* region = new (C, 1) RegionNode(1); 1.92 + RegionNode* region = new (C) RegionNode(1); 1.93 record_for_igvn(region); 1.94 gvn().set_type_bottom(region); 1.95 _exits.set_control(region); 1.96 1.97 // Note: iophi and memphi are not transformed until do_exits. 1.98 - Node* iophi = new (C, region->req()) PhiNode(region, Type::ABIO); 1.99 - Node* memphi = new (C, region->req()) PhiNode(region, Type::MEMORY, TypePtr::BOTTOM); 1.100 + Node* iophi = new (C) PhiNode(region, Type::ABIO); 1.101 + Node* memphi = new (C) PhiNode(region, Type::MEMORY, TypePtr::BOTTOM); 1.102 _exits.set_i_o(iophi); 1.103 _exits.set_all_memory(memphi); 1.104 1.105 @@ -736,7 +736,7 @@ 1.106 ret_type = TypeOopPtr::BOTTOM; 1.107 } 1.108 int ret_size = type2size[ret_type->basic_type()]; 1.109 - Node* ret_phi = new (C, region->req()) PhiNode(region, ret_type); 1.110 + Node* ret_phi = new (C) PhiNode(region, ret_type); 1.111 _exits.ensure_stack(ret_size); 1.112 assert((int)(tf()->range()->cnt() - TypeFunc::Parms) == ret_size, "good tf range"); 1.113 assert(method()->return_type()->size() == ret_size, "tf agrees w/ method"); 1.114 @@ -753,7 +753,7 @@ 1.115 int arg_size = tf->domain()->cnt(); 1.116 int max_size = MAX2(arg_size, (int)tf->range()->cnt()); 1.117 JVMState* jvms = new (this) JVMState(max_size - TypeFunc::Parms); 1.118 - SafePointNode* map = new (this, max_size) SafePointNode(max_size, NULL); 1.119 + SafePointNode* map = new (this) SafePointNode(max_size, NULL); 1.120 record_for_igvn(map); 1.121 assert(arg_size == TypeFunc::Parms + (is_osr_compilation() ? 1 : method()->arg_size()), "correct arg_size"); 1.122 Node_Notes* old_nn = default_node_notes(); 1.123 @@ -767,7 +767,7 @@ 1.124 } 1.125 uint i; 1.126 for (i = 0; i < (uint)arg_size; i++) { 1.127 - Node* parm = initial_gvn()->transform(new (this, 1) ParmNode(start, i)); 1.128 + Node* parm = initial_gvn()->transform(new (this) ParmNode(start, i)); 1.129 map->init_req(i, parm); 1.130 // Record all these guys for later GVN. 1.131 record_for_igvn(parm); 1.132 @@ -798,7 +798,7 @@ 1.133 //--------------------------return_values-------------------------------------- 1.134 void Compile::return_values(JVMState* jvms) { 1.135 GraphKit kit(jvms); 1.136 - Node* ret = new (this, TypeFunc::Parms) ReturnNode(TypeFunc::Parms, 1.137 + Node* ret = new (this) ReturnNode(TypeFunc::Parms, 1.138 kit.control(), 1.139 kit.i_o(), 1.140 kit.reset_memory(), 1.141 @@ -826,7 +826,7 @@ 1.142 // Load my combined exception state into the kit, with all phis transformed: 1.143 SafePointNode* ex_map = kit.combine_and_pop_all_exception_states(); 1.144 Node* ex_oop = kit.use_exception_state(ex_map); 1.145 - RethrowNode* exit = new (this, TypeFunc::Parms + 1) RethrowNode(kit.control(), 1.146 + RethrowNode* exit = new (this) RethrowNode(kit.control(), 1.147 kit.i_o(), kit.reset_memory(), 1.148 kit.frameptr(), kit.returnadr(), 1.149 // like a return but with exception input 1.150 @@ -1020,7 +1020,7 @@ 1.151 1.152 // Create an initial safepoint to hold JVM state during parsing 1.153 JVMState* jvms = new (C) JVMState(method(), _caller->has_method() ? _caller : NULL); 1.154 - set_map(new (C, len) SafePointNode(len, jvms)); 1.155 + set_map(new (C) SafePointNode(len, jvms)); 1.156 jvms->set_map(map()); 1.157 record_for_igvn(map()); 1.158 assert(jvms->endoff() == len, "correct jvms sizing"); 1.159 @@ -1528,7 +1528,7 @@ 1.160 // later lazily. 1.161 int edges = target->pred_count(); 1.162 if (edges < pnum) edges = pnum; // might be a new path! 1.163 - RegionNode *r = new (C, edges+1) RegionNode(edges+1); 1.164 + RegionNode *r = new (C) RegionNode(edges+1); 1.165 gvn().set_type(r, Type::CONTROL); 1.166 record_for_igvn(r); 1.167 // zap all inputs to NULL for debugging (done in Node(uint) constructor) 1.168 @@ -1923,19 +1923,19 @@ 1.169 Node* access_flags_addr = basic_plus_adr(klass, klass, in_bytes(Klass::access_flags_offset())); 1.170 Node* access_flags = make_load(NULL, access_flags_addr, TypeInt::INT, T_INT); 1.171 1.172 - Node* mask = _gvn.transform(new (C, 3) AndINode(access_flags, intcon(JVM_ACC_HAS_FINALIZER))); 1.173 - Node* check = _gvn.transform(new (C, 3) CmpINode(mask, intcon(0))); 1.174 - Node* test = _gvn.transform(new (C, 2) BoolNode(check, BoolTest::ne)); 1.175 + Node* mask = _gvn.transform(new (C) AndINode(access_flags, intcon(JVM_ACC_HAS_FINALIZER))); 1.176 + Node* check = _gvn.transform(new (C) CmpINode(mask, intcon(0))); 1.177 + Node* test = _gvn.transform(new (C) BoolNode(check, BoolTest::ne)); 1.178 1.179 IfNode* iff = create_and_map_if(control(), test, PROB_MAX, COUNT_UNKNOWN); 1.180 1.181 - RegionNode* result_rgn = new (C, 3) RegionNode(3); 1.182 + RegionNode* result_rgn = new (C) RegionNode(3); 1.183 record_for_igvn(result_rgn); 1.184 1.185 - Node *skip_register = _gvn.transform(new (C, 1) IfFalseNode(iff)); 1.186 + Node *skip_register = _gvn.transform(new (C) IfFalseNode(iff)); 1.187 result_rgn->init_req(1, skip_register); 1.188 1.189 - Node *needs_register = _gvn.transform(new (C, 1) IfTrueNode(iff)); 1.190 + Node *needs_register = _gvn.transform(new (C) IfTrueNode(iff)); 1.191 set_control(needs_register); 1.192 if (stopped()) { 1.193 // There is no slow path. 1.194 @@ -2013,7 +2013,7 @@ 1.195 // sharpen the type eagerly; this eases certain assert checking 1.196 if (tp->higher_equal(TypeInstPtr::NOTNULL)) 1.197 tr = tr->join(TypeInstPtr::NOTNULL)->is_instptr(); 1.198 - value = _gvn.transform(new (C, 2) CheckCastPPNode(0,value,tr)); 1.199 + value = _gvn.transform(new (C) CheckCastPPNode(0,value,tr)); 1.200 } 1.201 } 1.202 phi->add_req(value); 1.203 @@ -2048,7 +2048,7 @@ 1.204 kill_dead_locals(); 1.205 1.206 // Clone the JVM State 1.207 - SafePointNode *sfpnt = new (C, parms) SafePointNode(parms, NULL); 1.208 + SafePointNode *sfpnt = new (C) SafePointNode(parms, NULL); 1.209 1.210 // Capture memory state BEFORE a SafePoint. Since we can block at a 1.211 // SafePoint we need our GC state to be safe; i.e. we need all our current