summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_options.h
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-06-17 16:36:07 -0700
committerAndreas Gampe <agampe@google.com>2014-06-18 20:19:58 -0700
commit5655e84e8d71697d8ef3ea901a0b853af42c559e (patch)
tree3c00ffd42ad1465acc12128e41fe4ca1d46d5f39 /compiler/driver/compiler_options.h
parentad6a328506e30b7feb8ddfd2867dec7633a3e52b (diff)
ART: Implicit checks in the compiler are independent from Runtime
When cross-compiling, those flags are independent. This is an initial CL that helps bypass fatal failures when cross-compiling, as not all architectures support (and have turned on) implicit checks. The actual transport for the target architecture when it is different from the runtime needs to be implemented in a follow-up CL. Bug: 15703710 Change-Id: Idc881a9a4abfd38643b862a491a5af9b8841f693
Diffstat (limited to 'compiler/driver/compiler_options.h')
-rw-r--r--compiler/driver/compiler_options.h42
1 files changed, 39 insertions, 3 deletions
diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h
index 5d1c5dadaf..fb3341ba71 100644
--- a/compiler/driver/compiler_options.h
+++ b/compiler/driver/compiler_options.h
@@ -53,7 +53,10 @@ class CompilerOptions {
num_dex_methods_threshold_(kDefaultNumDexMethodsThreshold),
generate_gdb_information_(false),
top_k_profile_threshold_(kDefaultTopKProfileThreshold),
- include_debug_symbols_(kDefaultIncludeDebugSymbols)
+ include_debug_symbols_(kDefaultIncludeDebugSymbols),
+ explicit_null_checks_(true),
+ explicit_so_checks_(true),
+ explicit_suspend_checks_(true)
#ifdef ART_SEA_IR_MODE
, sea_ir_mode_(false)
#endif
@@ -67,7 +70,10 @@ class CompilerOptions {
size_t num_dex_methods_threshold,
bool generate_gdb_information,
double top_k_profile_threshold,
- bool include_debug_symbols
+ bool include_debug_symbols,
+ bool explicit_null_checks,
+ bool explicit_so_checks,
+ bool explicit_suspend_checks
#ifdef ART_SEA_IR_MODE
, bool sea_ir_mode
#endif
@@ -80,7 +86,10 @@ class CompilerOptions {
num_dex_methods_threshold_(num_dex_methods_threshold),
generate_gdb_information_(generate_gdb_information),
top_k_profile_threshold_(top_k_profile_threshold),
- include_debug_symbols_(include_debug_symbols)
+ include_debug_symbols_(include_debug_symbols),
+ explicit_null_checks_(explicit_null_checks),
+ explicit_so_checks_(explicit_so_checks),
+ explicit_suspend_checks_(explicit_suspend_checks)
#ifdef ART_SEA_IR_MODE
, sea_ir_mode_(sea_ir_mode)
#endif
@@ -147,6 +156,30 @@ class CompilerOptions {
return include_debug_symbols_;
}
+ bool GetExplicitNullChecks() const {
+ return explicit_null_checks_;
+ }
+
+ void SetExplicitNullChecks(bool new_val) {
+ explicit_null_checks_ = new_val;
+ }
+
+ bool GetExplicitStackOverflowChecks() const {
+ return explicit_so_checks_;
+ }
+
+ void SetExplicitStackOverflowChecks(bool new_val) {
+ explicit_so_checks_ = new_val;
+ }
+
+ bool GetExplicitSuspendChecks() const {
+ return explicit_suspend_checks_;
+ }
+
+ void SetExplicitSuspendChecks(bool new_val) {
+ explicit_suspend_checks_ = new_val;
+ }
+
#ifdef ART_SEA_IR_MODE
bool GetSeaIrMode();
#endif
@@ -166,6 +199,9 @@ class CompilerOptions {
// When using a profile file only the top K% of the profiled samples will be compiled.
double top_k_profile_threshold_;
bool include_debug_symbols_;
+ bool explicit_null_checks_;
+ bool explicit_so_checks_;
+ bool explicit_suspend_checks_;
#ifdef ART_SEA_IR_MODE
bool sea_ir_mode_;
#endif