From 39becb96f0c2ba1823ca0cf046e9f12344f9f3bd Mon Sep 17 00:00:00 2001 From: Brian Carlstrom Date: Mon, 28 Sep 2015 17:47:53 -0700 Subject: Revert "Fix another source of undeterministic inlining." DO NOT MERGE This reverts commit bd7eef17de5f3d25f411702f9f260a96455b4cf7. Bug: 24467386 Bug: 20037935 Change-Id: I04d1d0ffc67661370e4c17911d3b2b105d053bc1 --- compiler/optimizing/inliner.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'compiler') 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; } -- cgit v1.1