From 622d9c31febd950255b36a48b47e1f630197c5fe Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 12 May 2014 16:11:02 +0100 Subject: Add loop recognition and CFG simplifications in new compiler. We do three simplifications: - Split critical edges, for code generation from SSA (new). - Ensure one back edge per loop, to simplify loop recognition (new). - Ensure only one pre header for a loop, to simplify SSA creation (existing). Change-Id: I9bfccd4b236a00486a261078627b091c8a68be33 --- compiler/optimizing/pretty_printer.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'compiler/optimizing/pretty_printer.h') diff --git a/compiler/optimizing/pretty_printer.h b/compiler/optimizing/pretty_printer.h index c82d0cc6a4..dfeafe72aa 100644 --- a/compiler/optimizing/pretty_printer.h +++ b/compiler/optimizing/pretty_printer.h @@ -70,23 +70,23 @@ class HPrettyPrinter : public HGraphVisitor { virtual void VisitBasicBlock(HBasicBlock* block) { PrintString("BasicBlock "); PrintInt(block->GetBlockId()); - const GrowableArray* blocks = block->GetPredecessors(); - if (!blocks->IsEmpty()) { + const GrowableArray& predecessors = block->GetPredecessors(); + if (!predecessors.IsEmpty()) { PrintString(", pred: "); - for (size_t i = 0; i < blocks->Size() -1; i++) { - PrintInt(blocks->Get(i)->GetBlockId()); + for (size_t i = 0; i < predecessors.Size() -1; i++) { + PrintInt(predecessors.Get(i)->GetBlockId()); PrintString(", "); } - PrintInt(blocks->Peek()->GetBlockId()); + PrintInt(predecessors.Peek()->GetBlockId()); } - blocks = block->GetSuccessors(); - if (!blocks->IsEmpty()) { + const GrowableArray& successors = block->GetSuccessors(); + if (!successors.IsEmpty()) { PrintString(", succ: "); - for (size_t i = 0; i < blocks->Size() - 1; i++) { - PrintInt(blocks->Get(i)->GetBlockId()); + for (size_t i = 0; i < successors.Size() - 1; i++) { + PrintInt(successors.Get(i)->GetBlockId()); PrintString(", "); } - PrintInt(blocks->Peek()->GetBlockId()); + PrintInt(successors.Peek()->GetBlockId()); } PrintNewLine(); HGraphVisitor::VisitBasicBlock(block); -- cgit v1.2.3-59-g8ed1b