mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8138894: C1: Support IRIW on weak memory platforms
Reviewed-by: twisti, goetz
This commit is contained in:
parent
26f02e4686
commit
9a5f4d56ff
4 changed files with 22 additions and 6 deletions
|
@ -1438,7 +1438,9 @@ void GraphBuilder::method_return(Value x) {
|
|||
|
||||
bool need_mem_bar = false;
|
||||
if (method()->name() == ciSymbol::object_initializer_name() &&
|
||||
(scope()->wrote_final() || (AlwaysSafeConstructors && scope()->wrote_fields()))) {
|
||||
(scope()->wrote_final() || (AlwaysSafeConstructors && scope()->wrote_fields())
|
||||
|| (support_IRIW_for_not_multiple_copy_atomic_cpu && scope()->wrote_volatile())
|
||||
)){
|
||||
need_mem_bar = true;
|
||||
}
|
||||
|
||||
|
@ -1554,6 +1556,9 @@ void GraphBuilder::access_field(Bytecodes::Code code) {
|
|||
|
||||
if (code == Bytecodes::_putfield) {
|
||||
scope()->set_wrote_fields();
|
||||
if (field->is_volatile()) {
|
||||
scope()->set_wrote_volatile();
|
||||
}
|
||||
}
|
||||
|
||||
const int offset = !needs_patching ? field->offset() : -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue