summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator.h
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2024-01-25 09:56:06 +0000
committer Santiago Aboy Solanes <solanes@google.com> 2024-01-29 08:47:22 +0000
commitd76551c7229060a3fe11258b490a11f4ee91e9f8 (patch)
treef8fcb5e839b1d2c0a61347b764f6a76dda117a84 /compiler/optimizing/code_generator.h
parentb782659336403e125e33f829afad49b901027c22 (diff)
Revert^7 "Disable write-barrier elimination pass"
This reverts commit 1ba3516e8c3e2b86c73084893dd297f468469181. Reason for revert: PS1 is reland as-is PS2 has two related fixes (for RISC-V and arm64) taking into account that when we store zero, we use a special register. Bug: 301833859 Bug: 310755375 Bug: 260843353 Test: lunch cf_riscv64_wear-trunk_staging-userdebug && m Test: lunch starnix_wear_yukawa-trunk_staging-userdebug && m Change-Id: I5e69890fd56404ddde56ebc457179241363d9243
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,