summaryrefslogtreecommitdiffstats
path: root/compiler
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-10-21 16:40:31 -0700
committerSteve Kondik <steve@cyngn.com>2015-10-21 16:40:31 -0700
commit2e5131ce0db9a11be1406d4e6b5a27993a0d1bd5 (patch)
tree9815069c209d5b9a4a86156592585f2fba79799f /compiler
parentead3f39d3e80a90a1863e79822bf5acfae50e9ca (diff)
parent7f0ee796911440a825aaf5d69b7d861893529a4a (diff)
downloadart-2e5131ce0db9a11be1406d4e6b5a27993a0d1bd5.zip
art-2e5131ce0db9a11be1406d4e6b5a27993a0d1bd5.tar.gz
art-2e5131ce0db9a11be1406d4e6b5a27993a0d1bd5.tar.bz2
Merge branch 'm' of git://codeaurora.org/platform/art into cm-13.0
Diffstat (limited to 'compiler')
-rw-r--r--compiler/dex/quick/quick_compiler.cc8
-rw-r--r--compiler/dex/quick/quick_compiler.h5
2 files changed, 5 insertions, 8 deletions
diff --git a/compiler/dex/quick/quick_compiler.cc b/compiler/dex/quick/quick_compiler.cc
index 7bec181..43f96d9 100644
--- a/compiler/dex/quick/quick_compiler.cc
+++ b/compiler/dex/quick/quick_compiler.cc
@@ -59,6 +59,9 @@ 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");
+// check the pass status for early bail out
+thread_local bool check_bail_out;
+
// Additional disabled optimizations (over generally disabled) per instruction set.
static constexpr uint32_t kDisabledOptimizationsPerISA[] = {
// 0 = kNone.
@@ -730,11 +733,11 @@ CompiledMethod* QuickCompiler::Compile(const DexFile::CodeItem* code_item,
PassDriverMEOpts pass_driver(GetPreOptPassManager(), GetPostOptPassManager(), &cu);
pass_driver.Launch();
- if (GetCheckBailOutFlag() && cu.mir_graph->PassFailed()) {
+ if (check_bail_out && cu.mir_graph->PassFailed()) {
return nullptr;
}
- if (GetCheckBailOutFlag()) {
+ if (check_bail_out) {
VLOG(compiler) << "fast compile applied to " << PrettyMethod(method_idx, dex_file);
}
@@ -866,7 +869,6 @@ QuickCompiler::QuickCompiler(CompilerDriver* driver) : Compiler(driver, 100) {
if (pass_manager_options->GetPrintPassOptions()) {
PassDriverMEPostOpt::PrintPassOptions(post_opt_pass_manager_.get());
}
- check_bail_out_ = false;
}
QuickCompiler::~QuickCompiler() {
diff --git a/compiler/dex/quick/quick_compiler.h b/compiler/dex/quick/quick_compiler.h
index ac2d11b..e545b55 100644
--- a/compiler/dex/quick/quick_compiler.h
+++ b/compiler/dex/quick/quick_compiler.h
@@ -73,17 +73,12 @@ class QuickCompiler : public Compiler {
bool CheckMoreConditions(CompilationUnit* cu) const QC_WEAK;
- void SetCheckBailOutFlag() { check_bail_out_ = true; }
- void ResetCheckBailOutFlag() { check_bail_out_ = false; }
- bool GetCheckBailOutFlag() const { return check_bail_out_; }
-
protected:
explicit QuickCompiler(CompilerDriver* driver);
private:
std::unique_ptr<PassManager> pre_opt_pass_manager_;
std::unique_ptr<PassManager> post_opt_pass_manager_;
- bool check_bail_out_;
DISALLOW_COPY_AND_ASSIGN(QuickCompiler);
};