diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-04-07 14:35:31 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-04-07 14:35:31 +0000 |
commit | 427ca38b0a6c6fd7dc0dbb380619e2b91b56cf1c (patch) | |
tree | 0e7c2d30af5c713012f0a33e6dd7d8f71e7fc85d /compiler/optimizing/code_generator.cc | |
parent | 7ab4e5c5288e04b7beb6d8ddfd5e8bf878002732 (diff) | |
parent | f583e5976e1de9aa206fb8de4f91000180685066 (diff) | |
download | art-427ca38b0a6c6fd7dc0dbb380619e2b91b56cf1c.zip art-427ca38b0a6c6fd7dc0dbb380619e2b91b56cf1c.tar.gz art-427ca38b0a6c6fd7dc0dbb380619e2b91b56cf1c.tar.bz2 |
Merge "Add support for taking parameters in optimizing compiler."
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r-- | compiler/optimizing/code_generator.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index d6295db..40a7b6f 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<HBasicBlock*>* 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(); } |