diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-12-12 19:22:03 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-12-17 11:53:33 +0000 |
commit | 390f59f9bec64fd81b05e796dfaeb03ab6d4cc81 (patch) | |
tree | d418b4a488390d718144bf5a5a180d965d1d762e /compiler/optimizing/builder.cc | |
parent | 240016da1d6615b26c8342bdeb4bae381570ac47 (diff) | |
download | android_art-390f59f9bec64fd81b05e796dfaeb03ab6d4cc81.tar.gz android_art-390f59f9bec64fd81b05e796dfaeb03ab6d4cc81.tar.bz2 android_art-390f59f9bec64fd81b05e796dfaeb03ab6d4cc81.zip |
Small optimization for recursive calls: avoid dex cache.
Change-Id: Ic4054b6c38f0a2a530ba6ef747647f86cee0b1b8
Diffstat (limited to 'compiler/optimizing/builder.cc')
-rw-r--r-- | compiler/optimizing/builder.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc index f9054e0133..ef93b8c10e 100644 --- a/compiler/optimizing/builder.cc +++ b/compiler/optimizing/builder.cc @@ -613,9 +613,11 @@ bool HGraphBuilder::BuildInvoke(const Instruction& instruction, // Sharpening to kDirect only works if we compile PIC. DCHECK((optimized_invoke_type == invoke_type) || (optimized_invoke_type != kDirect) || compiler_driver_->GetCompilerOptions().GetCompilePic()); + bool is_recursive = + (target_method.dex_method_index == dex_compilation_unit_->GetDexMethodIndex()); invoke = new (arena_) HInvokeStaticOrDirect( arena_, number_of_arguments, return_type, dex_pc, target_method.dex_method_index, - optimized_invoke_type); + is_recursive, optimized_invoke_type); } size_t start_index = 0; |