summaryrefslogtreecommitdiff
path: root/compiler/optimizing/intrinsics_x86_64.cc
diff options
context:
space:
mode:
author Matthew Reynolds <matthewre@google.com> 2024-01-24 17:42:08 +0000
committer Aditya Chitnis <chitnis@google.com> 2024-01-24 22:21:16 +0000
commit1ba3516e8c3e2b86c73084893dd297f468469181 (patch)
tree4b0c99a53fff26f6fe9489049f1830c54af08b86 /compiler/optimizing/intrinsics_x86_64.cc
parent6b866347f77e264143cf3fbc677c3da0ef9acd5b (diff)
Revert^6 "Disable write-barrier elimination pass"
This reverts commit 1be176f5a78750e2f0e32470f8c83e3d1643954d. Reason for revert: Potential cause of build breakage for cf_riscv64_wear-trunk_staging-userdebug build 11353124 Change-Id: I5db1c9fba1edd4ab1eef30e2b547bb9649af5c10
Diffstat (limited to 'compiler/optimizing/intrinsics_x86_64.cc')
-rw-r--r--compiler/optimizing/intrinsics_x86_64.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/compiler/optimizing/intrinsics_x86_64.cc b/compiler/optimizing/intrinsics_x86_64.cc
index 1876a70541..5177ac4d44 100644
--- a/compiler/optimizing/intrinsics_x86_64.cc
+++ b/compiler/optimizing/intrinsics_x86_64.cc
@@ -1153,7 +1153,8 @@ void IntrinsicCodeGeneratorX86_64::VisitSystemArrayCopy(HInvoke* invoke) {
}
// We only need one card marking on the destination array.
- codegen_->MarkGCCard(temp1, temp2, dest);
+ codegen_->MarkGCCard(
+ temp1, temp2, dest, CpuRegister(kNoRegister), /* emit_null_check= */ false);
__ Bind(&skip_copy_and_write_barrier);
}
@@ -2090,11 +2091,11 @@ static void GenUnsafePut(LocationSummary* locations, DataType::Type type, bool i
if (type == DataType::Type::kReference) {
bool value_can_be_null = true; // TODO: Worth finding out this information?
- codegen->MaybeMarkGCCard(locations->GetTemp(0).AsRegister<CpuRegister>(),
- locations->GetTemp(1).AsRegister<CpuRegister>(),
- base,
- value,
- value_can_be_null);
+ codegen->MarkGCCard(locations->GetTemp(0).AsRegister<CpuRegister>(),
+ locations->GetTemp(1).AsRegister<CpuRegister>(),
+ base,
+ value,
+ value_can_be_null);
}
}
@@ -2389,7 +2390,7 @@ static void GenCompareAndSetOrExchangeRef(CodeGeneratorX86_64* codegen,
// Mark card for object assuming new value is stored.
bool value_can_be_null = true; // TODO: Worth finding out this information?
- codegen->MaybeMarkGCCard(temp1, temp2, base, value, value_can_be_null);
+ codegen->MarkGCCard(temp1, temp2, base, value, value_can_be_null);
Address field_addr(base, offset, TIMES_1, 0);
if (codegen->EmitBakerReadBarrier()) {
@@ -2700,7 +2701,7 @@ static void GenUnsafeGetAndUpdate(HInvoke* invoke,
// 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->MaybeMarkGCCard(temp1, temp2, base, /*value=*/out, new_value_can_be_null);
+ codegen->MarkGCCard(temp1, temp2, base, /*value=*/ out, new_value_can_be_null);
if (kPoisonHeapReferences) {
// Use a temp to avoid poisoning base of the field address, which might happen if `out`
@@ -4158,8 +4159,7 @@ static void GenerateVarHandleSet(HInvoke* invoke,
/*value_can_be_null=*/true,
byte_swap,
// Value can be null, and this write barrier is not being relied on for other sets.
- value_type == DataType::Type::kReference ? WriteBarrierKind::kEmitNotBeingReliedOn :
- WriteBarrierKind::kDontEmit);
+ WriteBarrierKind::kEmitWithNullCheck);
// setVolatile needs kAnyAny barrier, but HandleFieldSet takes care of that.
@@ -4444,7 +4444,7 @@ static void GenerateVarHandleGetAndSet(HInvoke* invoke,
&temp1,
&temp2);
}
- codegen->MarkGCCard(temp1, temp2, ref);
+ codegen->MarkGCCard(temp1, temp2, ref, valreg, /* emit_null_check= */ false);
DCHECK_EQ(valreg, out.AsRegister<CpuRegister>());
if (kPoisonHeapReferences) {