From a8360cd6b858906f20558552f7bf3b3876c72ec4 Mon Sep 17 00:00:00 2001 From: Aart Bik Date: Wed, 2 May 2018 16:07:51 -0700 Subject: Perform rudimentary check on graph size for no-change assertions. Rationale: This will find blatant violations of asserting a no-change pass change if the graph size changed nevertheless. Bug: 78171933 Test: test-art-host,target Change-Id: I07b38e71c75dd6f728246d096976c8333b363329 --- compiler/optimizing/graph_checker.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'compiler/optimizing/graph_checker.h') diff --git a/compiler/optimizing/graph_checker.h b/compiler/optimizing/graph_checker.h index dbedc40518..3a2bb7a00c 100644 --- a/compiler/optimizing/graph_checker.h +++ b/compiler/optimizing/graph_checker.h @@ -38,13 +38,11 @@ class GraphChecker : public HGraphDelegateVisitor { seen_ids_.ClearAllBits(); } - // Check the whole graph (in reverse post-order). - void Run() { - // VisitReversePostOrder is used instead of VisitInsertionOrder, - // as the latter might visit dead blocks removed by the dominator - // computation. - VisitReversePostOrder(); - } + // Check the whole graph. The pass_change parameter indicates whether changes + // may have occurred during the just executed pass. The default value is + // conservatively "true" (something may have changed). The last_size parameter + // and return value pass along the observed graph sizes. + size_t Run(bool pass_change = true, size_t last_size = 0); void VisitBasicBlock(HBasicBlock* block) OVERRIDE; -- cgit v1.2.3-59-g8ed1b