summaryrefslogtreecommitdiff
path: root/compiler/optimizing/intrinsics_arm64.cc
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2023-12-08 14:01:44 +0000
committer Santiago Aboy Solanes <solanes@google.com> 2024-01-19 11:42:17 +0000
commit7c1dd6e2d1893f288214413c4b97273980f3aa4a (patch)
treed2912acfaed1cee70670d3497236a4b0d81baff3 /compiler/optimizing/intrinsics_arm64.cc
parent921cc7db943144fe8a45f00527ad4950570637d0 (diff)
Revert "Disable write-barrier elimination pass"
This reverts commit 5a3271d7caafefd10a20f5a5db09d2c178838b76. Reason for revert: This CL has two fixes (codegen not doing a null check if a write barrier is being relied on, and codegen not recomputing skipping write barriers), regression tests, a new runtime check which runs in debug mode for the CC GC to ensure that the card table is set correctly for skipped write barriers, and new compile time (graph checker) tests to ensure graph consistency. This patchset updates the WriteBarrierKind to be {emit being relied on, emit not being relied on, dont emit}, which leaves the null check skip implementation to codegen. Test 2247- is removed from knownfailures.json but still skipped in MTS due to SLO requirements. Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Bug: 301833859 Bug: 310755375 Bug: 260843353 Change-Id: I025597e284b2765986e2091538680ee629fb5ae7
Diffstat (limited to 'compiler/optimizing/intrinsics_arm64.cc')
-rw-r--r--compiler/optimizing/intrinsics_arm64.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/optimizing/intrinsics_arm64.cc b/compiler/optimizing/intrinsics_arm64.cc
index 98e526196c..2ae44cd4b0 100644
--- a/compiler/optimizing/intrinsics_arm64.cc
+++ b/compiler/optimizing/intrinsics_arm64.cc
@@ -986,7 +986,7 @@ static void GenUnsafePut(HInvoke* invoke,
if (type == DataType::Type::kReference) {
bool value_can_be_null = true; // TODO: Worth finding out this information?
- codegen->MarkGCCard(base, value, value_can_be_null);
+ codegen->MaybeMarkGCCard(base, value, value_can_be_null);
}
}
@@ -1457,7 +1457,7 @@ static void GenUnsafeCas(HInvoke* invoke, DataType::Type type, CodeGeneratorARM6
if (type == DataType::Type::kReference) {
// Mark card for object assuming new value is stored.
bool new_value_can_be_null = true; // TODO: Worth finding out this information?
- codegen->MarkGCCard(base, new_value, new_value_can_be_null);
+ codegen->MaybeMarkGCCard(base, new_value, new_value_can_be_null);
}
UseScratchRegisterScope temps(masm);
@@ -1733,7 +1733,7 @@ static void GenUnsafeGetAndUpdate(HInvoke* invoke,
DCHECK(get_and_update_op == GetAndUpdateOp::kSet);
// Mark card for object as a new value shall be stored.
bool new_value_can_be_null = true; // TODO: Worth finding out this information?
- codegen->MarkGCCard(base, /*value=*/ arg, new_value_can_be_null);
+ codegen->MaybeMarkGCCard(base, /*value=*/arg, new_value_can_be_null);
}
__ Add(tmp_ptr, base.X(), Operand(offset));
@@ -3394,7 +3394,7 @@ void IntrinsicCodeGeneratorARM64::VisitSystemArrayCopy(HInvoke* invoke) {
}
// We only need one card marking on the destination array.
- codegen_->MarkGCCard(dest.W(), Register(), /* emit_null_check= */ false);
+ codegen_->MarkGCCard(dest.W());
__ Bind(&skip_copy_and_write_barrier);
}
@@ -4977,7 +4977,7 @@ static void GenerateVarHandleSet(HInvoke* invoke,
}
if (CodeGenerator::StoreNeedsWriteBarrier(value_type, invoke->InputAt(value_index))) {
- codegen->MarkGCCard(target.object, Register(value), /* emit_null_check= */ true);
+ codegen->MaybeMarkGCCard(target.object, Register(value), /* emit_null_check= */ true);
}
if (slow_path != nullptr) {
@@ -5141,7 +5141,7 @@ static void GenerateVarHandleCompareAndSetOrExchange(HInvoke* invoke,
if (CodeGenerator::StoreNeedsWriteBarrier(value_type, invoke->InputAt(new_value_index))) {
// Mark card for object assuming new value is stored.
bool new_value_can_be_null = true; // TODO: Worth finding out this information?
- codegen->MarkGCCard(target.object, new_value.W(), new_value_can_be_null);
+ codegen->MaybeMarkGCCard(target.object, new_value.W(), new_value_can_be_null);
}
// Reuse the `offset` temporary for the pointer to the target location,
@@ -5445,7 +5445,7 @@ static void GenerateVarHandleGetAndUpdate(HInvoke* invoke,
DCHECK(get_and_update_op == GetAndUpdateOp::kSet);
// Mark card for object, the new value shall be stored.
bool new_value_can_be_null = true; // TODO: Worth finding out this information?
- codegen->MarkGCCard(target.object, arg.W(), new_value_can_be_null);
+ codegen->MaybeMarkGCCard(target.object, arg.W(), new_value_can_be_null);
}
// Reuse the `target.offset` temporary for the pointer to the target location,