From 7f515181fdbe88a139d973d3481964d9cb7ed118 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Fri, 24 Nov 2023 12:02:13 +0100 Subject: Simplify boxing followed by unboxing. Also mark boxing `valueOf()` intrinsics as never null to avoid creating unnecessary `HNullCheck` instructions. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: I86e7721e3af6c59407aa2ddfc1bd11bd2fdac83c --- compiler/optimizing/nodes.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'compiler/optimizing/nodes.h') diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 04d51328f2..4db72a68e3 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -5065,9 +5065,7 @@ class HInvokeStaticOrDirect final : public HInvoke { return false; } - bool CanBeNull() const override { - return GetType() == DataType::Type::kReference && !IsStringInit(); - } + bool CanBeNull() const override; MethodLoadKind GetMethodLoadKind() const { return dispatch_info_.method_load_kind; } CodePtrLocation GetCodePtrLocation() const { -- cgit v1.2.3-59-g8ed1b