From 358bb39bb1276d93c0fd475373aa03640109c520 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Tue, 25 Jul 2023 12:42:58 +0100 Subject: Small cleanup in HLoadClass. Be consistent when checking bss kind. Test: m Change-Id: If6f6c06d79fba8caea8dded962c20f34f553dc7f --- compiler/optimizing/nodes.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'compiler/optimizing/nodes.h') diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index dec86e30dd..9f085acdb3 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -7020,17 +7020,15 @@ class HLoadClass final : public HInstruction { bool CanCallRuntime() const { return NeedsAccessCheck() || MustGenerateClinitCheck() || - GetLoadKind() == LoadKind::kRuntimeCall || - GetLoadKind() == LoadKind::kBssEntry; + NeedsBss() || + GetLoadKind() == LoadKind::kRuntimeCall; } bool CanThrow() const override { return NeedsAccessCheck() || MustGenerateClinitCheck() || // If the class is in the boot image, the lookup in the runtime call cannot throw. - ((GetLoadKind() == LoadKind::kRuntimeCall || - GetLoadKind() == LoadKind::kBssEntry) && - !IsInBootImage()); + ((GetLoadKind() == LoadKind::kRuntimeCall || NeedsBss()) && !IsInBootImage()); } ReferenceTypeInfo GetLoadedClassRTI() { -- cgit v1.2.3-59-g8ed1b