summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator.h
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2024-01-22 08:57:31 +0000
committer Santiago Aboy Solanes <solanes@google.com> 2024-01-22 10:49:24 +0000
commitb5b98b9bb31acb2deffb692c50d0fbc71476663b (patch)
tree3bda094f8d5ea90ad34e5d357889ce4933f657f5 /compiler/optimizing/code_generator.h
parentdbf9d9309f3df9c9ac8a9e30277b31ebb2977f4d (diff)
Revert^3 "Disable write-barrier elimination pass"
This reverts commit 9f8df195b7ff2ce47eec4e9b193ff3214ebed19c. Reason for revert: Fix for x86_64 with heap poison enabled This case uses a temp with index `1` in the regular FieldSet case. This is done like this due to GenerateVarHandleSet also calling HandleFieldSet. The bug was that we were allocating only one temp in the regular FieldSet case and therefore not having the temp with index `1` available. PS1 is the revert as-is. PS2 contains the fix. Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Test: Same command with heap poison enabled too Bug: 301833859 Bug: 310755375 Bug: 260843353 Change-Id: Ie2740b4c443158c4e72810ce1d8268353c5f0055
Diffstat (limited to 'compiler/optimizing/code_generator.h')
-rw-r--r--compiler/optimizing/code_generator.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h
index 88e5a20240..fbb4f9e21e 100644
--- a/compiler/optimizing/code_generator.h
+++ b/compiler/optimizing/code_generator.h
@@ -380,6 +380,11 @@ class CodeGenerator : public DeletableArenaObject<kArenaAllocCodeGenerator> {
bool EmitNonBakerReadBarrier() const;
ReadBarrierOption GetCompilerReadBarrierOption() const;
+ // Returns true if we should check the GC card for consistency purposes.
+ bool ShouldCheckGCCard(DataType::Type type,
+ HInstruction* value,
+ WriteBarrierKind write_barrier_kind) const;
+
// Get the ScopedArenaAllocator used for codegen memory allocation.
ScopedArenaAllocator* GetScopedAllocator();
@@ -503,6 +508,11 @@ class CodeGenerator : public DeletableArenaObject<kArenaAllocCodeGenerator> {
return type == DataType::Type::kReference && !value->IsNullConstant();
}
+ // If we are compiling a graph with the WBE pass enabled, we want to honor the WriteBarrierKind
+ // set during the WBE pass.
+ bool StoreNeedsWriteBarrier(DataType::Type type,
+ HInstruction* value,
+ WriteBarrierKind write_barrier_kind) const;
// Performs checks pertaining to an InvokeRuntime call.
void ValidateInvokeRuntime(QuickEntrypointEnum entrypoint,