From fa6b93c4b69e6d7ddfa2a4ed0aff01b0608c5a3a Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Tue, 15 Sep 2015 10:15:55 +0100 Subject: Optimizing: Tag arena allocations in HGraph. Replace GrowableArray with ArenaVector in HGraph and related classes HEnvironment, HLoopInformation, HInvoke and HPhi, and tag allocations with new arena allocation types. Change-Id: I3d79897af405b9a1a5b98bfc372e70fe0b3bc40d --- compiler/optimizing/bounds_check_elimination.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'compiler/optimizing/bounds_check_elimination.cc') diff --git a/compiler/optimizing/bounds_check_elimination.cc b/compiler/optimizing/bounds_check_elimination.cc index 0d953900a9..62f5b9aa52 100644 --- a/compiler/optimizing/bounds_check_elimination.cc +++ b/compiler/optimizing/bounds_check_elimination.cc @@ -284,8 +284,7 @@ class ArrayAccessInsideLoopFinder : public ValueObject { } static bool DominatesAllBackEdges(HBasicBlock* block, HLoopInformation* loop_info) { - for (size_t i = 0, e = loop_info->GetBackEdges().Size(); i < e; ++i) { - HBasicBlock* back_edge = loop_info->GetBackEdges().Get(i); + for (HBasicBlock* back_edge : loop_info->GetBackEdges()) { if (!block->Dominates(back_edge)) { return false; } @@ -1109,9 +1108,9 @@ class BCEVisitor : public HGraphVisitor { BCEVisitor(HGraph* graph, HInductionVarAnalysis* induction_analysis) : HGraphVisitor(graph), - maps_(graph->GetBlocks().Size()), + maps_(graph->GetBlocks().size()), need_to_revisit_block_(false), - initial_block_size_(graph->GetBlocks().Size()), + initial_block_size_(graph->GetBlocks().size()), induction_range_(induction_analysis) {} void VisitBasicBlock(HBasicBlock* block) OVERRIDE { @@ -1852,7 +1851,7 @@ class BCEVisitor : public HGraphVisitor { bool need_to_revisit_block_; // Initial number of blocks. - int32_t initial_block_size_; + uint32_t initial_block_size_; // Range analysis based on induction variables. InductionVarRange induction_range_; -- cgit v1.2.3-59-g8ed1b