summaryrefslogtreecommitdiff
path: root/compiler/optimizing/inliner.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2017-03-09 11:15:34 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-03-09 11:15:34 +0000
commit2c3fc44464d261c8ae285abbd140b4523dba005c (patch)
treee64872f57c330e17ee814c47f12c49fec0b4b406 /compiler/optimizing/inliner.cc
parent2e5a2e2183a8392a7a768f0b7aa70f6ff4cd0cad (diff)
parent1eede6ae9b08d305d0c1123284ff958373916474 (diff)
Merge "Don't inline methods that throw in graph with irreducible loops."
Diffstat (limited to 'compiler/optimizing/inliner.cc')
-rw-r--r--compiler/optimizing/inliner.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index e3926c58c4..0b96005a17 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -1380,6 +1380,13 @@ bool HInliner::TryBuildAndInlineHelper(HInvoke* invoke_instruction,
<< " could not be inlined because one branch always throws and"
<< " caller does not have an exit block";
return false;
+ } else if (graph_->HasIrreducibleLoops()) {
+ // TODO(ngeoffray): Support re-computing loop information to graphs with
+ // irreducible loops?
+ VLOG(compiler) << "Method " << callee_dex_file.PrettyMethod(method_index)
+ << " could not be inlined because one branch always throws and"
+ << " caller has irreducible loops";
+ return false;
}
} else {
has_one_return = true;