diff options
author | Brian Carlstrom <bdc@google.com> | 2015-09-28 17:47:53 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2015-09-29 08:23:03 -0700 |
commit | 39becb96f0c2ba1823ca0cf046e9f12344f9f3bd (patch) | |
tree | a3f1137c42f015a1bbaff1b5ac0e6eb527ad356c /compiler | |
parent | e4cf5892c2a244034900d49499c071b255571bba (diff) | |
download | art-39becb96f0c2ba1823ca0cf046e9f12344f9f3bd.zip art-39becb96f0c2ba1823ca0cf046e9f12344f9f3bd.tar.gz art-39becb96f0c2ba1823ca0cf046e9f12344f9f3bd.tar.bz2 |
Revert "Fix another source of undeterministic inlining." DO NOT MERGE
This reverts commit bd7eef17de5f3d25f411702f9f260a96455b4cf7.
Bug: 24467386
Bug: 20037935
Change-Id: I04d1d0ffc67661370e4c17911d3b2b105d053bc1
Diffstat (limited to 'compiler')
-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 8490730..ea97c51 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; } |