Revert "Fix another source of undeterministic inlining." DO NOT MERGE

This reverts commit bd7eef17de5f3d25f411702f9f260a96455b4cf7.

Bug: 24467386
Bug: 20037935

(cherry picked from commit 39becb96f0c2ba1823ca0cf046e9f12344f9f3bd)

Change-Id: I3ebdc669dc3085570bb534dce710712bf3ed25e2
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 @@
         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 @@
         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;
       }