summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_test.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2015-09-03 13:35:12 +0000
committer Vladimir Marko <vmarko@google.com> 2015-09-08 18:09:49 +0100
commit6058455d486219994921b63a2d774dc9908415a2 (patch)
tree3d205227f3ff54cd3a50bc5c0e7cb3ad6c175b86 /compiler/optimizing/graph_test.cc
parent637ee0b9c10ab7732a7ee7b8335f3fff4ac1549c (diff)
Optimizing: Tag basic block allocations with their source.
Replace GrowableArray with ArenaVector in HBasicBlock and, to track the source of allocations, assign one new and two Quick's arena allocation types to these vectors. Rename kArenaAllocSuccessor to kArenaAllocSuccessors. Bug: 23736311 Change-Id: Ib52e51698890675bde61f007fe6039338cf1a025
Diffstat (limited to 'compiler/optimizing/graph_test.cc')
-rw-r--r--compiler/optimizing/graph_test.cc32
1 files changed, 16 insertions, 16 deletions
diff --git a/compiler/optimizing/graph_test.cc b/compiler/optimizing/graph_test.cc
index 59d50926ad..7968e88117 100644
--- a/compiler/optimizing/graph_test.cc
+++ b/compiler/optimizing/graph_test.cc
@@ -99,7 +99,7 @@ TEST(GraphTest, IfSuccessorSimpleJoinBlock1) {
ASSERT_NE(false_block, return_block);
// Ensure the new block branches to the join block.
- ASSERT_EQ(false_block->GetSuccessors().Get(0), return_block);
+ ASSERT_EQ(false_block->GetSuccessor(0), return_block);
}
// Test that the successors of an if block stay consistent after a SimplifyCFG.
@@ -134,7 +134,7 @@ TEST(GraphTest, IfSuccessorSimpleJoinBlock2) {
ASSERT_NE(true_block, return_block);
// Ensure the new block branches to the join block.
- ASSERT_EQ(true_block->GetSuccessors().Get(0), return_block);
+ ASSERT_EQ(true_block->GetSuccessor(0), return_block);
}
// Test that the successors of an if block stay consistent after a SimplifyCFG.
@@ -163,12 +163,12 @@ TEST(GraphTest, IfSuccessorMultipleBackEdges1) {
ASSERT_EQ(if_block->GetLastInstruction()->AsIf()->IfFalseSuccessor(), return_block);
// Ensure there is only one back edge.
- ASSERT_EQ(if_block->GetPredecessors().Size(), 2u);
- ASSERT_EQ(if_block->GetPredecessors().Get(0), entry_block);
- ASSERT_NE(if_block->GetPredecessors().Get(1), if_block);
+ ASSERT_EQ(if_block->GetPredecessors().size(), 2u);
+ ASSERT_EQ(if_block->GetPredecessor(0), entry_block);
+ ASSERT_NE(if_block->GetPredecessor(1), if_block);
// Ensure the new block is the back edge.
- ASSERT_EQ(if_block->GetPredecessors().Get(1),
+ ASSERT_EQ(if_block->GetPredecessor(1),
if_block->GetLastInstruction()->AsIf()->IfTrueSuccessor());
}
@@ -198,12 +198,12 @@ TEST(GraphTest, IfSuccessorMultipleBackEdges2) {
ASSERT_EQ(if_block->GetLastInstruction()->AsIf()->IfTrueSuccessor(), return_block);
// Ensure there is only one back edge.
- ASSERT_EQ(if_block->GetPredecessors().Size(), 2u);
- ASSERT_EQ(if_block->GetPredecessors().Get(0), entry_block);
- ASSERT_NE(if_block->GetPredecessors().Get(1), if_block);
+ ASSERT_EQ(if_block->GetPredecessors().size(), 2u);
+ ASSERT_EQ(if_block->GetPredecessor(0), entry_block);
+ ASSERT_NE(if_block->GetPredecessor(1), if_block);
// Ensure the new block is the back edge.
- ASSERT_EQ(if_block->GetPredecessors().Get(1),
+ ASSERT_EQ(if_block->GetPredecessor(1),
if_block->GetLastInstruction()->AsIf()->IfFalseSuccessor());
}
@@ -238,11 +238,11 @@ TEST(GraphTest, IfSuccessorMultiplePreHeaders1) {
ASSERT_EQ(if_instr->IfFalseSuccessor(), return_block);
// Ensure there is only one pre header..
- ASSERT_EQ(loop_block->GetPredecessors().Size(), 2u);
+ ASSERT_EQ(loop_block->GetPredecessors().size(), 2u);
// Ensure the new block is the successor of the true block.
- ASSERT_EQ(if_instr->IfTrueSuccessor()->GetSuccessors().Size(), 1u);
- ASSERT_EQ(if_instr->IfTrueSuccessor()->GetSuccessors().Get(0),
+ ASSERT_EQ(if_instr->IfTrueSuccessor()->GetSuccessors().size(), 1u);
+ ASSERT_EQ(if_instr->IfTrueSuccessor()->GetSuccessor(0),
loop_block->GetLoopInformation()->GetPreHeader());
}
@@ -276,11 +276,11 @@ TEST(GraphTest, IfSuccessorMultiplePreHeaders2) {
ASSERT_EQ(if_instr->IfTrueSuccessor(), return_block);
// Ensure there is only one pre header..
- ASSERT_EQ(loop_block->GetPredecessors().Size(), 2u);
+ ASSERT_EQ(loop_block->GetPredecessors().size(), 2u);
// Ensure the new block is the successor of the false block.
- ASSERT_EQ(if_instr->IfFalseSuccessor()->GetSuccessors().Size(), 1u);
- ASSERT_EQ(if_instr->IfFalseSuccessor()->GetSuccessors().Get(0),
+ ASSERT_EQ(if_instr->IfFalseSuccessor()->GetSuccessors().size(), 1u);
+ ASSERT_EQ(if_instr->IfFalseSuccessor()->GetSuccessor(0),
loop_block->GetLoopInformation()->GetPreHeader());
}