Remove data dependency of push/pop shadow frame.
Change-Id: I883a1082190084ddfa4a09b8953ac9dafa256e7e
diff --git a/src/compiler_llvm/method_compiler.cc b/src/compiler_llvm/method_compiler.cc
index f76f57b..52b7b5f 100644
--- a/src/compiler_llvm/method_compiler.cc
+++ b/src/compiler_llvm/method_compiler.cc
@@ -73,7 +73,8 @@
basic_blocks_(code_item_->insns_size_in_code_units_),
basic_block_landing_pads_(code_item_->tries_size_, NULL),
basic_block_unwind_(NULL), basic_block_unreachable_(NULL),
- shadow_frame_(NULL), elf_func_idx_(cunit_->AcquireUniqueElfFuncIndex()) {
+ shadow_frame_(NULL), jvalue_temp_(NULL), old_shadow_frame_(NULL),
+ elf_func_idx_(cunit_->AcquireUniqueElfFuncIndex()) {
}
@@ -320,7 +321,7 @@
llvm::Value* shadow_frame_upcast =
irb_.CreateConstGEP2_32(shadow_frame_, 0, 0);
- irb_.CreateCall(irb_.GetRuntime(PushShadowFrame), shadow_frame_upcast);
+ old_shadow_frame_ = irb_.CreateCall(irb_.GetRuntime(PushShadowFrame), shadow_frame_upcast);
}
@@ -3954,7 +3955,8 @@
if (!method_info_.need_shadow_frame) {
return;
}
- irb_.CreateCall(irb_.GetRuntime(PopShadowFrame));
+ DCHECK(old_shadow_frame_ != NULL);
+ irb_.CreateCall(irb_.GetRuntime(PopShadowFrame), old_shadow_frame_);
}