diff options
| author | 2017-05-23 14:24:55 -0700 | |
|---|---|---|
| committer | 2017-05-24 16:06:04 -0700 | |
| commit | af44e6c5ca0169bc19c6263288a7d889b37db549 (patch) | |
| tree | acdb4dab1e1ef19bfa941abae3305210d9421531 /compiler/optimizing/inliner.h | |
| parent | a39fd980000d10ee0b3a49555cc8bcbbfacde943 (diff) | |
Do not deopt when using AOT inline caches
Generating a deopt does not ensure that we will actually capture the new
types; and the danger is that we could be stuck in a loop with "forever"
deoptimizations. For example, if the method never becomes hot again, the
inline cache will not be updated and the AOT code will keep
deoptimizing.
This is a compromise because we will most likely never update the inline
cache (unless there's another reason to deopt). So we might be stuck
with a sub-optimal inline cache. As a TODO, we could be smarter when
capturing inline caches to mitigate this. (e.g. by having different
thresholds for new and old methods).
Delete test 644 which was testing a regression involving deopts which is
no longer applicable.
Bug: 38412648
Test: m test-art-host
Change-Id: Ib84559e84f07ec976feeb3a3120fa486d5bee3bf
Diffstat (limited to 'compiler/optimizing/inliner.h')
| -rw-r--r-- | compiler/optimizing/inliner.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/optimizing/inliner.h b/compiler/optimizing/inliner.h index 9e4685cbf4..67476b6956 100644 --- a/compiler/optimizing/inliner.h +++ b/compiler/optimizing/inliner.h @@ -180,6 +180,9 @@ class HInliner : public HOptimization { Handle<mirror::ObjectArray<mirror::Class>> classes) REQUIRES_SHARED(Locks::mutator_lock_); + // Returns whether or not we should use only polymorphic inlining with no deoptimizations. + bool UseOnlyPolymorphicInliningWithNoDeopt(); + // Try CHA-based devirtualization to change virtual method calls into // direct calls. // Returns the actual method that resolved_method can be devirtualized to. |