changeset 1058:dcdcc8c16e20

6896352: CTW fails hotspot/src/share/vm/opto/escape.cpp:1155 Summary: Always call C->get_alias_index(phase->type(address)) during parsing. Reviewed-by: never
author kvn
date Wed, 04 Nov 2009 14:43:50 -0800
parents 09572fede9d1
children 2f1ec89b9995
files src/share/vm/opto/escape.cpp src/share/vm/opto/memnode.cpp
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/opto/escape.cpp	Wed Nov 04 14:16:20 2009 -0800
+++ b/src/share/vm/opto/escape.cpp	Wed Nov 04 14:43:50 2009 -0800
@@ -537,8 +537,9 @@
   }
 
   const TypeOopPtr *tinst = base_t->add_offset(t->offset())->is_oopptr();
-  // Do NOT remove the next call: ensure an new alias index is allocated
-  // for the instance type
+  // Do NOT remove the next line: ensure a new alias index is allocated
+  // for the instance type. Note: C++ will not remove it since the call
+  // has side effect.
   int alias_idx = _compile->get_alias_index(tinst);
   igvn->set_type(addp, tinst);
   // record the allocation in the node map
--- a/src/share/vm/opto/memnode.cpp	Wed Nov 04 14:16:20 2009 -0800
+++ b/src/share/vm/opto/memnode.cpp	Wed Nov 04 14:43:50 2009 -0800
@@ -255,6 +255,13 @@
     return NodeSentinel; // caller will return NULL
   }
 
+  // Do NOT remove or optimize the next lines: ensure a new alias index
+  // is allocated for an oop pointer type before Escape Analysis.
+  // Note: C++ will not remove it since the call has side effect.
+  if ( t_adr->isa_oopptr() ) {
+    int alias_idx = phase->C->get_alias_index(t_adr->is_ptr());
+  }
+
 #ifdef ASSERT
   Node* base = NULL;
   if (address->is_AddP())