7117282: assert(base == NULL || t_adr->isa_rawptr() || !phase->type(base)
authorkvn
Fri, 02 Dec 2011 21:37:19 -0800
changeset 11200 ccf66f30d4a8
parent 11199 6050dd0fea1a
child 11201 43efb25e1710
7117282: assert(base == NULL || t_adr->isa_rawptr() || !phase->type(base) Summary: Delay memory node transformation until the memory is processed. Reviewed-by: iveresov, never
hotspot/src/share/vm/opto/memnode.cpp
--- a/hotspot/src/share/vm/opto/memnode.cpp	Wed Nov 30 17:35:51 2011 -0800
+++ b/hotspot/src/share/vm/opto/memnode.cpp	Fri Dec 02 21:37:19 2011 -0800
@@ -265,6 +265,13 @@
   if( phase->type( mem ) == Type::TOP ) return NodeSentinel; // caller will return NULL
   assert( mem != this, "dead loop in MemNode::Ideal" );
 
+  if (can_reshape && igvn != NULL && igvn->_worklist.member(mem)) {
+    // This memory slice may be dead.
+    // Delay this mem node transformation until the memory is processed.
+    phase->is_IterGVN()->_worklist.push(this);
+    return NodeSentinel; // caller will return NULL
+  }
+
   Node *address = in(MemNode::Address);
   const Type *t_adr = phase->type( address );
   if( t_adr == Type::TOP )              return NodeSentinel; // caller will return NULL