Skip to content

Commit f78f780

Browse files
committed
8252889: Obsolete -XX:+InsertMemBarAfterArraycopy
Reviewed-by: shade, adityam
1 parent f933961 commit f78f780

File tree

3 files changed

+2
-16
lines changed

3 files changed

+2
-16
lines changed

src/hotspot/share/opto/c2_globals.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,6 @@
384384
product(bool, UseOnlyInlinedBimorphic, true, \
385385
"Don't use BimorphicInlining if can't inline a second method") \
386386
\
387-
product(bool, InsertMemBarAfterArraycopy, true, \
388-
"Insert memory barrier after arraycopy call") \
389-
\
390387
develop(bool, SubsumeLoads, true, \
391388
"Attempt to compile while subsuming loads into machine " \
392389
"instructions.") \

src/hotspot/share/opto/macroArrayCopy.cpp

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ Node* PhaseMacroExpand::generate_arraycopy(ArrayCopyNode *ac, AllocateArrayNode*
711711
// a subsequent store that would make this object accessible by
712712
// other threads.
713713
insert_mem_bar(ctrl, &out_mem, Op_MemBarStoreStore);
714-
} else if (InsertMemBarAfterArraycopy) {
714+
} else {
715715
insert_mem_bar(ctrl, &out_mem, Op_MemBarCPUOrder);
716716
}
717717

@@ -1101,9 +1101,6 @@ void PhaseMacroExpand::expand_arraycopy_node(ArrayCopyNode *ac) {
11011101
merge_mem = MergeMemNode::make(mem);
11021102
transform_later(merge_mem);
11031103

1104-
RegionNode* slow_region = new RegionNode(1);
1105-
transform_later(slow_region);
1106-
11071104
AllocateArrayNode* alloc = NULL;
11081105
if (ac->is_alloc_tightly_coupled()) {
11091106
alloc = AllocateArrayNode::Ideal_array_allocation(dest, &_igvn);
@@ -1176,15 +1173,6 @@ void PhaseMacroExpand::expand_arraycopy_node(ArrayCopyNode *ac) {
11761173
// If a negative length guard was generated for the ArrayCopyNode,
11771174
// the length of the array can never be negative.
11781175
false, ac->has_negative_length_guard());
1179-
1180-
// Do not let reads from the destination float above the arraycopy.
1181-
// Since we cannot type the arrays, we don't know which slices
1182-
// might be affected. We could restrict this barrier only to those
1183-
// memory slices which pertain to array elements--but don't bother.
1184-
if (!InsertMemBarAfterArraycopy) {
1185-
// (If InsertMemBarAfterArraycopy, there is already one in place.)
1186-
insert_mem_bar(&ctrl, &mem, Op_MemBarCPUOrder);
1187-
}
11881176
return;
11891177
}
11901178

src/hotspot/share/runtime/arguments.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,7 @@ static SpecialFlag const special_jvm_flags[] = {
553553
{ "UseNewFieldLayout", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
554554
{ "UseSemaphoreGCThreadsSynchronization", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
555555
{ "ForceNUMA", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
556+
{ "InsertMemBarAfterArraycopy", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
556557

557558
#ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS
558559
// These entries will generate build errors. Their purpose is to test the macros.

0 commit comments

Comments
 (0)