From 6449c62e40ef3a9bb75f664f922555affb532ee4 Mon Sep 17 00:00:00 2001 From: Brian Carlstrom Date: Mon, 10 Feb 2014 23:48:36 -0800 Subject: 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 --- compiler/driver/compiler_driver.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'compiler/driver/compiler_driver.h') diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h index 092fe52b24..5009779bed 100644 --- a/compiler/driver/compiler_driver.h +++ b/compiler/driver/compiler_driver.h @@ -45,6 +45,7 @@ class MethodVerifier; } // namespace verifier class AOTCompilationStats; +class CompilerOptions; class DexCompilationUnit; class DexFileToMethodInlinerMap; class InlineIGetIPutData; @@ -94,7 +95,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(VerificationResults* verification_results, + explicit CompilerDriver(const CompilerOptions* compiler_options, + VerificationResults* verification_results, DexFileToMethodInlinerMap* method_inliner_map, CompilerBackend::Kind compiler_backend_kind, InstructionSet instruction_set, @@ -129,6 +131,11 @@ class CompilerDriver { return instruction_set_features_; } + const CompilerOptions& GetCompilerOptions() const { + DCHECK(compiler_options_ != nullptr); + return *compiler_options_; + } + CompilerBackend* GetCompilerBackend() const { return compiler_backend_.get(); } @@ -551,6 +558,7 @@ class CompilerDriver { std::vector methods_to_patch_; std::vector classes_to_patch_; + const CompilerOptions* compiler_options_; VerificationResults* verification_results_; DexFileToMethodInlinerMap* method_inliner_map_; -- cgit v1.2.3-59-g8ed1b