From 0f7dca4ca0be8d2f8776794d35edf8b51b5bc997 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Mon, 2 Nov 2015 14:36:43 +0000 Subject: Optimizing/X86: PC-relative dex cache array addressing. Add PC-relative dex cache array addressing for X86 and use it for better invoke-static/-direct dispatch. Also delay the initialization to the PC-relative base until needed. Change-Id: Ib8634d5edce4920cd70172fd13211809cf6948d1 --- compiler/optimizing/nodes.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/nodes.h') diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index ab53e63300..4c4d0f268d 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -3436,6 +3436,7 @@ class HInvokeStaticOrDirect : public HInvoke { dispatch_info_ = dispatch_info; } + void InsertInputAt(size_t index, HInstruction* input); void RemoveInputAt(size_t index); bool CanDoImplicitNullCheckOn(HInstruction* obj ATTRIBUTE_UNUSED) const OVERRIDE { @@ -3456,7 +3457,7 @@ class HInvokeStaticOrDirect : public HInvoke { bool IsStringInit() const { return GetMethodLoadKind() == MethodLoadKind::kStringInit; } uint32_t GetCurrentMethodInputIndex() const { return GetNumberOfArguments(); } bool HasMethodAddress() const { return GetMethodLoadKind() == MethodLoadKind::kDirectAddress; } - bool HasPcRelDexCache() const { + bool HasPcRelativeDexCache() const { return GetMethodLoadKind() == MethodLoadKind::kDexCachePcRelative; } bool HasCurrentMethodInput() const { @@ -3484,7 +3485,7 @@ class HInvokeStaticOrDirect : public HInvoke { } uint32_t GetDexCacheArrayOffset() const { - DCHECK(HasPcRelDexCache()); + DCHECK(HasPcRelativeDexCache()); return dispatch_info_.method_load_data; } -- cgit v1.2.3-59-g8ed1b