summaryrefslogtreecommitdiffstats
path: root/compiler/dex/quick/quick_compiler.cc
diff options
context:
space:
mode:
authorSimon Shields <keepcalm444@gmail.com>2015-12-06 12:26:48 +1100
committerSimon Shields <keepcalm444@gmail.com>2015-12-06 21:40:28 +1100
commit29bd42b5eb0382360e3a8cb646ccf4de4b3b1d5a (patch)
tree55f88c2f7af8e45ac56367dc98032f8ff5a5a6bc /compiler/dex/quick/quick_compiler.cc
parent7890e2edd305ddacfe76b37337cdbe95bcd588f8 (diff)
downloadart-29bd42b5eb0382360e3a8cb646ccf4de4b3b1d5a.tar.gz
art-29bd42b5eb0382360e3a8cb646ccf4de4b3b1d5a.tar.bz2
art-29bd42b5eb0382360e3a8cb646ccf4de4b3b1d5a.zip
art: allow devices to disable CAF bailout patches
these patches seem to break dex2oat on some non-qcom boards Change-Id: Ib70ca7e12d45ea49cbfa3f6acd04fe4a7f015055
Diffstat (limited to 'compiler/dex/quick/quick_compiler.cc')
-rw-r--r--compiler/dex/quick/quick_compiler.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler/dex/quick/quick_compiler.cc b/compiler/dex/quick/quick_compiler.cc
index 4469b51497..0e9d268681 100644
--- a/compiler/dex/quick/quick_compiler.cc
+++ b/compiler/dex/quick/quick_compiler.cc
@@ -59,8 +59,10 @@ static_assert(5U == static_cast<size_t>(kX86_64), "kX86_64 not 5");
static_assert(6U == static_cast<size_t>(kMips), "kMips not 6");
static_assert(7U == static_cast<size_t>(kMips64), "kMips64 not 7");
+#ifndef DISABLE_CAF_BAILOUT
// check the pass status for early bail out
thread_local bool check_bail_out;
+#endif
// Additional disabled optimizations (over generally disabled) per instruction set.
static constexpr uint32_t kDisabledOptimizationsPerISA[] = {
@@ -732,11 +734,19 @@ CompiledMethod* QuickCompiler::Compile(const DexFile::CodeItem* code_item,
PassDriverMEOpts pass_driver(GetPreOptPassManager(), GetPostOptPassManager(), &cu);
pass_driver.Launch();
+#ifndef DISABLE_CAF_BAILOUT
if (check_bail_out && cu.mir_graph->PassFailed()) {
+#else
+ if (GetCheckBailOutFlag() && cu.mir_graph->PassFailed()) {
+#endif
return nullptr;
}
+#ifndef DISABLE_CAF_BAILOUT
if (check_bail_out) {
+#else
+ if (GetCheckBailOutFlag()) {
+#endif
VLOG(compiler) << "fast compile applied to " << PrettyMethod(method_idx, dex_file);
}
@@ -868,6 +878,9 @@ QuickCompiler::QuickCompiler(CompilerDriver* driver) : Compiler(driver, 100) {
if (pass_manager_options->GetPrintPassOptions()) {
PassDriverMEPostOpt::PrintPassOptions(post_opt_pass_manager_.get());
}
+#ifdef DISABLE_CAF_BAILOUT
+ check_bail_out_ = false;
+#endif
}
QuickCompiler::~QuickCompiler() {