diff options
Diffstat (limited to 'compiler/optimizing/inliner.h')
| -rw-r--r-- | compiler/optimizing/inliner.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/compiler/optimizing/inliner.h b/compiler/optimizing/inliner.h index 3c01751a70..0127d55192 100644 --- a/compiler/optimizing/inliner.h +++ b/compiler/optimizing/inliner.h @@ -65,6 +65,20 @@ class HInliner : public HOptimization { bool TryInline(HInvoke* invoke_instruction, ArtMethod* resolved_method, bool do_rtp = true) SHARED_REQUIRES(Locks::mutator_lock_); + // Try to recognize known simple patterns and replace invoke call with appropriate instructions. + bool TryPatternSubstitution(HInvoke* invoke_instruction, ArtMethod* resolved_method, bool do_rtp) + SHARED_REQUIRES(Locks::mutator_lock_); + + // Create a new HInstanceFieldGet. + HInstanceFieldGet* CreateInstanceFieldGet(ArtMethod* resolved_method, + uint32_t field_index, + HInstruction* obj); + // Create a new HInstanceFieldSet. + HInstanceFieldSet* CreateInstanceFieldSet(ArtMethod* resolved_method, + uint32_t field_index, + HInstruction* obj, + HInstruction* value); + // Try to inline the target of a monomorphic call. If successful, the code // in the graph will look like: // if (receiver.getClass() != ic.GetMonomorphicType()) deopt @@ -90,6 +104,12 @@ class HInliner : public HOptimization { uint32_t dex_pc) const SHARED_REQUIRES(Locks::mutator_lock_); + void FixUpReturnReferenceType(ArtMethod* resolved_method, + HInvoke* invoke_instruction, + HInstruction* return_replacement, + bool do_rtp) + SHARED_REQUIRES(Locks::mutator_lock_); + HGraph* const outermost_graph_; const DexCompilationUnit& outer_compilation_unit_; const DexCompilationUnit& caller_compilation_unit_; |