summaryrefslogtreecommitdiff
path: root/src/compiler_llvm/method_compiler.cc
diff options
context:
space:
mode:
author Shih-wei Liao <sliao@google.com> 2012-04-22 01:50:03 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2012-04-22 01:50:03 -0700
commitb4e6fff1ecc8853f4ca6dadcca5151cac84048db (patch)
treeed15031824c0d6220914ec16265559a17b578df3 /src/compiler_llvm/method_compiler.cc
parentaf77455c67e811719ddc9476ff334469e7650b3a (diff)
parent853cd09d6ffc87a270d0d531f84f246d534b8c82 (diff)
Merge "Fix llvm runtime support bug." into ics-mr1-plus-art
Diffstat (limited to 'src/compiler_llvm/method_compiler.cc')
-rw-r--r--src/compiler_llvm/method_compiler.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/compiler_llvm/method_compiler.cc b/src/compiler_llvm/method_compiler.cc
index 5bd1695ea1..8e592fe778 100644
--- a/src/compiler_llvm/method_compiler.cc
+++ b/src/compiler_llvm/method_compiler.cc
@@ -35,7 +35,6 @@
#include <iomanip>
-#include <llvm/Analysis/Verifier.h>
#include <llvm/BasicBlock.h>
#include <llvm/Function.h>
#include <llvm/GlobalVariable.h>
@@ -3687,7 +3686,7 @@ CompiledMethod *MethodCompiler::Compile() {
EmitPrologueLastBranch();
// Verify the generated bitcode
- llvm::verifyFunction(*func_, llvm::PrintMessageAction);
+ VERIFY_LLVM_FUNCTION(*func_);
// Add the memory usage approximation of the compilation unit
cunit_->AddMemUsageApproximation(code_item_->insns_size_in_code_units_ * 900);
@@ -3738,8 +3737,12 @@ void MethodCompiler::EmitGuard_ExceptionLandingPad(uint32_t dex_pc) {
void MethodCompiler::EmitGuard_GarbageCollectionSuspend(uint32_t dex_pc) {
llvm::Value* runtime_func = irb_.GetRuntime(TestSuspend);
+
+ llvm::Value* thread_object_addr = irb_.CreateCall(irb_.GetRuntime(GetCurrentThread));
+
EmitUpdateDexPC(dex_pc);
- irb_.CreateCall(runtime_func);
+
+ irb_.CreateCall(runtime_func, thread_object_addr);
EmitGuard_ExceptionLandingPad(dex_pc);
}