diff options
author | 2021-07-14 14:59:25 +0100 | |
---|---|---|
committer | 2021-07-14 17:13:08 +0000 | |
commit | 9e050ab1a061d9660eb0c1daa01a823ad75b0f05 (patch) | |
tree | 714f2ba3b11406310416e85357f45450634846b2 /compiler/optimizing/inliner.cc | |
parent | 4f990714b13e0b4446305a5411648a1a9ae42a7a (diff) |
Remove the need of VerifiedMethod in the compiler.
The compiler only needs to know if a method is compilable or not. So
just record a set of uncompilable methods (in some cases, we cannot have
an ArtMethod, but the method can still be compiled).
Test: test.py
Bug: 28313047
Change-Id: Ic4235bc8160ec91daa5ebf6504741089b43e99cb
Diffstat (limited to 'compiler/optimizing/inliner.cc')
-rw-r--r-- | compiler/optimizing/inliner.cc | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc index 664126a54d..74eae430ad 100644 --- a/compiler/optimizing/inliner.cc +++ b/compiler/optimizing/inliner.cc @@ -26,8 +26,6 @@ #include "data_type-inl.h" #include "dead_code_elimination.h" #include "dex/inline_method_analyser.h" -#include "dex/verification_results.h" -#include "dex/verified_method.h" #include "driver/compiler_options.h" #include "driver/dex_compilation_unit.h" #include "instruction_simplifier.h" @@ -388,24 +386,9 @@ static bool IsMethodUnverified(const CompilerOptions& compiler_options, ArtMetho // We're at runtime, we know this is cold code if the class // is not verified, so don't bother analyzing. return true; - } - uint16_t class_def_idx = method->GetDeclaringClass()->GetDexClassDefIndex(); - - const VerifiedMethod* verified_method = - compiler_options.GetVerifiedMethod(method->GetDexFile(), method->GetDexMethodIndex()); - if (verified_method != nullptr && verified_method->HasRuntimeThrow()) { - // Compiler doesn't handle dead code as nicely as verifier. + } else if (!method->GetDeclaringClass()->IsVerifiedNeedsAccessChecks()) { return true; } - if (!compiler_options.IsMethodVerifiedWithoutFailures(method->GetDexMethodIndex(), - class_def_idx, - *method->GetDexFile())) { - if (verified_method == nullptr || - !verifier::CanCompilerHandleVerificationFailure( - verified_method->GetEncounteredVerificationFailures())) { - return true; - } - } } return false; } |