summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_checker.h
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2023-12-08 14:01:44 +0000
committer Santiago Aboy Solanes <solanes@google.com> 2024-01-19 11:42:17 +0000
commit7c1dd6e2d1893f288214413c4b97273980f3aa4a (patch)
treed2912acfaed1cee70670d3497236a4b0d81baff3 /compiler/optimizing/graph_checker.h
parent921cc7db943144fe8a45f00527ad4950570637d0 (diff)
Revert "Disable write-barrier elimination pass"
This reverts commit 5a3271d7caafefd10a20f5a5db09d2c178838b76. Reason for revert: This CL has two fixes (codegen not doing a null check if a write barrier is being relied on, and codegen not recomputing skipping write barriers), regression tests, a new runtime check which runs in debug mode for the CC GC to ensure that the card table is set correctly for skipped write barriers, and new compile time (graph checker) tests to ensure graph consistency. This patchset updates the WriteBarrierKind to be {emit being relied on, emit not being relied on, dont emit}, which leaves the null check skip implementation to codegen. Test 2247- is removed from knownfailures.json but still skipped in MTS due to SLO requirements. Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Bug: 301833859 Bug: 310755375 Bug: 260843353 Change-Id: I025597e284b2765986e2091538680ee629fb5ae7
Diffstat (limited to 'compiler/optimizing/graph_checker.h')
-rw-r--r--compiler/optimizing/graph_checker.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/optimizing/graph_checker.h b/compiler/optimizing/graph_checker.h
index 38e2d7ced9..5704bcec1a 100644
--- a/compiler/optimizing/graph_checker.h
+++ b/compiler/optimizing/graph_checker.h
@@ -59,6 +59,8 @@ class GraphChecker : public HGraphDelegateVisitor {
void VisitPhi(HPhi* phi) override;
void VisitArraySet(HArraySet* instruction) override;
+ void VisitInstanceFieldSet(HInstanceFieldSet* instruction) override;
+ void VisitStaticFieldSet(HStaticFieldSet* instruction) override;
void VisitBinaryOperation(HBinaryOperation* op) override;
void VisitBooleanNot(HBooleanNot* instruction) override;
void VisitBoundType(HBoundType* instruction) override;
@@ -93,6 +95,9 @@ class GraphChecker : public HGraphDelegateVisitor {
void HandleLoop(HBasicBlock* loop_header);
void HandleBooleanInput(HInstruction* instruction, size_t input_index);
+ template <typename GetWriteBarrierKind>
+ void CheckWriteBarrier(HInstruction* instruction, GetWriteBarrierKind&& get_write_barrier_kind);
+
// Was the last visit of the graph valid?
bool IsValid() const {
return errors_.empty();