From 43e99be9db10111a2d6e094882cd06c248c69e11 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 15 Mar 2017 06:28:52 +0000 Subject: Revert "Revert "Revert "CHA for interface method.""" Breaks libcore tests. This reverts commit 8f301e26943c53485abc2da5ff1907f7c2e0ff0c. Change-Id: Iea46176118be9e05aceb06f2d290961bb1f38265 --- compiler/optimizing/inliner.cc | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'compiler/optimizing') diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc index 419dfa7a6e..3e340908bf 100644 --- a/compiler/optimizing/inliner.cc +++ b/compiler/optimizing/inliner.cc @@ -878,17 +878,6 @@ bool HInliner::TryInlineAndReplace(HInvoke* invoke_instruction, // 1) In the best case, the interface call has one more indirection (to fetch the IMT). // 2) We will not go to the conflict trampoline with an invoke-virtual. // TODO: Consider sharpening once it is not dependent on the compiler driver. - - if (method->IsDefault() && !method->IsCopied()) { - // Changing to invoke-virtual cannot be done on an original default method - // since it's not in any vtable. Devirtualization by exact type/inline-cache - // always uses a method in the iftable which is never an original default - // method. - // On the other hand, inlining an original default method by CHA is fine. - DCHECK(cha_devirtualize); - return false; - } - const DexFile& caller_dex_file = *caller_compilation_unit_.GetDexFile(); uint32_t dex_method_index = FindMethodIndexIn( method, caller_dex_file, invoke_instruction->GetDexMethodIndex()); -- cgit v1.2.3-59-g8ed1b