From 0846a8ffafffdf4c18d52f9896b13f40a1c9828d Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 12 Sep 2018 15:21:07 +0100 Subject: Fix ReplaceUninitializedStringPhis. Move the analysis after redundant phi and dead phi elimination, knowing that only graphs with irreducible loops may still have a phi as input of the invoke. In such a case, we bail. bug: 112537407 Test: 563-checker-fake-string Change-Id: Ib9eefa4ce905b7fb418ca9b2a3c26ea4df74ce8f --- compiler/optimizing/nodes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/nodes.h') diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 218b447370..7921061326 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -129,6 +129,7 @@ enum GraphAnalysisResult { kAnalysisInvalidBytecode, kAnalysisFailThrowCatchLoop, kAnalysisFailAmbiguousArrayOp, + kAnalysisFailIrreducibleLoopAndStringInit, kAnalysisSuccess, }; @@ -4537,8 +4538,7 @@ class HInvokeStaticOrDirect final : public HInvoke { allocator, number_of_arguments, // There is potentially one extra argument for the HCurrentMethod node, and - // potentially one other if the clinit check is explicit, and potentially - // one other if the method is a string factory. + // potentially one other if the clinit check is explicit. (NeedsCurrentMethodInput(dispatch_info.method_load_kind) ? 1u : 0u) + (clinit_check_requirement == ClinitCheckRequirement::kExplicit ? 1u : 0u), return_type, -- cgit v1.2.3-59-g8ed1b