From 8d34a182fea1b24f7b8361b55e930cb953cf3fb2 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 16 Sep 2020 09:46:58 +0100 Subject: Change interface conflict stub to take the interface method. To avoid doing dex cache lookup, pass the interface method instead. This costs a few hundred KBs on speed compiled APKs (< 0.5% code size), but improves performance when hitting a conflict (as seen on dogfood data). For nterp, we currently pass the conflict method instead of the interface method. We need to handle default methods before optimizing it. This removes our last use of dex cache in compiled code. A follow-up CL will remove the NeedsDexCacheOfDeclaringClass from HInvokeInterface. Test: test.py Change-Id: I3cdd4543ad7d904b3e81950af46a48a48af6991a --- compiler/optimizing/instruction_simplifier.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/optimizing/instruction_simplifier.cc') diff --git a/compiler/optimizing/instruction_simplifier.cc b/compiler/optimizing/instruction_simplifier.cc index d616912b9f..d7d5b597c0 100644 --- a/compiler/optimizing/instruction_simplifier.cc +++ b/compiler/optimizing/instruction_simplifier.cc @@ -2311,7 +2311,7 @@ void InstructionSimplifierVisitor::SimplifySystemArrayCopy(HInvoke* instruction) // is unlikely that it exists. The most usual situation for such typed // arraycopy methods is a direct pointer to the boot image. invoke->SetDispatchInfo( - HSharpening::SharpenInvokeStaticOrDirect(method, /* has_method_id= */ true, codegen_)); + HSharpening::SharpenLoadMethod(method, /* has_method_id= */ true, codegen_)); } } } -- cgit v1.2.3-59-g8ed1b