1.1 --- a/src/share/vm/opto/memnode.cpp Tue Sep 25 15:48:17 2012 -0700 1.2 +++ b/src/share/vm/opto/memnode.cpp Thu Sep 27 09:38:42 2012 -0700 1.3 @@ -883,25 +883,25 @@ 1.4 rt->isa_oopptr() || is_immutable_value(adr), 1.5 "raw memory operations should have control edge"); 1.6 switch (bt) { 1.7 - case T_BOOLEAN: return new (C, 3) LoadUBNode(ctl, mem, adr, adr_type, rt->is_int() ); 1.8 - case T_BYTE: return new (C, 3) LoadBNode (ctl, mem, adr, adr_type, rt->is_int() ); 1.9 - case T_INT: return new (C, 3) LoadINode (ctl, mem, adr, adr_type, rt->is_int() ); 1.10 - case T_CHAR: return new (C, 3) LoadUSNode(ctl, mem, adr, adr_type, rt->is_int() ); 1.11 - case T_SHORT: return new (C, 3) LoadSNode (ctl, mem, adr, adr_type, rt->is_int() ); 1.12 - case T_LONG: return new (C, 3) LoadLNode (ctl, mem, adr, adr_type, rt->is_long() ); 1.13 - case T_FLOAT: return new (C, 3) LoadFNode (ctl, mem, adr, adr_type, rt ); 1.14 - case T_DOUBLE: return new (C, 3) LoadDNode (ctl, mem, adr, adr_type, rt ); 1.15 - case T_ADDRESS: return new (C, 3) LoadPNode (ctl, mem, adr, adr_type, rt->is_ptr() ); 1.16 + case T_BOOLEAN: return new (C) LoadUBNode(ctl, mem, adr, adr_type, rt->is_int() ); 1.17 + case T_BYTE: return new (C) LoadBNode (ctl, mem, adr, adr_type, rt->is_int() ); 1.18 + case T_INT: return new (C) LoadINode (ctl, mem, adr, adr_type, rt->is_int() ); 1.19 + case T_CHAR: return new (C) LoadUSNode(ctl, mem, adr, adr_type, rt->is_int() ); 1.20 + case T_SHORT: return new (C) LoadSNode (ctl, mem, adr, adr_type, rt->is_int() ); 1.21 + case T_LONG: return new (C) LoadLNode (ctl, mem, adr, adr_type, rt->is_long() ); 1.22 + case T_FLOAT: return new (C) LoadFNode (ctl, mem, adr, adr_type, rt ); 1.23 + case T_DOUBLE: return new (C) LoadDNode (ctl, mem, adr, adr_type, rt ); 1.24 + case T_ADDRESS: return new (C) LoadPNode (ctl, mem, adr, adr_type, rt->is_ptr() ); 1.25 case T_OBJECT: 1.26 #ifdef _LP64 1.27 if (adr->bottom_type()->is_ptr_to_narrowoop()) { 1.28 - Node* load = gvn.transform(new (C, 3) LoadNNode(ctl, mem, adr, adr_type, rt->make_narrowoop())); 1.29 - return new (C, 2) DecodeNNode(load, load->bottom_type()->make_ptr()); 1.30 + Node* load = gvn.transform(new (C) LoadNNode(ctl, mem, adr, adr_type, rt->make_narrowoop())); 1.31 + return new (C) DecodeNNode(load, load->bottom_type()->make_ptr()); 1.32 } else 1.33 #endif 1.34 { 1.35 assert(!adr->bottom_type()->is_ptr_to_narrowoop(), "should have got back a narrow oop"); 1.36 - return new (C, 3) LoadPNode(ctl, mem, adr, adr_type, rt->is_oopptr()); 1.37 + return new (C) LoadPNode(ctl, mem, adr, adr_type, rt->is_oopptr()); 1.38 } 1.39 } 1.40 ShouldNotReachHere(); 1.41 @@ -910,7 +910,7 @@ 1.42 1.43 LoadLNode* LoadLNode::make_atomic(Compile *C, Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, const Type* rt) { 1.44 bool require_atomic = true; 1.45 - return new (C, 3) LoadLNode(ctl, mem, adr, adr_type, rt->is_long(), require_atomic); 1.46 + return new (C) LoadLNode(ctl, mem, adr, adr_type, rt->is_long(), require_atomic); 1.47 } 1.48 1.49 1.50 @@ -1244,20 +1244,20 @@ 1.51 // Add up all the offsets making of the address of the load 1.52 Node* result = elements[0]; 1.53 for (int i = 1; i < count; i++) { 1.54 - result = phase->transform(new (phase->C, 3) AddXNode(result, elements[i])); 1.55 + result = phase->transform(new (phase->C) AddXNode(result, elements[i])); 1.56 } 1.57 // Remove the constant offset from the address and then 1.58 // remove the scaling of the offset to recover the original index. 1.59 - result = phase->transform(new (phase->C, 3) AddXNode(result, phase->MakeConX(-offset))); 1.60 + result = phase->transform(new (phase->C) AddXNode(result, phase->MakeConX(-offset))); 1.61 if (result->Opcode() == Op_LShiftX && result->in(2) == phase->intcon(shift)) { 1.62 // Peel the shift off directly but wrap it in a dummy node 1.63 // since Ideal can't return existing nodes 1.64 - result = new (phase->C, 3) RShiftXNode(result->in(1), phase->intcon(0)); 1.65 + result = new (phase->C) RShiftXNode(result->in(1), phase->intcon(0)); 1.66 } else { 1.67 - result = new (phase->C, 3) RShiftXNode(result, phase->intcon(shift)); 1.68 + result = new (phase->C) RShiftXNode(result, phase->intcon(shift)); 1.69 } 1.70 #ifdef _LP64 1.71 - result = new (phase->C, 2) ConvL2INode(phase->transform(result)); 1.72 + result = new (phase->C) ConvL2INode(phase->transform(result)); 1.73 #endif 1.74 return result; 1.75 } 1.76 @@ -1320,7 +1320,7 @@ 1.77 int this_offset = addr_t->offset(); 1.78 int this_iid = addr_t->is_oopptr()->instance_id(); 1.79 PhaseIterGVN *igvn = phase->is_IterGVN(); 1.80 - Node *phi = new (igvn->C, region->req()) PhiNode(region, this_type, NULL, this_iid, this_index, this_offset); 1.81 + Node *phi = new (igvn->C) PhiNode(region, this_type, NULL, this_iid, this_index, this_offset); 1.82 for (uint i = 1; i < region->req(); i++) { 1.83 Node *x; 1.84 Node* the_clone = NULL; 1.85 @@ -1771,8 +1771,8 @@ 1.86 Node* mem = in(MemNode::Memory); 1.87 Node* value = can_see_stored_value(mem,phase); 1.88 if( value && !phase->type(value)->higher_equal( _type ) ) { 1.89 - Node *result = phase->transform( new (phase->C, 3) LShiftINode(value, phase->intcon(24)) ); 1.90 - return new (phase->C, 3) RShiftINode(result, phase->intcon(24)); 1.91 + Node *result = phase->transform( new (phase->C) LShiftINode(value, phase->intcon(24)) ); 1.92 + return new (phase->C) RShiftINode(result, phase->intcon(24)); 1.93 } 1.94 // Identity call will handle the case where truncation is not needed. 1.95 return LoadNode::Ideal(phase, can_reshape); 1.96 @@ -1803,7 +1803,7 @@ 1.97 Node* mem = in(MemNode::Memory); 1.98 Node* value = can_see_stored_value(mem, phase); 1.99 if (value && !phase->type(value)->higher_equal(_type)) 1.100 - return new (phase->C, 3) AndINode(value, phase->intcon(0xFF)); 1.101 + return new (phase->C) AndINode(value, phase->intcon(0xFF)); 1.102 // Identity call will handle the case where truncation is not needed. 1.103 return LoadNode::Ideal(phase, can_reshape); 1.104 } 1.105 @@ -1833,7 +1833,7 @@ 1.106 Node* mem = in(MemNode::Memory); 1.107 Node* value = can_see_stored_value(mem,phase); 1.108 if( value && !phase->type(value)->higher_equal( _type ) ) 1.109 - return new (phase->C, 3) AndINode(value,phase->intcon(0xFFFF)); 1.110 + return new (phase->C) AndINode(value,phase->intcon(0xFFFF)); 1.111 // Identity call will handle the case where truncation is not needed. 1.112 return LoadNode::Ideal(phase, can_reshape); 1.113 } 1.114 @@ -1863,8 +1863,8 @@ 1.115 Node* mem = in(MemNode::Memory); 1.116 Node* value = can_see_stored_value(mem,phase); 1.117 if( value && !phase->type(value)->higher_equal( _type ) ) { 1.118 - Node *result = phase->transform( new (phase->C, 3) LShiftINode(value, phase->intcon(16)) ); 1.119 - return new (phase->C, 3) RShiftINode(result, phase->intcon(16)); 1.120 + Node *result = phase->transform( new (phase->C) LShiftINode(value, phase->intcon(16)) ); 1.121 + return new (phase->C) RShiftINode(result, phase->intcon(16)); 1.122 } 1.123 // Identity call will handle the case where truncation is not needed. 1.124 return LoadNode::Ideal(phase, can_reshape); 1.125 @@ -1896,12 +1896,12 @@ 1.126 #ifdef _LP64 1.127 if (adr_type->is_ptr_to_narrowoop()) { 1.128 assert(UseCompressedKlassPointers, "no compressed klasses"); 1.129 - Node* load_klass = gvn.transform(new (C, 3) LoadNKlassNode(ctl, mem, adr, at, tk->make_narrowoop())); 1.130 - return new (C, 2) DecodeNNode(load_klass, load_klass->bottom_type()->make_ptr()); 1.131 + Node* load_klass = gvn.transform(new (C) LoadNKlassNode(ctl, mem, adr, at, tk->make_narrowoop())); 1.132 + return new (C) DecodeNNode(load_klass, load_klass->bottom_type()->make_ptr()); 1.133 } 1.134 #endif 1.135 assert(!adr_type->is_ptr_to_narrowoop(), "should have got back a narrow oop"); 1.136 - return new (C, 3) LoadKlassNode(ctl, mem, adr, at, tk); 1.137 + return new (C) LoadKlassNode(ctl, mem, adr, at, tk); 1.138 } 1.139 1.140 //------------------------------Value------------------------------------------ 1.141 @@ -2123,7 +2123,7 @@ 1.142 if( t == Type::TOP ) return x; 1.143 if( t->isa_narrowoop()) return x; 1.144 1.145 - return phase->transform(new (phase->C, 2) EncodePNode(x, t->make_narrowoop())); 1.146 + return phase->transform(new (phase->C) EncodePNode(x, t->make_narrowoop())); 1.147 } 1.148 1.149 //------------------------------Value----------------------------------------- 1.150 @@ -2217,13 +2217,13 @@ 1.151 1.152 switch (bt) { 1.153 case T_BOOLEAN: 1.154 - case T_BYTE: return new (C, 4) StoreBNode(ctl, mem, adr, adr_type, val); 1.155 - case T_INT: return new (C, 4) StoreINode(ctl, mem, adr, adr_type, val); 1.156 + case T_BYTE: return new (C) StoreBNode(ctl, mem, adr, adr_type, val); 1.157 + case T_INT: return new (C) StoreINode(ctl, mem, adr, adr_type, val); 1.158 case T_CHAR: 1.159 - case T_SHORT: return new (C, 4) StoreCNode(ctl, mem, adr, adr_type, val); 1.160 - case T_LONG: return new (C, 4) StoreLNode(ctl, mem, adr, adr_type, val); 1.161 - case T_FLOAT: return new (C, 4) StoreFNode(ctl, mem, adr, adr_type, val); 1.162 - case T_DOUBLE: return new (C, 4) StoreDNode(ctl, mem, adr, adr_type, val); 1.163 + case T_SHORT: return new (C) StoreCNode(ctl, mem, adr, adr_type, val); 1.164 + case T_LONG: return new (C) StoreLNode(ctl, mem, adr, adr_type, val); 1.165 + case T_FLOAT: return new (C) StoreFNode(ctl, mem, adr, adr_type, val); 1.166 + case T_DOUBLE: return new (C) StoreDNode(ctl, mem, adr, adr_type, val); 1.167 case T_METADATA: 1.168 case T_ADDRESS: 1.169 case T_OBJECT: 1.170 @@ -2231,12 +2231,12 @@ 1.171 if (adr->bottom_type()->is_ptr_to_narrowoop() || 1.172 (UseCompressedKlassPointers && val->bottom_type()->isa_klassptr() && 1.173 adr->bottom_type()->isa_rawptr())) { 1.174 - val = gvn.transform(new (C, 2) EncodePNode(val, val->bottom_type()->make_narrowoop())); 1.175 - return new (C, 4) StoreNNode(ctl, mem, adr, adr_type, val); 1.176 + val = gvn.transform(new (C) EncodePNode(val, val->bottom_type()->make_narrowoop())); 1.177 + return new (C) StoreNNode(ctl, mem, adr, adr_type, val); 1.178 } else 1.179 #endif 1.180 { 1.181 - return new (C, 4) StorePNode(ctl, mem, adr, adr_type, val); 1.182 + return new (C) StorePNode(ctl, mem, adr, adr_type, val); 1.183 } 1.184 } 1.185 ShouldNotReachHere(); 1.186 @@ -2245,7 +2245,7 @@ 1.187 1.188 StoreLNode* StoreLNode::make_atomic(Compile *C, Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, Node* val) { 1.189 bool require_atomic = true; 1.190 - return new (C, 4) StoreLNode(ctl, mem, adr, adr_type, val, require_atomic); 1.191 + return new (C) StoreLNode(ctl, mem, adr, adr_type, val, require_atomic); 1.192 } 1.193 1.194 1.195 @@ -2638,12 +2638,12 @@ 1.196 1.197 Node *zero = phase->makecon(TypeLong::ZERO); 1.198 Node *off = phase->MakeConX(BytesPerLong); 1.199 - mem = new (phase->C, 4) StoreLNode(in(0),mem,adr,atp,zero); 1.200 + mem = new (phase->C) StoreLNode(in(0),mem,adr,atp,zero); 1.201 count--; 1.202 while( count-- ) { 1.203 mem = phase->transform(mem); 1.204 - adr = phase->transform(new (phase->C, 4) AddPNode(base,adr,off)); 1.205 - mem = new (phase->C, 4) StoreLNode(in(0),mem,adr,atp,zero); 1.206 + adr = phase->transform(new (phase->C) AddPNode(base,adr,off)); 1.207 + mem = new (phase->C) StoreLNode(in(0),mem,adr,atp,zero); 1.208 } 1.209 return mem; 1.210 } 1.211 @@ -2684,7 +2684,7 @@ 1.212 1.213 int unit = BytesPerLong; 1.214 if ((offset % unit) != 0) { 1.215 - Node* adr = new (C, 4) AddPNode(dest, dest, phase->MakeConX(offset)); 1.216 + Node* adr = new (C) AddPNode(dest, dest, phase->MakeConX(offset)); 1.217 adr = phase->transform(adr); 1.218 const TypePtr* atp = TypeRawPtr::BOTTOM; 1.219 mem = StoreNode::make(*phase, ctl, mem, adr, atp, phase->zerocon(T_INT), T_INT); 1.220 @@ -2714,16 +2714,16 @@ 1.221 // Scale to the unit required by the CPU: 1.222 if (!Matcher::init_array_count_is_in_bytes) { 1.223 Node* shift = phase->intcon(exact_log2(unit)); 1.224 - zbase = phase->transform( new(C,3) URShiftXNode(zbase, shift) ); 1.225 - zend = phase->transform( new(C,3) URShiftXNode(zend, shift) ); 1.226 + zbase = phase->transform( new(C) URShiftXNode(zbase, shift) ); 1.227 + zend = phase->transform( new(C) URShiftXNode(zend, shift) ); 1.228 } 1.229 1.230 - Node* zsize = phase->transform( new(C,3) SubXNode(zend, zbase) ); 1.231 + Node* zsize = phase->transform( new(C) SubXNode(zend, zbase) ); 1.232 Node* zinit = phase->zerocon((unit == BytesPerLong) ? T_LONG : T_INT); 1.233 1.234 // Bulk clear double-words 1.235 - Node* adr = phase->transform( new(C,4) AddPNode(dest, dest, start_offset) ); 1.236 - mem = new (C, 4) ClearArrayNode(ctl, mem, zsize, adr); 1.237 + Node* adr = phase->transform( new(C) AddPNode(dest, dest, start_offset) ); 1.238 + mem = new (C) ClearArrayNode(ctl, mem, zsize, adr); 1.239 return phase->transform(mem); 1.240 } 1.241 1.242 @@ -2747,7 +2747,7 @@ 1.243 start_offset, phase->MakeConX(done_offset), phase); 1.244 } 1.245 if (done_offset < end_offset) { // emit the final 32-bit store 1.246 - Node* adr = new (C, 4) AddPNode(dest, dest, phase->MakeConX(done_offset)); 1.247 + Node* adr = new (C) AddPNode(dest, dest, phase->MakeConX(done_offset)); 1.248 adr = phase->transform(adr); 1.249 const TypePtr* atp = TypeRawPtr::BOTTOM; 1.250 mem = StoreNode::make(*phase, ctl, mem, adr, atp, phase->zerocon(T_INT), T_INT); 1.251 @@ -2813,16 +2813,15 @@ 1.252 1.253 //------------------------------make------------------------------------------- 1.254 MemBarNode* MemBarNode::make(Compile* C, int opcode, int atp, Node* pn) { 1.255 - int len = Precedent + (pn == NULL? 0: 1); 1.256 switch (opcode) { 1.257 - case Op_MemBarAcquire: return new(C, len) MemBarAcquireNode(C, atp, pn); 1.258 - case Op_MemBarRelease: return new(C, len) MemBarReleaseNode(C, atp, pn); 1.259 - case Op_MemBarAcquireLock: return new(C, len) MemBarAcquireLockNode(C, atp, pn); 1.260 - case Op_MemBarReleaseLock: return new(C, len) MemBarReleaseLockNode(C, atp, pn); 1.261 - case Op_MemBarVolatile: return new(C, len) MemBarVolatileNode(C, atp, pn); 1.262 - case Op_MemBarCPUOrder: return new(C, len) MemBarCPUOrderNode(C, atp, pn); 1.263 - case Op_Initialize: return new(C, len) InitializeNode(C, atp, pn); 1.264 - case Op_MemBarStoreStore: return new(C, len) MemBarStoreStoreNode(C, atp, pn); 1.265 + case Op_MemBarAcquire: return new(C) MemBarAcquireNode(C, atp, pn); 1.266 + case Op_MemBarRelease: return new(C) MemBarReleaseNode(C, atp, pn); 1.267 + case Op_MemBarAcquireLock: return new(C) MemBarAcquireLockNode(C, atp, pn); 1.268 + case Op_MemBarReleaseLock: return new(C) MemBarReleaseLockNode(C, atp, pn); 1.269 + case Op_MemBarVolatile: return new(C) MemBarVolatileNode(C, atp, pn); 1.270 + case Op_MemBarCPUOrder: return new(C) MemBarCPUOrderNode(C, atp, pn); 1.271 + case Op_Initialize: return new(C) InitializeNode(C, atp, pn); 1.272 + case Op_MemBarStoreStore: return new(C) MemBarStoreStoreNode(C, atp, pn); 1.273 default: ShouldNotReachHere(); return NULL; 1.274 } 1.275 } 1.276 @@ -2852,7 +2851,7 @@ 1.277 igvn->replace_node(proj_out(TypeFunc::Control), in(TypeFunc::Control)); 1.278 // Must return either the original node (now dead) or a new node 1.279 // (Do not return a top here, since that would break the uniqueness of top.) 1.280 - return new (phase->C, 1) ConINode(TypeInt::ZERO); 1.281 + return new (phase->C) ConINode(TypeInt::ZERO); 1.282 } 1.283 } 1.284 } 1.285 @@ -2873,7 +2872,7 @@ 1.286 switch (proj->_con) { 1.287 case TypeFunc::Control: 1.288 case TypeFunc::Memory: 1.289 - return new (m->C, 1) MachProjNode(this,proj->_con,RegMask::Empty,MachProjNode::unmatched_proj); 1.290 + return new (m->C) MachProjNode(this,proj->_con,RegMask::Empty,MachProjNode::unmatched_proj); 1.291 } 1.292 ShouldNotReachHere(); 1.293 return NULL; 1.294 @@ -3217,7 +3216,7 @@ 1.295 Node* addr = in(RawAddress); 1.296 if (offset != 0) { 1.297 Compile* C = phase->C; 1.298 - addr = phase->transform( new (C, 4) AddPNode(C->top(), addr, 1.299 + addr = phase->transform( new (C) AddPNode(C->top(), addr, 1.300 phase->MakeConX(offset)) ); 1.301 } 1.302 return addr; 1.303 @@ -3906,7 +3905,7 @@ 1.304 // Make a new, untransformed MergeMem with the same base as 'mem'. 1.305 // If mem is itself a MergeMem, populate the result with the same edges. 1.306 MergeMemNode* MergeMemNode::make(Compile* C, Node* mem) { 1.307 - return new(C, 1+Compile::AliasIdxRaw) MergeMemNode(mem); 1.308 + return new(C) MergeMemNode(mem); 1.309 } 1.310 1.311 //------------------------------cmp--------------------------------------------