summaryrefslogtreecommitdiff
path: root/src/compiler_llvm/method_compiler.cc
diff options
context:
space:
mode:
author Shih-wei Liao <sliao@google.com> 2012-05-09 02:50:08 -0700
committer Shih-wei Liao <sliao@google.com> 2012-05-09 02:50:08 -0700
commite6a7adc91696930dae60c3d0eac46473a74d9941 (patch)
tree57d7bba34007b7516ea2dfd0a43075537e951ebb /src/compiler_llvm/method_compiler.cc
parent42515cfaa8905071438cf21a0b924bb0c400c8c7 (diff)
Fix LLVM build for gcc 4.6. -Werror=unused-but-set-variable.
Also, remove dead code (CreateAlloca) and optimize the code. Change-Id: I0474e67f5e4f802cd785db11257d2049f1bffd16
Diffstat (limited to 'src/compiler_llvm/method_compiler.cc')
-rw-r--r--src/compiler_llvm/method_compiler.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/compiler_llvm/method_compiler.cc b/src/compiler_llvm/method_compiler.cc
index d61c913524..cbad3f9668 100644
--- a/src/compiler_llvm/method_compiler.cc
+++ b/src/compiler_llvm/method_compiler.cc
@@ -2845,13 +2845,6 @@ void MethodCompiler::EmitInsn_Invoke(uint32_t dex_pc,
llvm::BasicBlock* block_stub = CreateBasicBlockWithDexPC(dex_pc, "stub");
llvm::BasicBlock* block_continue = CreateBasicBlockWithDexPC(dex_pc, "cont");
- llvm::Type* accurate_ret_type = irb_.getJType(ret_shorty, kAccurate);
- llvm::Value* retval_addr = NULL;
- if (ret_shorty != 'V') {
- retval_addr = irb_.CreateAlloca(accurate_ret_type);
- }
-
-
llvm::Value* code_addr_int = irb_.CreatePtrToInt(code_addr, irb_.getPtrEquivIntTy());
llvm::Value* max_stub_int = irb_.getPtrEquivInt(special_stub::kMaxSpecialStub);
llvm::Value* is_stub = irb_.CreateICmpULT(code_addr_int, max_stub_int);
@@ -2902,6 +2895,7 @@ void MethodCompiler::EmitInsn_Invoke(uint32_t dex_pc,
// TODO: Remove this after we solve the proxy trampoline calling convention problem.
irb_.CreateCall(irb_.GetRuntime(ProxyInvokeHandler), args);
if (ret_shorty != 'V') {
+ llvm::Type* accurate_ret_type = irb_.getJType(ret_shorty, kAccurate);
llvm::Value* result_addr =
irb_.CreateBitCast(temp_space_addr, accurate_ret_type->getPointerTo());
llvm::Value* retval = irb_.CreateLoad(result_addr, kTBAAStackTemp);