From 804d09372cc3d80d537da1489da4a45e0e19aa5d Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Fri, 2 May 2014 08:46:00 +0100 Subject: Build live-in, live-out and kill sets for each block. This information will be used when computing live ranges of instructions. Change-Id: I345ee833c1ccb4a8e725c7976453f6d58d350d74 --- compiler/optimizing/code_generator.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'compiler/optimizing/code_generator.cc') diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 8b85d71dae..bbebd3af24 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -30,12 +30,12 @@ namespace art { void CodeGenerator::Compile(CodeAllocator* allocator) { - const GrowableArray* blocks = GetGraph()->GetBlocks(); - DCHECK(blocks->Get(0) == GetGraph()->GetEntryBlock()); - DCHECK(GoesToNextBlock(GetGraph()->GetEntryBlock(), blocks->Get(1))); + const GrowableArray& blocks = GetGraph()->GetBlocks(); + DCHECK(blocks.Get(0) == GetGraph()->GetEntryBlock()); + DCHECK(GoesToNextBlock(GetGraph()->GetEntryBlock(), blocks.Get(1))); GenerateFrameEntry(); - for (size_t i = 0; i < blocks->Size(); i++) { - CompileBlock(blocks->Get(i)); + for (size_t i = 0, e = blocks.Size(); i < e; ++i) { + CompileBlock(blocks.Get(i)); } size_t code_size = GetAssembler()->CodeSize(); uint8_t* buffer = allocator->Allocate(code_size); -- cgit v1.2.3-59-g8ed1b