diff options
| author | 2013-04-29 11:31:03 -0700 | |
|---|---|---|
| committer | 2013-04-29 13:06:07 -0700 | |
| commit | 31d4b8e0058b33e2c5ce792a69e5e897583652e2 (patch) | |
| tree | 8b981aa8c0dcb2e540f5ba26951302f720299f8e /src/compiler/driver/compiler_driver.h | |
| parent | 88fc036842eb3c48acd5d3b01e75b3012c996d90 (diff) | |
Supporting de-virtualization for precise types.
Sharpening invoke-virtual and invoke-interface calls to invoke-direct for cases
where the type of "this" pointer in the invoke- params is precisely known.
Instructions that have an invoke opcode are marked as interesting, for each invoke-virtual/interface
we come across with a precise type for "this" we mark the location as a candidate for sharpening,
resolve the concrete method and save its method reference <DexFile, DexMethodIndex> to be sharpened
in CompilerDriver::ComputeInvokeInfo().
Added a new entry to AOT statistics showing the percentage of sharpened calls that were based on
type analysis.
Fix a minor bug in type creation for GetSuperClass(). Previously super class of a precise reference
had precise types created which is not necessarily the case.
Fixed DCHECK in Class::FindVirtualMethodForVirtual to handle cases for Miranda methods.
Change-Id: I0626d5cd1bc70a685db71abec067370ebdaf6edc
Diffstat (limited to 'src/compiler/driver/compiler_driver.h')
| -rw-r--r-- | src/compiler/driver/compiler_driver.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/driver/compiler_driver.h b/src/compiler/driver/compiler_driver.h index a20e5ef585..e289558276 100644 --- a/src/compiler/driver/compiler_driver.h +++ b/src/compiler/driver/compiler_driver.h @@ -39,6 +39,8 @@ class ParallelCompilationManager; class DexCompilationUnit; class TimingLogger; +const uint32_t kDexPCNotReady = 0xFFFFFF; + enum CompilerBackend { kQuick, kPortable, @@ -149,8 +151,9 @@ class CompilerDriver { // Can we fastpath a interface, super class or virtual method call? Computes method's vtable // index. - bool ComputeInvokeInfo(uint32_t method_idx, const DexCompilationUnit* mUnit, InvokeType& type, - int& vtable_idx, uintptr_t& direct_code, uintptr_t& direct_method) + bool ComputeInvokeInfo(uint32_t method_idx, uint32_t dex_pc, + const DexCompilationUnit* mUnit, InvokeType& type, int& vtable_idx, + uintptr_t& direct_code, uintptr_t& direct_method) LOCKS_EXCLUDED(Locks::mutator_lock_); // Record patch information for later fix up. |