summaryrefslogtreecommitdiff
path: root/compiler/optimizing/inliner.h
diff options
context:
space:
mode:
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 5e68dd866e..48600543c6 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),
@@ -64,6 +66,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,
@@ -109,6 +117,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)
@@ -321,9 +330,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.