summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author jeffhao <jeffhao@google.com> 2013-01-17 00:21:56 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2013-01-17 00:21:56 +0000
commit3a5271bf6d01361748e28656b5fc75f890972c5e (patch)
tree042b7cc7c565f0da3a646fde5467697d77d69df8
parentaf6e67a4816d2593586115b89faa659225363246 (diff)
parent8ff2f3df63494250b1679fcce2924379871d2b47 (diff)
Merge "Prune away extraneous ART_USE_PORTABLE_COMPILER ifdefs." into dalvik-dev
-rw-r--r--src/compiler_llvm/gbc_expander.cc20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/compiler_llvm/gbc_expander.cc b/src/compiler_llvm/gbc_expander.cc
index 42a87a3556..64d50b5a0d 100644
--- a/src/compiler_llvm/gbc_expander.cc
+++ b/src/compiler_llvm/gbc_expander.cc
@@ -369,7 +369,6 @@ bool GBCExpanderPass::runOnFunction(llvm::Function& func) {
func_ = &func;
changed_ = false; // Assume unchanged
-#if defined(ART_USE_PORTABLE_COMPILER)
basic_blocks_.resize(code_item_->insns_size_in_code_units_);
basic_block_landing_pads_.resize(code_item_->tries_size_, NULL);
basic_block_unwind_ = NULL;
@@ -382,7 +381,6 @@ bool GBCExpanderPass::runOnFunction(llvm::Function& func) {
uint32_t dex_pc = LV2UInt(bb_iter->begin()->getMetadata("DexOff")->getOperand(0));
basic_blocks_[dex_pc] = bb_iter;
}
-#endif
// Insert stack overflow check
InsertStackOverflowCheck(func); // TODO: Use intrinsic.
@@ -1051,10 +1049,8 @@ llvm::Value* GBCExpanderPass::Expand_DivRem(llvm::CallInst& call_inst,
bool is_div, JType op_jty) {
llvm::Value* dividend = call_inst.getArgOperand(0);
llvm::Value* divisor = call_inst.getArgOperand(1);
-#if defined(ART_USE_PORTABLE_COMPILER)
uint32_t dex_pc = LV2UInt(call_inst.getMetadata("DexOff")->getOperand(0));
EmitGuard_DivZeroException(dex_pc, divisor, op_jty);
-#endif
// Most of the codes refer to MethodCompiler::EmitIntDivRemResultComputation
// Check the special case: MININT / -1 = MININT
@@ -1160,11 +1156,9 @@ void GBCExpanderPass::Expand_SetVReg(llvm::Value* entry_idx,
}
void GBCExpanderPass::Expand_PopShadowFrame() {
-#if defined(ART_USE_PORTABLE_COMPILER)
if (old_shadow_frame_ == NULL) {
return;
}
-#endif
rtb_.EmitPopShadowFrame(irb_.CreateLoad(old_shadow_frame_, kTBAARegister));
return;
}
@@ -1196,10 +1190,6 @@ void GBCExpanderPass::InsertStackOverflowCheck(llvm::Function& func) {
// alloca instructions)
EmitStackOverflowCheck(&*first_non_alloca);
-#if defined(ART_USE_PORTABLE_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
@@ -2392,11 +2382,9 @@ void GBCExpanderPass::EmitMarkGCCard(llvm::Value* value, llvm::Value* target_add
}
void GBCExpanderPass::EmitUpdateDexPC(uint32_t dex_pc) {
-#if defined(ART_USE_PORTABLE_COMPILER)
if (shadow_frame_ == NULL) {
return;
}
-#endif
irb_.StoreToObjectOffset(shadow_frame_,
art::ShadowFrame::DexPCOffset(),
irb_.getInt32(dex_pc),
@@ -2484,9 +2472,7 @@ llvm::FunctionType* GBCExpanderPass::GetFunctionType(uint32_t method_idx,
// Get return type
char ret_shorty = shorty[0];
-#if defined(ART_USE_PORTABLE_COMPILER)
ret_shorty = art::RemapShorty(ret_shorty);
-#endif
llvm::Type* ret_type = irb_.getJType(ret_shorty, kAccurate);
// Get argument type
@@ -2499,12 +2485,8 @@ llvm::FunctionType* GBCExpanderPass::GetFunctionType(uint32_t method_idx,
}
for (uint32_t i = 1; i < shorty_size; ++i) {
-#if defined(ART_USE_PORTABLE_COMPILER)
char shorty_type = art::RemapShorty(shorty[i]);
args_type.push_back(irb_.getJType(shorty_type, kAccurate));
-#else
- args_type.push_back(irb_.getJType(shorty[i], kAccurate));
-#endif
}
return llvm::FunctionType::get(ret_type, args_type, false);
@@ -2634,9 +2616,7 @@ llvm::BasicBlock* GBCExpanderPass::GetUnwindBasicBlock() {
// Emit the code to return default value (zero) for the given return type.
char ret_shorty = oat_compilation_unit_->GetShorty()[0];
-#if defined(ART_USE_PORTABLE_COMPILER)
ret_shorty = art::RemapShorty(ret_shorty);
-#endif
if (ret_shorty == 'V') {
irb_.CreateRetVoid();
} else {