Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/parse3.cpp @ 1100:f96a1a986f7b
6895383: JCK test throws NPE for method compiled with Escape Analysis
Summary: Add missing checks for MemBar nodes in EA.
Reviewed-by: never
author | kvn |
---|---|
date | Wed, 09 Dec 2009 16:40:45 -0800 |
parents | 148e5441d916 |
children | dd57230ba8fe |
comparison
equal
deleted
inserted
replaced
1099:c5d3d979ae27 | 1100:f96a1a986f7b |
---|---|
238 if (is_vol) { | 238 if (is_vol) { |
239 // First place the specific membar for THIS volatile index. This first | 239 // First place the specific membar for THIS volatile index. This first |
240 // membar is dependent on the store, keeping any other membars generated | 240 // membar is dependent on the store, keeping any other membars generated |
241 // below from floating up past the store. | 241 // below from floating up past the store. |
242 int adr_idx = C->get_alias_index(adr_type); | 242 int adr_idx = C->get_alias_index(adr_type); |
243 insert_mem_bar_volatile(Op_MemBarVolatile, adr_idx); | 243 insert_mem_bar_volatile(Op_MemBarVolatile, adr_idx, store); |
244 | 244 |
245 // Now place a membar for AliasIdxBot for the unknown yet-to-be-parsed | 245 // Now place a membar for AliasIdxBot for the unknown yet-to-be-parsed |
246 // volatile alias indices. Skip this if the membar is redundant. | 246 // volatile alias indices. Skip this if the membar is redundant. |
247 if (adr_idx != Compile::AliasIdxBot) { | 247 if (adr_idx != Compile::AliasIdxBot) { |
248 insert_mem_bar_volatile(Op_MemBarVolatile, Compile::AliasIdxBot); | 248 insert_mem_bar_volatile(Op_MemBarVolatile, Compile::AliasIdxBot, store); |
249 } | 249 } |
250 | 250 |
251 // Finally, place alias-index-specific membars for each volatile index | 251 // Finally, place alias-index-specific membars for each volatile index |
252 // that isn't the adr_idx membar. Typically there's only 1 or 2. | 252 // that isn't the adr_idx membar. Typically there's only 1 or 2. |
253 for( int i = Compile::AliasIdxRaw; i < C->num_alias_types(); i++ ) { | 253 for( int i = Compile::AliasIdxRaw; i < C->num_alias_types(); i++ ) { |
254 if (i != adr_idx && C->alias_type(i)->is_volatile()) { | 254 if (i != adr_idx && C->alias_type(i)->is_volatile()) { |
255 insert_mem_bar_volatile(Op_MemBarVolatile, i); | 255 insert_mem_bar_volatile(Op_MemBarVolatile, i, store); |
256 } | 256 } |
257 } | 257 } |
258 } | 258 } |
259 | 259 |
260 // If the field is final, the rules of Java say we are in <init> or <clinit>. | 260 // If the field is final, the rules of Java say we are in <init> or <clinit>. |