summaryrefslogtreecommitdiff
path: root/compiler/optimizing/pretty_printer.h
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/pretty_printer.h
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/pretty_printer.h')
-rw-r--r--compiler/optimizing/pretty_printer.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/compiler/optimizing/pretty_printer.h b/compiler/optimizing/pretty_printer.h
index 934514eeda..34850a564c 100644
--- a/compiler/optimizing/pretty_printer.h
+++ b/compiler/optimizing/pretty_printer.h
@@ -71,23 +71,23 @@ class HPrettyPrinter : public HGraphVisitor {
void VisitBasicBlock(HBasicBlock* block) OVERRIDE {
PrintString("BasicBlock ");
PrintInt(block->GetBlockId());
- const GrowableArray<HBasicBlock*>& predecessors = block->GetPredecessors();
- if (!predecessors.IsEmpty()) {
+ const ArenaVector<HBasicBlock*>& predecessors = block->GetPredecessors();
+ if (!predecessors.empty()) {
PrintString(", pred: ");
- for (size_t i = 0; i < predecessors.Size() -1; i++) {
- PrintInt(predecessors.Get(i)->GetBlockId());
+ for (size_t i = 0; i < predecessors.size() -1; i++) {
+ PrintInt(predecessors[i]->GetBlockId());
PrintString(", ");
}
- PrintInt(predecessors.Peek()->GetBlockId());
+ PrintInt(predecessors.back()->GetBlockId());
}
- const GrowableArray<HBasicBlock*>& successors = block->GetSuccessors();
- if (!successors.IsEmpty()) {
+ const ArenaVector<HBasicBlock*>& successors = block->GetSuccessors();
+ if (!successors.empty()) {
PrintString(", succ: ");
- for (size_t i = 0; i < successors.Size() - 1; i++) {
- PrintInt(successors.Get(i)->GetBlockId());
+ for (size_t i = 0; i < successors.size() - 1; i++) {
+ PrintInt(successors[i]->GetBlockId());
PrintString(", ");
}
- PrintInt(successors.Peek()->GetBlockId());
+ PrintInt(successors.back()->GetBlockId());
}
PrintNewLine();
HGraphVisitor::VisitBasicBlock(block);
@@ -131,7 +131,7 @@ class StringPrettyPrinter : public HPrettyPrinter {
PrintString(" ");
PrintInt(gota->GetId());
PrintString(": Goto ");
- PrintInt(current_block_->GetSuccessors().Get(0)->GetBlockId());
+ PrintInt(current_block_->GetSuccessor(0)->GetBlockId());
PrintNewLine();
}