From 1a6b5b318aa69903a74dd10312a77bd8ee7c4cf6 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Thu, 4 Jan 2024 15:32:27 +0000 Subject: Reland "Run optimizations with baseline compilation." This reverts commit c8309515d099992b7cab8f2b8c6db3ed77671ff4. Bug: 313040662 Reason for revert: remove call to slow path on back edges. Change-Id: I3fe52295afcb0be4b4062f8d9060adb4abb64375 --- compiler/optimizing/inliner.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/inliner.h') diff --git a/compiler/optimizing/inliner.h b/compiler/optimizing/inliner.h index af067dae73..a001404268 100644 --- a/compiler/optimizing/inliner.h +++ b/compiler/optimizing/inliner.h @@ -43,6 +43,7 @@ class HInliner : public HOptimization { size_t total_number_of_dex_registers, size_t total_number_of_instructions, HInliner* parent, + HEnvironment* caller_environment, size_t depth, bool try_catch_inlining_allowed, const char* name = kInlinerPassName) @@ -54,6 +55,7 @@ class HInliner : public HOptimization { total_number_of_dex_registers_(total_number_of_dex_registers), total_number_of_instructions_(total_number_of_instructions), parent_(parent), + caller_environment_(caller_environment), depth_(depth), inlining_budget_(0), try_catch_inlining_allowed_(try_catch_inlining_allowed), @@ -63,6 +65,12 @@ class HInliner : public HOptimization { static constexpr const char* kInlinerPassName = "inliner"; + const HInliner* GetParent() const { return parent_; } + const HEnvironment* GetCallerEnvironment() const { return caller_environment_; } + + const HGraph* GetOutermostGraph() const { return outermost_graph_; } + const HGraph* GetGraph() const { return graph_; } + private: enum InlineCacheType { kInlineCacheNoData = 0, @@ -108,6 +116,7 @@ class HInliner : public HOptimization { // Run simple optimizations on `callee_graph`. void RunOptimizations(HGraph* callee_graph, + HEnvironment* caller_environment, const dex::CodeItem* code_item, const DexCompilationUnit& dex_compilation_unit, bool try_catch_inlining_allowed_for_recursive_inline) @@ -320,9 +329,10 @@ class HInliner : public HOptimization { const size_t total_number_of_dex_registers_; size_t total_number_of_instructions_; - // The 'parent' inliner, that means the inlinigng optimization that requested + // The 'parent' inliner, that means the inlining optimization that requested // `graph_` to be inlined. const HInliner* const parent_; + const HEnvironment* const caller_environment_; const size_t depth_; // The budget left for inlining, in number of instructions. -- cgit v1.2.3-59-g8ed1b