summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_checker.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2015-09-15 10:15:55 +0100
committer Vladimir Marko <vmarko@google.com> 2015-09-16 13:21:33 +0100
commitfa6b93c4b69e6d7ddfa2a4ed0aff01b0608c5a3a (patch)
tree3528c88e104dac8e58ae5370ab066b8b1dd0218f /compiler/optimizing/graph_checker.cc
parente295be4a95d7861f6ec179edf6565f58cad747cc (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/graph_checker.cc')
-rw-r--r--compiler/optimizing/graph_checker.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/optimizing/graph_checker.cc b/compiler/optimizing/graph_checker.cc
index 074ed71025..af8aa23de5 100644
--- a/compiler/optimizing/graph_checker.cc
+++ b/compiler/optimizing/graph_checker.cc
@@ -475,14 +475,13 @@ void SSAChecker::CheckLoop(HBasicBlock* loop_header) {
const ArenaBitVector& loop_blocks = loop_information->GetBlocks();
// Ensure back edges belong to the loop.
- size_t num_back_edges = loop_information->GetBackEdges().Size();
- if (num_back_edges == 0) {
+ if (loop_information->NumberOfBackEdges() == 0) {
AddError(StringPrintf(
"Loop defined by header %d has no back edge.",
id));
} else {
- for (size_t i = 0; i < num_back_edges; ++i) {
- int back_edge_id = loop_information->GetBackEdges().Get(i)->GetBlockId();
+ for (HBasicBlock* back_edge : loop_information->GetBackEdges()) {
+ int back_edge_id = back_edge->GetBlockId();
if (!loop_blocks.IsBitSet(back_edge_id)) {
AddError(StringPrintf(
"Loop defined by header %d has an invalid back edge %d.",
@@ -494,7 +493,7 @@ void SSAChecker::CheckLoop(HBasicBlock* loop_header) {
// Ensure all blocks in the loop are live and dominated by the loop header.
for (uint32_t i : loop_blocks.Indexes()) {
- HBasicBlock* loop_block = GetGraph()->GetBlocks().Get(i);
+ HBasicBlock* loop_block = GetGraph()->GetBlock(i);
if (loop_block == nullptr) {
AddError(StringPrintf("Loop defined by header %d contains a previously removed block %d.",
id,