diff options
author | 2014-02-10 23:48:36 -0800 | |
---|---|---|
committer | 2014-02-24 14:24:12 -0800 | |
commit | 6449c62e40ef3a9bb75f664f922555affb532ee4 (patch) | |
tree | 2f1b2120bd648c95dea32b68c8e168e42c8e24fd /compiler/driver/compiler_driver.cc | |
parent | 3fcf18e25241253f23efbeebe77b2a4c4a7c54d3 (diff) |
Create CompilerOptions
Package up most compiler related options in CompilerOptions. Details include:
- Includes compiler filter, method thresholds, SEA IR mode.
- Excludes those needed during Runtime::Init such as CompilerCallbacks and VerificationResults.
- Pass CompilerOptions to CompilerDriver.
- Remove CompilerOptions from Runtime.
- Add ability to pass options for app and image dex2oat to runtime via
-Xcompiler-option and -Ximage-compiler-option respectively.
Other
- Replace 2x CompilerCallbacks implementations with one.
- Factor out execv code for use by both image and oat generation.
- More OatFile error_msg reporting.
- DCHECK for SuspendAll found trying to run valgrind.
Change-Id: Iecb57da907be0c856d00c3cd634b5042a229e620
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r-- | compiler/driver/compiler_driver.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index 5adb792497..530abc8eb4 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -293,14 +293,16 @@ extern "C" art::CompiledMethod* ArtCompileDEX(art::CompilerDriver& compiler, jobject class_loader, const art::DexFile& dex_file); -CompilerDriver::CompilerDriver(VerificationResults* verification_results, +CompilerDriver::CompilerDriver(const CompilerOptions* compiler_options, + VerificationResults* verification_results, DexFileToMethodInlinerMap* method_inliner_map, CompilerBackend::Kind compiler_backend_kind, InstructionSet instruction_set, InstructionSetFeatures instruction_set_features, bool image, DescriptorSet* image_classes, size_t thread_count, bool dump_stats, bool dump_passes, CumulativeLogger* timer) - : verification_results_(verification_results), + : compiler_options_(compiler_options), + verification_results_(verification_results), method_inliner_map_(method_inliner_map), compiler_backend_(CompilerBackend::Create(compiler_backend_kind)), instruction_set_(instruction_set), @@ -325,6 +327,9 @@ CompilerDriver::CompilerDriver(VerificationResults* verification_results, dedupe_mapping_table_("dedupe mapping table"), dedupe_vmap_table_("dedupe vmap table"), dedupe_gc_map_("dedupe gc map") { + DCHECK(compiler_options_ != nullptr); + DCHECK(verification_results_ != nullptr); + DCHECK(method_inliner_map_ != nullptr); CHECK_PTHREAD_CALL(pthread_key_create, (&tls_key_, NULL), "compiler tls key"); @@ -1929,7 +1934,7 @@ void CompilerDriver::CompileMethod(const DexFile::CodeItem* code_item, uint32_t } else if ((access_flags & kAccAbstract) != 0) { } else { MethodReference method_ref(&dex_file, method_idx); - bool compile = VerificationResults::IsCandidateForCompilation(method_ref, access_flags); + bool compile = verification_results_->IsCandidateForCompilation(method_ref, access_flags); if (compile) { // NOTE: if compiler declines to compile this method, it will return NULL. |