From f583e5976e1de9aa206fb8de4f91000180685066 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 7 Apr 2014 13:20:42 +0100 Subject: Add support for taking parameters in optimizing compiler. - Fix stack layout to mimic Quick's. - Implement some sub operations. Change-Id: I8cf75a4d29b662381a64f02c0bc61d859482fc4e --- compiler/optimizing/code_generator.cc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'compiler/optimizing/code_generator.cc') diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index d6295dbf43..40a7b6ffc8 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -30,7 +30,6 @@ namespace art { void CodeGenerator::Compile(CodeAllocator* allocator) { - frame_size_ = GetGraph()->GetMaximumNumberOfOutVRegs() * GetWordSize(); const GrowableArray* blocks = GetGraph()->GetBlocks(); DCHECK(blocks->Get(0) == GetGraph()->GetEntryBlock()); DCHECK(GoesToNextBlock(GetGraph()->GetEntryBlock(), blocks->Get(1))); @@ -47,16 +46,14 @@ void CodeGenerator::Compile(CodeAllocator* allocator) { void CodeGenerator::CompileEntryBlock() { HGraphVisitor* location_builder = GetLocationBuilder(); HGraphVisitor* instruction_visitor = GetInstructionVisitor(); - // The entry block contains all locals for this method. By visiting the entry block, - // we're computing the required frame size. - for (HInstructionIterator it(GetGraph()->GetEntryBlock()); !it.Done(); it.Advance()) { - HInstruction* current = it.Current(); - // Instructions in the entry block should not generate code. - if (kIsDebugBuild) { + if (kIsDebugBuild) { + for (HInstructionIterator it(GetGraph()->GetEntryBlock()); !it.Done(); it.Advance()) { + HInstruction* current = it.Current(); + // Instructions in the entry block should not generate code. current->Accept(location_builder); DCHECK(current->GetLocations() == nullptr); + current->Accept(instruction_visitor); } - current->Accept(instruction_visitor); } GenerateFrameEntry(); } -- cgit v1.2.3-59-g8ed1b