summaryrefslogtreecommitdiff
path: root/compiler/optimizing/inliner.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-02-02 18:24:11 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2015-02-03 18:11:46 +0000
commit276d9daaedfbff716339f94d55e6eff98b7434c6 (patch)
treefdef0e2d95396aedae484dc5163689f282a8dd12 /compiler/optimizing/inliner.cc
parentbd17c3b46b035861ced434d6ed4d4fe183736e65 (diff)
Inline methods with multiple blocks.
Change-Id: I3431af60e97fae230e0b6e98bcf0acc0ee9abf8c
Diffstat (limited to 'compiler/optimizing/inliner.cc')
-rw-r--r--compiler/optimizing/inliner.cc12
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()