summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator.h
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2024-01-23 13:55:50 +0000
committer Santiago Aboy Solanes <solanes@google.com> 2024-01-24 13:33:33 +0000
commit1be176f5a78750e2f0e32470f8c83e3d1643954d (patch)
tree5b6ba41dc94cebac7f65a2bb97355398094964b3 /compiler/optimizing/code_generator.h
parent6799d71854007cb1efe2bb4dcceda9f0f4f0e0a3 (diff)
Revert^5 "Disable write-barrier elimination pass"
This reverts commit 31b949bc4a76e5c6d00a8e18c346f123b5321a1c. Reason for revert: PS1 is reland as-is PS2 has two fixes: * Missed poisoning heap references in a code path * Removed incorrect DCHECK Change-Id: I81b317ddc704dbd8a173f5d5c624dbc69e2d9e60 Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Test: art/test/testrunner/testrunner.py --target --64 --optimizing -b Both commnands with `export ART_HEAP_POISONING=true` Bug: 301833859 Bug: 310755375 Bug: 260843353
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,