summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_checker.h
diff options
context:
space:
mode:
author Aart Bik <ajcbik@google.com> 2018-05-02 16:07:51 -0700
committer Aart Bik <ajcbik@google.com> 2018-05-03 09:26:25 -0700
commita8360cd6b858906f20558552f7bf3b3876c72ec4 (patch)
tree357c6916cb832b9a27ff6bbcf2d9344fb818e569 /compiler/optimizing/graph_checker.h
parentd637fdac0ea396780b12052c7ab9de61744bcd4b (diff)
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
Diffstat (limited to 'compiler/optimizing/graph_checker.h')
-rw-r--r--compiler/optimizing/graph_checker.h12
1 files changed, 5 insertions, 7 deletions
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;