diff options
-rw-r--r-- | compiler/dex/quick/quick_compiler.cc | 8 | ||||
-rw-r--r-- | compiler/dex/quick/quick_compiler.h | 5 | ||||
-rw-r--r-- | runtime/arch/arm64/instruction_set_features_arm64.cc | 2 |
3 files changed, 6 insertions, 9 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); }; diff --git a/runtime/arch/arm64/instruction_set_features_arm64.cc b/runtime/arch/arm64/instruction_set_features_arm64.cc index 395cee8..613bb5c 100644 --- a/runtime/arch/arm64/instruction_set_features_arm64.cc +++ b/runtime/arch/arm64/instruction_set_features_arm64.cc @@ -39,7 +39,7 @@ const Arm64InstructionSetFeatures* Arm64InstructionSetFeatures::FromVariant( if (!needs_a53_835769_fix) { // Check to see if this is an expected variant. static const char* arm64_known_variants[] = { - "denver64" + "denver64", "kryo" }; if (!FindVariantInArray(arm64_known_variants, arraysize(arm64_known_variants), variant)) { std::ostringstream os; |