diff options
author | 2015-02-03 18:12:44 +0000 | |
---|---|---|
committer | 2015-02-03 18:12:44 +0000 | |
commit | f9af19413333c271192c3b11425f865bd8054c0c (patch) | |
tree | fdef0e2d95396aedae484dc5163689f282a8dd12 /compiler/optimizing/inliner.cc | |
parent | bd17c3b46b035861ced434d6ed4d4fe183736e65 (diff) | |
parent | 276d9daaedfbff716339f94d55e6eff98b7434c6 (diff) |
Merge "Inline methods with multiple blocks."
Diffstat (limited to 'compiler/optimizing/inliner.cc')
-rw-r--r-- | compiler/optimizing/inliner.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc index 513be7d808..41e516492a 100644 --- a/compiler/optimizing/inliner.cc +++ b/compiler/optimizing/inliner.cc @@ -35,7 +35,6 @@ namespace art { static constexpr int kMaxInlineCodeUnits = 100; -static constexpr int kMaxInlineNumberOfBlocks = 3; static constexpr int kDepthLimit = 5; void HInliner::Run() { @@ -140,13 +139,6 @@ bool HInliner::TryInline(HInvoke* invoke_instruction, return false; } - if (callee_graph->GetBlocks().Size() > kMaxInlineNumberOfBlocks) { - VLOG(compiler) << "Method " << PrettyMethod(method_index, outer_dex_file) - << " has too many blocks to be inlined: " - << callee_graph->GetBlocks().Size(); - return false; - } - if (!RegisterAllocator::CanAllocateRegistersFor(*callee_graph, compiler_driver_->GetInstructionSet())) { VLOG(compiler) << "Method " << PrettyMethod(method_index, outer_dex_file) @@ -200,6 +192,10 @@ bool HInliner::TryInline(HInvoke* invoke_instruction, !instr_it.Done(); instr_it.Advance()) { HInstruction* current = instr_it.Current(); + if (current->IsSuspendCheck()) { + continue; + } + if (current->CanThrow()) { VLOG(compiler) << "Method " << PrettyMethod(method_index, outer_dex_file) << " could not be inlined because " << current->DebugName() |