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

This reverts commit bd7eef17de5f3d25f411702f9f260a96455b4cf7.

Bug: 24467386
Bug: 20037935
Change-Id: I04d1d0ffc67661370e4c17911d3b2b105d053bc1
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;
       }