summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator.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/code_generator.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/code_generator.cc')
-rw-r--r--compiler/optimizing/code_generator.cc30
1 files changed, 0 insertions, 30 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc
index 441a93c38f..b00e7e1873 100644
--- a/compiler/optimizing/code_generator.cc
+++ b/compiler/optimizing/code_generator.cc
@@ -158,25 +158,6 @@ ReadBarrierOption CodeGenerator::GetCompilerReadBarrierOption() const {
return EmitReadBarrier() ? kWithReadBarrier : kWithoutReadBarrier;
}
-bool CodeGenerator::ShouldCheckGCCard(DataType::Type type,
- HInstruction* value,
- WriteBarrierKind write_barrier_kind) const {
- const CompilerOptions& options = GetCompilerOptions();
- const bool result =
- // Check the GC card in debug mode,
- options.EmitRunTimeChecksInDebugMode() &&
- // only for CC GC,
- options.EmitReadBarrier() &&
- // and if we eliminated the write barrier in WBE.
- !StoreNeedsWriteBarrier(type, value, write_barrier_kind) &&
- CodeGenerator::StoreNeedsWriteBarrier(type, value);
-
- DCHECK_IMPLIES(result, write_barrier_kind == WriteBarrierKind::kDontEmit);
- DCHECK_IMPLIES(result, !GetGraph()->IsCompilingBaseline());
-
- return result;
-}
-
ScopedArenaAllocator* CodeGenerator::GetScopedAllocator() {
DCHECK(code_generation_data_ != nullptr);
return code_generation_data_->GetScopedAllocator();
@@ -1627,17 +1608,6 @@ void CodeGenerator::EmitParallelMoves(Location from1,
GetMoveResolver()->EmitNativeCode(&parallel_move);
}
-bool CodeGenerator::StoreNeedsWriteBarrier(DataType::Type type,
- HInstruction* value,
- WriteBarrierKind write_barrier_kind) const {
- // Check that null value is not represented as an integer constant.
- DCHECK_IMPLIES(type == DataType::Type::kReference, !value->IsIntConstant());
- // Branch profiling currently doesn't support running optimizations.
- return GetGraph()->IsCompilingBaseline()
- ? CodeGenerator::StoreNeedsWriteBarrier(type, value)
- : write_barrier_kind != WriteBarrierKind::kDontEmit;
-}
-
void CodeGenerator::ValidateInvokeRuntime(QuickEntrypointEnum entrypoint,
HInstruction* instruction,
SlowPathCode* slow_path) {