summaryrefslogtreecommitdiff
path: root/src/compiler/llvm/gbc_expander.cc
diff options
context:
space:
mode:
author Sameer Abu Asal <sasal@google.com> 2013-04-05 19:13:07 -0700
committer Sameer Abu Asal <sasal@google.com> 2013-04-26 10:12:52 -0700
commitb0682d5f7970470130f43d35f37ae7605a8a9bb8 (patch)
tree3bf3d9e1b3ed5da8e7db5c9e736e6cde7c5e30c8 /src/compiler/llvm/gbc_expander.cc
parentba1814eeac6adb44f2f78317556b3484b19e02fc (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. Change-Id: Iee61858e84242dfc82be363ee221d2747a1ac86a
Diffstat (limited to 'src/compiler/llvm/gbc_expander.cc')
-rw-r--r--src/compiler/llvm/gbc_expander.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/llvm/gbc_expander.cc b/src/compiler/llvm/gbc_expander.cc
index 94eb741039..c1e35a69a7 100644
--- a/src/compiler/llvm/gbc_expander.cc
+++ b/src/compiler/llvm/gbc_expander.cc
@@ -785,8 +785,10 @@ llvm::Value* GBCExpanderPass::EmitInvoke(llvm::CallInst& call_inst) {
int vtable_idx = -1;
uintptr_t direct_code = 0;
uintptr_t direct_method = 0;
+ // TODO: pass actual value of dex PC (instead of kDexPCNotready) needed by verifier based
+ // sharpening after LLVM re-factoring is finished.
bool is_fast_path = driver_->
- ComputeInvokeInfo(callee_method_idx, dex_compilation_unit_,
+ ComputeInvokeInfo(callee_method_idx, art::kDexPCNotReady, dex_compilation_unit_,
invoke_type, vtable_idx, direct_code, direct_method);
// Load the method object