diff options
author | Brian Carlstrom <bdc@google.com> | 2015-09-30 02:15:06 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-09-30 02:15:06 +0000 |
commit | a21d821a002dca4d28ef2d86760b9147b9f35de6 (patch) | |
tree | a3f1137c42f015a1bbaff1b5ac0e6eb527ad356c | |
parent | e003973b8692ff8e792b6b3c176e7d7095fda45f (diff) | |
parent | 39becb96f0c2ba1823ca0cf046e9f12344f9f3bd (diff) | |
download | android_art-a21d821a002dca4d28ef2d86760b9147b9f35de6.tar.gz android_art-a21d821a002dca4d28ef2d86760b9147b9f35de6.tar.bz2 android_art-a21d821a002dca4d28ef2d86760b9147b9f35de6.zip |
am 39becb96: Revert "Fix another source of undeterministic inlining." DO NOT MERGE
* commit '39becb96f0c2ba1823ca0cf046e9f12344f9f3bd':
Revert "Fix another source of undeterministic inlining." DO NOT MERGE
-rw-r--r-- | compiler/optimizing/inliner.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc index 8490730535..ea97c51c9e 100644 --- a/compiler/optimizing/inliner.cc +++ b/compiler/optimizing/inliner.cc @@ -253,10 +253,16 @@ bool HInliner::TryBuildAndInline(ArtMethod* resolved_method, continue; } + // We only do this on the target. We still want deterministic inlining on the host. + constexpr bool kInliningMustBeDeterministic = !kIsTargetBuild; + if (current->CanThrow()) { VLOG(compiler) << "Method " << PrettyMethod(method_index, caller_dex_file) << " could not be inlined because " << current->DebugName() << " can throw"; + if (!kInliningMustBeDeterministic) { + resolved_method->SetShouldNotInline(); + } return false; } @@ -264,6 +270,9 @@ bool HInliner::TryBuildAndInline(ArtMethod* resolved_method, VLOG(compiler) << "Method " << PrettyMethod(method_index, caller_dex_file) << " could not be inlined because " << current->DebugName() << " needs an environment"; + if (!kInliningMustBeDeterministic) { + resolved_method->SetShouldNotInline(); + } return false; } |