summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
diff options
context:
space:
mode:
authorRoland Levillain <rpl@google.com>2015-02-19 12:15:55 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-02-19 12:15:56 +0000
commit92095533ac28879ddd8b44b559d700527ca12b8a (patch)
treedafc6b514825490e65ecee4385f08f066add8c95 /compiler/optimizing/optimizing_compiler.cc
parentcf3fb94a90d74361b13e7bae5aa6e0e4ae58479d (diff)
parentaa9b7c48069699e2aabedc6c0f62cb131fee0c73 (diff)
Merge "Have the opt. compiler set the size of "empty" frames to zero."
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r--compiler/optimizing/optimizing_compiler.cc31
1 files changed, 19 insertions, 12 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index c518f33f53..0ece77d2d6 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -376,7 +376,10 @@ CompiledMethod* OptimizingCompiler::CompileOptimized(HGraph* graph,
compiler_driver,
codegen->GetInstructionSet(),
ArrayRef<const uint8_t>(allocator.GetMemory()),
- codegen->GetFrameSize(),
+ // Follow Quick's behavior and set the frame size to zero if it is
+ // considered "empty" (see the definition of
+ // art::CodeGenerator::HasEmptyFrame).
+ codegen->HasEmptyFrame() ? 0 : codegen->GetFrameSize(),
codegen->GetCoreSpillMask(),
codegen->GetFpuSpillMask(),
ArrayRef<const uint8_t>(stack_map));
@@ -400,17 +403,21 @@ CompiledMethod* OptimizingCompiler::CompileBaseline(
codegen->BuildNativeGCMap(&gc_map, dex_compilation_unit);
compilation_stats_.RecordStat(MethodCompilationStat::kCompiledBaseline);
- return CompiledMethod::SwapAllocCompiledMethod(compiler_driver,
- codegen->GetInstructionSet(),
- ArrayRef<const uint8_t>(allocator.GetMemory()),
- codegen->GetFrameSize(),
- codegen->GetCoreSpillMask(),
- codegen->GetFpuSpillMask(),
- &src_mapping_table,
- AlignVectorSize(mapping_table),
- AlignVectorSize(vmap_table),
- AlignVectorSize(gc_map),
- ArrayRef<const uint8_t>());
+ return CompiledMethod::SwapAllocCompiledMethod(
+ compiler_driver,
+ codegen->GetInstructionSet(),
+ ArrayRef<const uint8_t>(allocator.GetMemory()),
+ // Follow Quick's behavior and set the frame size to zero if it is
+ // considered "empty" (see the definition of
+ // art::CodeGenerator::HasEmptyFrame).
+ codegen->HasEmptyFrame() ? 0 : codegen->GetFrameSize(),
+ codegen->GetCoreSpillMask(),
+ codegen->GetFpuSpillMask(),
+ &src_mapping_table,
+ AlignVectorSize(mapping_table),
+ AlignVectorSize(vmap_table),
+ AlignVectorSize(gc_map),
+ ArrayRef<const uint8_t>());
}
CompiledMethod* OptimizingCompiler::Compile(const DexFile::CodeItem* code_item,