diff options
author | 2015-09-15 10:15:55 +0100 | |
---|---|---|
committer | 2015-09-16 13:21:33 +0100 | |
commit | fa6b93c4b69e6d7ddfa2a4ed0aff01b0608c5a3a (patch) | |
tree | 3528c88e104dac8e58ae5370ab066b8b1dd0218f /compiler/optimizing/ssa_test.cc | |
parent | e295be4a95d7861f6ec179edf6565f58cad747cc (diff) |
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
Diffstat (limited to 'compiler/optimizing/ssa_test.cc')
-rw-r--r-- | compiler/optimizing/ssa_test.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/optimizing/ssa_test.cc b/compiler/optimizing/ssa_test.cc index 0e8c058002..024278f4b2 100644 --- a/compiler/optimizing/ssa_test.cc +++ b/compiler/optimizing/ssa_test.cc @@ -64,8 +64,7 @@ class SsaPrettyPrinter : public HPrettyPrinter { static void ReNumberInstructions(HGraph* graph) { int id = 0; - for (size_t i = 0, e = graph->GetBlocks().Size(); i < e; ++i) { - HBasicBlock* block = graph->GetBlocks().Get(i); + for (HBasicBlock* block : graph->GetBlocks()) { for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) { it.Current()->SetId(id++); } @@ -92,8 +91,8 @@ static void TestCode(const uint16_t* data, const char* expected) { ReNumberInstructions(graph); // Test that phis had their type set. - for (size_t i = 0, e = graph->GetBlocks().Size(); i < e; ++i) { - for (HInstructionIterator it(graph->GetBlocks().Get(i)->GetPhis()); !it.Done(); it.Advance()) { + for (HBasicBlock* block : graph->GetBlocks()) { + for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) { ASSERT_NE(it.Current()->GetType(), Primitive::kPrimVoid); } } |