mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
6895383: JCK test throws NPE for method compiled with Escape Analysis
Add missing checks for MemBar nodes in EA. Reviewed-by: never
This commit is contained in:
parent
dfbb0bf3e2
commit
9f5ca0249d
10 changed files with 510 additions and 212 deletions
|
@ -240,19 +240,19 @@ void Parse::do_put_xxx(const TypePtr* obj_type, Node* obj, ciField* field, bool
|
|||
// membar is dependent on the store, keeping any other membars generated
|
||||
// below from floating up past the store.
|
||||
int adr_idx = C->get_alias_index(adr_type);
|
||||
insert_mem_bar_volatile(Op_MemBarVolatile, adr_idx);
|
||||
insert_mem_bar_volatile(Op_MemBarVolatile, adr_idx, store);
|
||||
|
||||
// Now place a membar for AliasIdxBot for the unknown yet-to-be-parsed
|
||||
// volatile alias indices. Skip this if the membar is redundant.
|
||||
if (adr_idx != Compile::AliasIdxBot) {
|
||||
insert_mem_bar_volatile(Op_MemBarVolatile, Compile::AliasIdxBot);
|
||||
insert_mem_bar_volatile(Op_MemBarVolatile, Compile::AliasIdxBot, store);
|
||||
}
|
||||
|
||||
// Finally, place alias-index-specific membars for each volatile index
|
||||
// that isn't the adr_idx membar. Typically there's only 1 or 2.
|
||||
for( int i = Compile::AliasIdxRaw; i < C->num_alias_types(); i++ ) {
|
||||
if (i != adr_idx && C->alias_type(i)->is_volatile()) {
|
||||
insert_mem_bar_volatile(Op_MemBarVolatile, i);
|
||||
insert_mem_bar_volatile(Op_MemBarVolatile, i, store);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue