summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_checker.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2016-03-29 08:56:19 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2016-03-29 08:56:19 +0000
commit6f51d7756a9c66007fe7666b19399e1f60ff6092 (patch)
tree3b4836cd1c03ab03d612716d73a4ece6757ad596 /compiler/optimizing/graph_checker.h
parentfedcd0a6870cf4d940d231f6725ca95c590d04bd (diff)
parent947eb700bec9e214a72d4747864398dc238da60c (diff)
Merge "Optimizing: Reduce arena memory used by GraphChecker."
Diffstat (limited to 'compiler/optimizing/graph_checker.h')
-rw-r--r--compiler/optimizing/graph_checker.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/optimizing/graph_checker.h b/compiler/optimizing/graph_checker.h
index 27d5621887..a536b30fcd 100644
--- a/compiler/optimizing/graph_checker.h
+++ b/compiler/optimizing/graph_checker.h
@@ -33,7 +33,9 @@ class GraphChecker : public HGraphDelegateVisitor {
seen_ids_(graph->GetArena(),
graph->GetCurrentInstructionId(),
false,
- kArenaAllocGraphChecker) {}
+ kArenaAllocGraphChecker),
+ blocks_storage_(graph->GetArena()->Adapter(kArenaAllocGraphChecker)),
+ visited_storage_(graph->GetArena(), 0u, true, kArenaAllocGraphChecker) {}
// Check the whole graph (in reverse post-order).
void Run() {
@@ -102,6 +104,10 @@ class GraphChecker : public HGraphDelegateVisitor {
const char* const dump_prefix_;
ArenaBitVector seen_ids_;
+ // To reduce the total arena memory allocation, we reuse the same storage.
+ ArenaVector<HBasicBlock*> blocks_storage_;
+ ArenaBitVector visited_storage_;
+
DISALLOW_COPY_AND_ASSIGN(GraphChecker);
};