diff options
author | 2024-01-19 16:28:06 +0000 | |
---|---|---|
committer | 2024-01-19 16:28:06 +0000 | |
commit | 9f8df195b7ff2ce47eec4e9b193ff3214ebed19c (patch) | |
tree | 8dc68a588a6ee5c6e00c9e5bed519a9c6774d4c5 /compiler/optimizing/code_generator.cc | |
parent | 7c1dd6e2d1893f288214413c4b97273980f3aa4a (diff) |
Revert^2 "Disable write-barrier elimination pass"
This reverts commit 7c1dd6e2d1893f288214413c4b97273980f3aa4a.
Reason for revert: build breakages, using a different number of temps vs the expected (crashing in https://cs.android.com/android/platform/superproject/main/+/main:art/compiler/optimizing/code_generator_x86_64.cc;l=5488;drc=7c1dd6e2d1893f288214413c4b97273980f3aa4a)
Change-Id: I843c039394dd666776ea5bcb5b10b1f47df12d53
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r-- | compiler/optimizing/code_generator.cc | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 0e294b560a..b0e07e32ea 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(¶llel_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) { |