diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-04-07 13:20:42 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-04-07 15:24:23 +0100 |
commit | f583e5976e1de9aa206fb8de4f91000180685066 (patch) | |
tree | 0e7c2d30af5c713012f0a33e6dd7d8f71e7fc85d /compiler/optimizing/code_generator.cc | |
parent | 7ab4e5c5288e04b7beb6d8ddfd5e8bf878002732 (diff) | |
download | art-f583e5976e1de9aa206fb8de4f91000180685066.zip art-f583e5976e1de9aa206fb8de4f91000180685066.tar.gz art-f583e5976e1de9aa206fb8de4f91000180685066.tar.bz2 |
Add support for taking parameters in optimizing compiler.
- Fix stack layout to mimic Quick's.
- Implement some sub operations.
Change-Id: I8cf75a4d29b662381a64f02c0bc61d859482fc4e
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(); } |