diff options
Diffstat (limited to 'compiler/optimizing/inliner.h')
-rw-r--r-- | compiler/optimizing/inliner.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/compiler/optimizing/inliner.h b/compiler/optimizing/inliner.h index e33160efac..712d3b5323 100644 --- a/compiler/optimizing/inliner.h +++ b/compiler/optimizing/inliner.h @@ -42,7 +42,8 @@ class HInliner : public HOptimization { size_t total_number_of_dex_registers, size_t total_number_of_instructions, HInliner* parent, - size_t depth = 0, + size_t depth, + bool try_catch_inlining_allowed, const char* name = kInlinerPassName) : HOptimization(outer_graph, name, stats), outermost_graph_(outermost_graph), @@ -54,6 +55,7 @@ class HInliner : public HOptimization { parent_(parent), depth_(depth), inlining_budget_(0), + try_catch_inlining_allowed_(try_catch_inlining_allowed), inline_stats_(nullptr) {} bool Run() override; @@ -91,7 +93,7 @@ class HInliner : public HOptimization { ArtMethod* resolved_method, ReferenceTypeInfo receiver_type, HInstruction** return_replacement) - REQUIRES_SHARED(Locks::mutator_lock_); + REQUIRES_SHARED(Locks::mutator_lock_); // Substitutes parameters in the callee graph with their values from the caller. void SubstituteArguments(HGraph* callee_graph, @@ -103,8 +105,9 @@ class HInliner : public HOptimization { // Run simple optimizations on `callee_graph`. void RunOptimizations(HGraph* callee_graph, const dex::CodeItem* code_item, - const DexCompilationUnit& dex_compilation_unit) - REQUIRES_SHARED(Locks::mutator_lock_); + const DexCompilationUnit& dex_compilation_unit, + bool try_catch_inlining_allowed_for_recursive_inline) + REQUIRES_SHARED(Locks::mutator_lock_); // Try to recognize known simple patterns and replace invoke call with appropriate instructions. bool TryPatternSubstitution(HInvoke* invoke_instruction, @@ -318,6 +321,9 @@ class HInliner : public HOptimization { // The budget left for inlining, in number of instructions. size_t inlining_budget_; + // States if we are allowing try catch inlining to occur at this particular instance of inlining. + bool try_catch_inlining_allowed_; + // Used to record stats about optimizations on the inlined graph. // If the inlining is successful, these stats are merged to the caller graph's stats. OptimizingCompilerStats* inline_stats_; |