Don't mark speculatively failed inlines as always throws

If we don't inline an always throwing invoke through inline caches,
don't mark it as 'always throwing' since it may not always throw
in other instances.

Bug: 241199625
Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b
Change-Id: I4cb7edaa4716bd1722fba2bef39f31903bf9238e
diff --git a/compiler/optimizing/inliner.h b/compiler/optimizing/inliner.h
index 712d3b5..581f524 100644
--- a/compiler/optimizing/inliner.h
+++ b/compiler/optimizing/inliner.h
@@ -80,20 +80,23 @@
   bool TryInlineAndReplace(HInvoke* invoke_instruction,
                            ArtMethod* resolved_method,
                            ReferenceTypeInfo receiver_type,
-                           bool do_rtp)
+                           bool do_rtp,
+                           bool is_speculative)
     REQUIRES_SHARED(Locks::mutator_lock_);
 
   bool TryBuildAndInline(HInvoke* invoke_instruction,
                          ArtMethod* resolved_method,
                          ReferenceTypeInfo receiver_type,
-                         HInstruction** return_replacement)
+                         HInstruction** return_replacement,
+                         bool is_speculative)
     REQUIRES_SHARED(Locks::mutator_lock_);
 
   bool TryBuildAndInlineHelper(HInvoke* invoke_instruction,
                                ArtMethod* resolved_method,
                                ReferenceTypeInfo receiver_type,
-                               HInstruction** return_replacement)
-      REQUIRES_SHARED(Locks::mutator_lock_);
+                               HInstruction** return_replacement,
+                               bool is_speculative)
+    REQUIRES_SHARED(Locks::mutator_lock_);
 
   // Substitutes parameters in the callee graph with their values from the caller.
   void SubstituteArguments(HGraph* callee_graph,
@@ -144,7 +147,8 @@
   // inlining, such as inlining a throw instruction into a try block.
   bool CanInlineBody(const HGraph* callee_graph,
                      HInvoke* invoke,
-                     size_t* out_number_of_instructions) const
+                     size_t* out_number_of_instructions,
+                     bool is_speculative) const
     REQUIRES_SHARED(Locks::mutator_lock_);
 
   // Create a new HInstanceFieldGet.