From af543476661966c83a1e1c4db4fbef0d9a2d3afa Mon Sep 17 00:00:00 2001 From: TDYa127 Date: Mon, 28 May 2012 21:49:23 -0700 Subject: Lazy pushing shadow frame. Function: aget v0, v1, v2 return v0 Original: push shadow frame; if (null pointer) { throw; pop shadow frame; unwind; } if (index out of bounds) { throw; pop shadow frame; unwind; } load from array; pop shadow frame; return; New: if (null pointer) { push shadow frame; throw; pop shadow frame; unwind; } if (index out of bounds) { push shadow frame; throw; pop shadow frame; unwind; } load from array; return; Change-Id: I7fc0ff12b9a5454f8e1491b9ce1cdef3afcbed23 --- src/compiler_llvm/method_compiler.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/compiler_llvm/method_compiler.h') diff --git a/src/compiler_llvm/method_compiler.h b/src/compiler_llvm/method_compiler.h index 9e4c81b5b8..44ab863c4a 100644 --- a/src/compiler_llvm/method_compiler.h +++ b/src/compiler_llvm/method_compiler.h @@ -264,6 +264,7 @@ class MethodCompiler { void EmitMarkGCCard(llvm::Value* value, llvm::Value* target_addr); // Shadow frame helper function + void EmitPushShadowFrame(bool is_inline); void EmitPopShadowFrame(); void EmitUpdateDexPC(uint32_t dex_pc); @@ -430,6 +431,7 @@ class MethodCompiler { bool has_invoke; bool need_shadow_frame_entry; bool need_shadow_frame; + bool lazy_push_shadow_frame; }; MethodInfo method_info_; @@ -474,6 +476,9 @@ class MethodCompiler { llvm::AllocaInst* jvalue_temp_; llvm::Value* old_shadow_frame_; + llvm::Value* already_pushed_shadow_frame_; + uint32_t shadow_frame_size_; + uint16_t elf_func_idx_; }; -- cgit v1.2.3-59-g8ed1b