From 2afaff7e9171992b0e2e95d0f485782d28e1b9dc Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Fri, 30 Nov 2018 17:01:50 +0000 Subject: Refactor CompilerDriver::CompileAll(). Treat verification results and image classes as mutable only in CompilerDriver::PreCompile(), and treat them as immutable during compilation, accessed through the CompilerOptions. This severs the dependency of the inliner on the CompilerDriver. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: I594a0213ca6a5003c19b4bd488af98db4358d51d --- compiler/driver/compiler_options.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'compiler/driver/compiler_options.h') diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h index a8f246dcab..bd12bf7dda 100644 --- a/compiler/driver/compiler_options.h +++ b/compiler/driver/compiler_options.h @@ -47,6 +47,8 @@ class DexFile; enum class InstructionSet; class InstructionSetFeatures; class ProfileCompilationInfo; +class VerificationResults; +class VerifiedMethod; // Enum for CheckProfileMethodsCompiled. Outside CompilerOptions so it can be forward-declared. enum class ProfileMethodsCheck : uint8_t { @@ -283,6 +285,16 @@ class CompilerOptions final { bool IsImageClass(const char* descriptor) const; + const VerificationResults* GetVerificationResults() const; + + const VerifiedMethod* GetVerifiedMethod(const DexFile* dex_file, uint32_t method_idx) const; + + // Checks if the specified method has been verified without failures. Returns + // false if the method is not in the verification results (GetVerificationResults). + bool IsMethodVerifiedWithoutFailures(uint32_t method_idx, + uint16_t class_def_idx, + const DexFile& dex_file) const; + bool ParseCompilerOptions(const std::vector& options, bool ignore_unrecognized, std::string* error_msg); @@ -381,6 +393,9 @@ class CompilerOptions final { // Must not be empty for real boot image, only for tests pretending to compile boot image. HashSet image_classes_; + // Results of AOT verification. + const VerificationResults* verification_results_; + ImageType image_type_; bool compiling_with_core_image_; bool baseline_; -- cgit v1.2.3-59-g8ed1b