summaryrefslogtreecommitdiff
path: root/compiler/optimizing
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2025-02-17 14:21:07 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2025-02-18 07:19:47 -0800
commitcb3c3b2819f326d54a6bd960a9a82c5290aa69b0 (patch)
tree1b71adef87aeebc9bdf92f6c66330c3a31fa1877 /compiler/optimizing
parentb4d4a7c4c368272c4368db35ddffbd8fcab544fb (diff)
Do not inline a method that was marked as un-compilable.
The compiler may have internally mark a method as not compilable. Do not clear the verification results from the compiler callbacks, we still need them during compilation. Test: 860-vdex-failure Bug: 395243275 Change-Id: I79ba61eb8a7ba6729b22c4c27fa83d8373fce03a
Diffstat (limited to 'compiler/optimizing')
-rw-r--r--compiler/optimizing/inliner.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index be8bc69de0..251867d512 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -22,6 +22,7 @@
#include "builder.h"
#include "class_linker.h"
#include "class_root-inl.h"
+#include "compiler_callbacks.h"
#include "constant_folding.h"
#include "data_type-inl.h"
#include "dead_code_elimination.h"
@@ -407,10 +408,15 @@ static bool IsMethodVerified(ArtMethod* method)
// At runtime, we know this is cold code if the class is not verified, so don't
// bother analyzing.
if (Runtime::Current()->IsAotCompiler()) {
- if (method->GetDeclaringClass()->IsVerifiedNeedsAccessChecks() ||
- method->GetDeclaringClass()->ShouldVerifyAtRuntime()) {
+ if (method->GetDeclaringClass()->IsVerifiedNeedsAccessChecks()) {
+ DCHECK(!Runtime::Current()->GetCompilerCallbacks()->IsUncompilableMethod(
+ MethodReference(method->GetDexFile(), method->GetDexMethodIndex())));
return true;
}
+ if (method->GetDeclaringClass()->ShouldVerifyAtRuntime()) {
+ return !Runtime::Current()->GetCompilerCallbacks()->IsUncompilableMethod(
+ MethodReference(method->GetDexFile(), method->GetDexMethodIndex()));
+ }
}
return false;
}