summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2013-12-13 13:59:30 +0000
committer Vladimir Marko <vmarko@google.com> 2013-12-17 11:03:53 +0000
commit2b5eaa2b49f7489bafdadc4b4463ae27e4261817 (patch)
treeada8b60989919068d562e3fcee01aa5b7c5cfc61 /compiler/driver/compiler_driver.h
parent0bf1f266869776c2dd21b3242599d74ac80855f0 (diff)
Move compiler code out of method verifier.
We want to detect small methods for inlining at the end of the method verification. Instead of adding more compiler code to the runtime, we create a callback from the runtime into the compiler, so that we can keep the code there. Additionally, we move the compiler-related code that was already in the method verifier to the compiler since it doesn't really belong to the runtime in the first place. Change-Id: I708ca13227c809e07917ff3879a89722017e83a9
Diffstat (limited to 'compiler/driver/compiler_driver.h')
-rw-r--r--compiler/driver/compiler_driver.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h
index 7e8184975c..14bfde672d 100644
--- a/compiler/driver/compiler_driver.h
+++ b/compiler/driver/compiler_driver.h
@@ -43,6 +43,7 @@ class ParallelCompilationManager;
class DexCompilationUnit;
class OatWriter;
class TimingLogger;
+class VerifiedMethodsData;
enum CompilerBackend {
kQuick,
@@ -90,7 +91,8 @@ class CompilerDriver {
// enabled. "image_classes" lets the compiler know what classes it
// can assume will be in the image, with NULL implying all available
// classes.
- explicit CompilerDriver(CompilerBackend compiler_backend, InstructionSet instruction_set,
+ explicit CompilerDriver(VerifiedMethodsData* verified_methods_data,
+ CompilerBackend compiler_backend, InstructionSet instruction_set,
InstructionSetFeatures instruction_set_features,
bool image, DescriptorSet* image_classes,
size_t thread_count, bool dump_stats);
@@ -105,6 +107,10 @@ class CompilerDriver {
void CompileOne(const mirror::ArtMethod* method, TimingLogger& timings)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ VerifiedMethodsData* GetVerifiedMethodsData() const {
+ return verified_methods_data_;
+ }
+
const InstructionSet& GetInstructionSet() const {
return instruction_set_;
}
@@ -390,6 +396,8 @@ class CompilerDriver {
std::vector<const PatchInformation*> code_to_patch_;
std::vector<const PatchInformation*> methods_to_patch_;
+ VerifiedMethodsData* verified_methods_data_;
+
CompilerBackend compiler_backend_;
const InstructionSet instruction_set_;