diff options
author | Vladimir Marko <vmarko@google.com> | 2018-11-30 17:01:50 +0000 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2018-12-06 16:26:43 +0000 |
commit | 2afaff7e9171992b0e2e95d0f485782d28e1b9dc (patch) | |
tree | 96c7ea4a13e8a9a191d58002de89fb005231980e /compiler/driver/compiler_options.h | |
parent | 6a98f89c4ad645b04d6c80d3d7e260c59bf6f193 (diff) |
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
Diffstat (limited to 'compiler/driver/compiler_options.h')
-rw-r--r-- | compiler/driver/compiler_options.h | 15 |
1 files changed, 15 insertions, 0 deletions
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<std::string>& 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<std::string> image_classes_; + // Results of AOT verification. + const VerificationResults* verification_results_; + ImageType image_type_; bool compiling_with_core_image_; bool baseline_; |