summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2019-02-19 15:09:35 +0000
committer Vladimir Marko <vmarko@google.com> 2019-02-20 10:40:05 +0000
commit038924b75f06b91c2a7e944196ca11f118ce182f (patch)
treefb3073918686ec6f54dce65d2697c0e46f05a272 /compiler/driver/compiler_driver.cc
parent03c6b174a4e412e9bb62935c4ee15b5445e517f2 (diff)
ART: Reduce dependencies on CompilerDriver.
Preparation for moving CompilerDriver and other stuff from libart-compiler.so to dex2oat. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: Ic221ebca4b8c79dd1549316921ace655f2e3f0fe
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r--compiler/driver/compiler_driver.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index f39d8fc896..e9a3d550d9 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -258,7 +258,7 @@ CompilerDriver::CompilerDriver(
size_t thread_count,
int swap_fd)
: compiler_options_(compiler_options),
- compiler_(Compiler::Create(this, compiler_kind)),
+ compiler_(),
compiler_kind_(compiler_kind),
number_of_soft_verifier_failures_(0),
had_hard_verifier_failure_(false),
@@ -269,9 +269,8 @@ CompilerDriver::CompilerDriver(
dex_to_dex_compiler_(this) {
DCHECK(compiler_options_ != nullptr);
- compiler_->Init();
-
compiled_method_storage_.SetDedupeEnabled(compiler_options_->DeduplicateCode());
+ compiler_.reset(Compiler::Create(*compiler_options, &compiled_method_storage_, compiler_kind));
}
CompilerDriver::~CompilerDriver() {
@@ -281,7 +280,6 @@ CompilerDriver::~CompilerDriver() {
CompiledMethod::ReleaseSwapAllocatedCompiledMethod(GetCompiledMethodStorage(), method);
}
});
- compiler_->UnInit();
}