239 }
240 if (igvn->_worklist.member(ctl) ||
241 (bol != NULL && igvn->_worklist.member(bol)) ||
242 (cmp != NULL && igvn->_worklist.member(cmp)) ) {
243 // This control path may be dead.
244 // Delay this memory node transformation until the control is processed.
245 phase->is_IterGVN()->_worklist.push(this);
246 return NodeSentinel; // caller will return NULL
247 }
248 }
249 // Ignore if memory is dead, or self-loop
250 Node *mem = in(MemNode::Memory);
251 if( phase->type( mem ) == Type::TOP ) return NodeSentinel; // caller will return NULL
252 assert( mem != this, "dead loop in MemNode::Ideal" );
253
254 Node *address = in(MemNode::Address);
255 const Type *t_adr = phase->type( address );
256 if( t_adr == Type::TOP ) return NodeSentinel; // caller will return NULL
257
258 if( can_reshape && igvn != NULL &&
259 (igvn->_worklist.member(address) || phase->type(address) != adr_type()) ) {
260 // The address's base and type may change when the address is processed.
261 // Delay this mem node transformation until the address is processed.
262 phase->is_IterGVN()->_worklist.push(this);
263 return NodeSentinel; // caller will return NULL
264 }
265
266 // Do NOT remove or optimize the next lines: ensure a new alias index
267 // is allocated for an oop pointer type before Escape Analysis.
268 // Note: C++ will not remove it since the call has side effect.
269 if ( t_adr->isa_oopptr() ) {
270 int alias_idx = phase->C->get_alias_index(t_adr->is_ptr());
271 }
272
273 #ifdef ASSERT
274 Node* base = NULL;
275 if (address->is_AddP())
276 base = address->in(AddPNode::Base);
277 assert(base == NULL || t_adr->isa_rawptr() ||
278 !phase->type(base)->higher_equal(TypePtr::NULL_PTR), "NULL+offs not RAW address?");
279 #endif
|
239 }
240 if (igvn->_worklist.member(ctl) ||
241 (bol != NULL && igvn->_worklist.member(bol)) ||
242 (cmp != NULL && igvn->_worklist.member(cmp)) ) {
243 // This control path may be dead.
244 // Delay this memory node transformation until the control is processed.
245 phase->is_IterGVN()->_worklist.push(this);
246 return NodeSentinel; // caller will return NULL
247 }
248 }
249 // Ignore if memory is dead, or self-loop
250 Node *mem = in(MemNode::Memory);
251 if( phase->type( mem ) == Type::TOP ) return NodeSentinel; // caller will return NULL
252 assert( mem != this, "dead loop in MemNode::Ideal" );
253
254 Node *address = in(MemNode::Address);
255 const Type *t_adr = phase->type( address );
256 if( t_adr == Type::TOP ) return NodeSentinel; // caller will return NULL
257
258 if( can_reshape && igvn != NULL &&
259 (igvn->_worklist.member(address) ||
260 igvn->_worklist.size() > 0 && (phase->type(address) != adr_type())) ) {
261 // The address's base and type may change when the address is processed.
262 // Delay this mem node transformation until the address is processed.
263 phase->is_IterGVN()->_worklist.push(this);
264 return NodeSentinel; // caller will return NULL
265 }
266
267 // Do NOT remove or optimize the next lines: ensure a new alias index
268 // is allocated for an oop pointer type before Escape Analysis.
269 // Note: C++ will not remove it since the call has side effect.
270 if ( t_adr->isa_oopptr() ) {
271 int alias_idx = phase->C->get_alias_index(t_adr->is_ptr());
272 }
273
274 #ifdef ASSERT
275 Node* base = NULL;
276 if (address->is_AddP())
277 base = address->in(AddPNode::Base);
278 assert(base == NULL || t_adr->isa_rawptr() ||
279 !phase->type(base)->higher_equal(TypePtr::NULL_PTR), "NULL+offs not RAW address?");
280 #endif
|