summaryrefslogtreecommitdiff
path: root/src/compiler_llvm/gbc_expander.cc
diff options
context:
space:
mode:
author TDYa127 <tdy@google.com> 2012-08-22 10:49:42 -0700
committer Shih-wei Liao <sliao@google.com> 2012-09-15 04:51:24 -0700
commit890ea89879ba555a08433146058d516575646c59 (patch)
treeb595aa1633451cb16bb8bf7576e110222e4f04b9 /src/compiler_llvm/gbc_expander.cc
parentaa55887fd30484a77e7775dfbcddbee883ce6380 (diff)
Add suspend by ourselves to improve performance.
Set shadow frame entry after invoke. Some reference is not in the shadow frame because of invoke/move-result fusing. Change-Id: I157eaad5be85a4a7f0d4ce89a960d52863df29ad
Diffstat (limited to 'src/compiler_llvm/gbc_expander.cc')
-rw-r--r--src/compiler_llvm/gbc_expander.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/compiler_llvm/gbc_expander.cc b/src/compiler_llvm/gbc_expander.cc
index 412dbf7631..9d7f1ae2ed 100644
--- a/src/compiler_llvm/gbc_expander.cc
+++ b/src/compiler_llvm/gbc_expander.cc
@@ -1169,6 +1169,10 @@ void GBCExpanderPass::InsertStackOverflowCheck(llvm::Function& func) {
// alloca instructions)
EmitStackOverflowCheck(&*first_non_alloca);
+#if defined(ART_USE_QUICK_COMPILER)
+ irb_.Runtime().EmitTestSuspend();
+#endif
+
llvm::BasicBlock* next_basic_block = irb_.GetInsertBlock();
if (next_basic_block != first_basic_block) {
// Splice the rest of the instruction to the continuing basic block
@@ -2630,8 +2634,11 @@ GBCExpanderPass::ExpandIntrinsic(IntrinsicHelper::IntrinsicId intr_id,
case IntrinsicHelper::GetCurrentThread: {
return irb_.Runtime().EmitGetCurrentThread();
}
- case IntrinsicHelper::TestSuspend:
case IntrinsicHelper::CheckSuspend: {
+ // We will add suspend by ourselves.
+ return NULL;
+ }
+ case IntrinsicHelper::TestSuspend: {
Expand_TestSuspend(call_inst);
return NULL;
}