summaryrefslogtreecommitdiff
path: root/compiler/optimizing/inliner.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2024-01-04 15:32:27 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2024-01-05 10:48:33 +0000
commit1a6b5b318aa69903a74dd10312a77bd8ee7c4cf6 (patch)
treef3d642409b55a567b88b5aa9b6d7998d0c450d68 /compiler/optimizing/inliner.h
parent853bebba8b6bb910f55894b9b9b0101953678b6c (diff)
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
Diffstat (limited to 'compiler/optimizing/inliner.h')
-rw-r--r--compiler/optimizing/inliner.h12
1 files changed, 11 insertions, 1 deletions
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.