mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 20:14:43 +02:00
8139758: [REDO] Elide more final field's write memory barrier with escape analysis result
Membar for all final field initializations eliminated if possible Reviewed-by: roland, vlivanov
This commit is contained in:
parent
a59fb9d9c1
commit
854b8d1ff1
3 changed files with 98 additions and 7 deletions
|
@ -964,11 +964,12 @@ void Parse::do_exits() {
|
|||
}
|
||||
}
|
||||
|
||||
// Any method can write a @Stable field; insert memory barriers after
|
||||
// those also. If there is a predecessor allocation node, bind the
|
||||
// barrier there.
|
||||
// Any method can write a @Stable field; insert memory barriers
|
||||
// after those also. Can't bind predecessor allocation node (if any)
|
||||
// with barrier because allocation doesn't always dominate
|
||||
// MemBarRelease.
|
||||
if (wrote_stable()) {
|
||||
_exits.insert_mem_bar(Op_MemBarRelease, alloc_with_final());
|
||||
_exits.insert_mem_bar(Op_MemBarRelease);
|
||||
if (PrintOpto && (Verbose || WizardMode)) {
|
||||
method()->print_name();
|
||||
tty->print_cr(" writes @Stable and needs a memory barrier");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue