Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8346280: C2: implement late barrier elision for G1 #23235

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -737,17 +737,22 @@ static Object testGetAndSet(Outer o, Object newVal) {
return fVarHandle.getAndSet(o, newVal);
}

// IR checks are disabled for s390 because barriers are not elided (to be investigated).
@Test
@IR(applyIfAnd = {"UseCompressedOops", "false", "ReduceInitialCardMarks", "false"},
applyIfPlatform = {"s390", "false"},
counts = {IRNode.G1_COMPARE_AND_EXCHANGE_P_WITH_BARRIER_FLAG, POST_ONLY, "1"},
phase = CompilePhase.FINAL_CODE)
@IR(applyIfAnd = {"UseCompressedOops", "true", "ReduceInitialCardMarks", "false"},
applyIfPlatform = {"s390", "false"},
counts = {IRNode.G1_COMPARE_AND_EXCHANGE_N_WITH_BARRIER_FLAG, POST_ONLY, "1"},
phase = CompilePhase.FINAL_CODE)
@IR(applyIfAnd = {"UseCompressedOops", "false", "ReduceInitialCardMarks", "true"},
applyIfPlatform = {"s390", "false"},
failOn = {IRNode.G1_COMPARE_AND_EXCHANGE_P_WITH_BARRIER_FLAG, ANY},
phase = CompilePhase.FINAL_CODE)
@IR(applyIfAnd = {"UseCompressedOops", "true", "ReduceInitialCardMarks", "true"},
applyIfPlatform = {"s390", "false"},
failOn = {IRNode.G1_COMPARE_AND_EXCHANGE_N_WITH_BARRIER_FLAG, ANY},
phase = CompilePhase.FINAL_CODE)
static Object testCompareAndExchangeOnNewObject(Object oldVal, Object newVal) {
@@ -756,14 +761,18 @@ static Object testCompareAndExchangeOnNewObject(Object oldVal, Object newVal) {
return fVarHandle.compareAndExchange(o, oldVal, newVal);
}

// IR checks are disabled for s390 when OOPs compression is disabled
// because barriers are not elided in this configuration (to be investigated).
@Test
@IR(applyIfAnd = {"UseCompressedOops", "false", "ReduceInitialCardMarks", "false"},
applyIfPlatform = {"s390", "false"},
counts = {IRNode.G1_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, POST_ONLY, "1"},
phase = CompilePhase.FINAL_CODE)
@IR(applyIfAnd = {"UseCompressedOops", "true", "ReduceInitialCardMarks", "false"},
counts = {IRNode.G1_COMPARE_AND_SWAP_N_WITH_BARRIER_FLAG, POST_ONLY, "1"},
phase = CompilePhase.FINAL_CODE)
@IR(applyIfAnd = {"UseCompressedOops", "false", "ReduceInitialCardMarks", "true"},
applyIfPlatform = {"s390", "false"},
failOn = {IRNode.G1_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, ANY},
phase = CompilePhase.FINAL_CODE)
@IR(applyIfAnd = {"UseCompressedOops", "true", "ReduceInitialCardMarks", "true"},