From 5247c08fb186a5a2ac02226827cf6b994f41a681 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Fri, 13 Jan 2017 14:17:29 +0000 Subject: Put the resolved class in HLoadClass. To avoid repeated lookups in sharpening/rtp/inlining. Test: test-art-host test-art-target Change-Id: I08d0da36a4bb061cdaa490ea2af3a3217a875bbe --- compiler/optimizing/nodes.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'compiler/optimizing/nodes.cc') diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index 0af0d19849..fa51287dba 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -2440,9 +2440,9 @@ std::ostream& operator<<(std::ostream& os, HInvokeStaticOrDirect::ClinitCheckReq // mirrors, they are stored in a variable size handle scope which is always // visited during a pause. Also, the only caller of this helper // only uses the mirror for pointer comparison. -static inline mirror::Class* AsMirrorInternal(uint64_t address) +static inline mirror::Class* AsMirrorInternal(Handle handle) NO_THREAD_SAFETY_ANALYSIS { - return reinterpret_cast*>(address)->AsMirrorPtr(); + return handle.Get(); } bool HLoadClass::InstructionDataEquals(const HInstruction* other) const { @@ -2455,9 +2455,8 @@ bool HLoadClass::InstructionDataEquals(const HInstruction* other) const { } switch (GetLoadKind()) { case LoadKind::kBootImageAddress: - return GetAddress() == other_load_class->GetAddress(); case LoadKind::kJitTableAddress: - return AsMirrorInternal(GetAddress()) == AsMirrorInternal(other_load_class->GetAddress()); + return AsMirrorInternal(GetClass()) == AsMirrorInternal(other_load_class->GetClass()); default: DCHECK(HasTypeReference(GetLoadKind())); return IsSameDexFile(GetDexFile(), other_load_class->GetDexFile()); -- cgit v1.2.3-59-g8ed1b