Home | History | Annotate | Download | only in llvm

Lines Matching full:irb_

123   IRBuilder& irb_;
412 : llvm::FunctionPass(ID), intrinsic_helper_(intrinsic_helper), irb_(irb),
492 irb_.SetInsertPoint(inst_iter);
504 llvm::BasicBlock* next_basic_block = irb_.GetInsertBlock();
507 irb_.GetInsertPoint(), curr_basic_block->getInstList(),
527 irb_.SetInsertPoint(bb_iter);
535 llvm::BasicBlock* last_block = irb_.GetInsertBlock();
553 irb_.SetInsertPoint(lbb->begin());
576 llvm::PHINode* new_phi = irb_.CreatePHI(phi->getType(), rewrite_pair.size());
652 return irb_.CreateCall(irb_.GetRuntime(rt));
659 return irb_.CreateCall(irb_.GetRuntime(rt), args);
673 llvm::Value* frame_address = irb_.CreateCall(frameaddress, irb_.getInt32(0));
676 frame_address = irb_.CreatePtrToInt(frame_address, irb_.getPtrEquivIntTy());
680 irb_.Runtime().EmitLoadFromThreadOffset(art::Thread::StackEndOffset().Int32Value(),
681 irb_.getPtrEquivIntTy(),
685 llvm::Value* is_stack_overflow = irb_.CreateICmpULT(frame_address, stack_end);
693 irb_.CreateCondBr(is_stack_overflow, block_exception, block_continue, kUnlikely);
696 irb_.SetInsertPoint(block_exception);
697 irb_.CreateCall(irb_.GetRuntime(ThrowStackOverflowException));
702 irb_.CreateRetVoid();
707 irb_.CreateRet(llvm::UndefValue::get(ret_type));
710 irb_.SetInsertPoint(block_continue);
716 return irb_.LoadFromObjectOffset(method_object_addr,
718 irb_.getJObjectTy(),
727 llvm::Value* type_idx_value = irb_.getPtrEquivInt(type_idx);
737 llvm::Value* type_idx_value = irb_.getPtrEquivInt(type_idx);
747 llvm::Value* method_idx_value = irb_.getPtrEquivInt(method_idx);
757 llvm::Value* string_idx_value = irb_.getPtrEquivInt(string_idx);
763 llvm::Function* parent_func = irb_.GetInsertBlock()->getParent();
769 return irb_.LoadFromObjectOffset(array,
771 irb_.getJIntTy(),
780 return irb_.CreateLoad(callee_method_object_field_addr, kTBAARuntimeInfo);
787 irb_.LoadFromObjectOffset(this_addr,
789 irb_.getJObjectTy(),
794 irb_.LoadFromObjectOffset(class_object_addr,
796 irb_.getJObjectTy(),
801 irb_.getPtrEquivInt(static_cast<uint64_t>(vtable_idx));
806 return irb_.CreateLoad(method_field_addr, kTBAAConstJObject);
822 irb_.getPtrEquivInt(data_offset);
824 llvm::Type* elem_type = irb_.getJType(elem_jty);
827 irb_.CreatePtrDisp(array_addr, data_offset_value,
830 return irb_.CreateGEP(array_data_addr, index_value);
867 irb_.CreateIntToPtr(irb_.getPtrEquivInt(direct_method),
868 irb_.getJObjectTy());
909 irb_.CreateIntToPtr(irb_.getPtrEquivInt(direct_code),
913 irb_.LoadFromObjectOffset(callee_method_object_addr,
920 llvm::Value* retval = irb_.CreateCall(code_addr, args);
957 irb_.LoadFromObjectOffset(this_object,
959 irb_.getJIntTy(),
962 llvm::Value* count_equals_zero = irb_.CreateICmpEQ(string_count,
963 irb_.getJInt(0));
964 llvm::Value* is_empty = irb_.CreateSelect(count_equals_zero,
965 irb_.getJBoolean(true),
966 irb_.getJBoolean(false));
979 irb_.Runtime().EmitLoadFromThreadOffset(art::Thread::ThreadFlagsOffset().Int32Value(),
980 irb_.getInt16Ty(),
982 llvm::Value* is_suspend = irb_.CreateICmpNE(suspend_count, irb_.getInt16(0));
987 irb_.CreateCondBr(is_suspend, basic_block_suspend, basic_block_cont, kUnlikely);
989 irb_.SetInsertPoint(basic_block_suspend);
993 irb_.Runtime().EmitTestSuspend();
996 llvm::Value* exception_pending = irb_.Runtime().EmitIsExceptionPending();
997 irb_.CreateCondBr(exception_pending, basic_block_exception, basic_block_cont, kUnlikely);
999 irb_.SetInsertPoint(basic_block_exception);
1002 irb_.CreateRetVoid();
1005 irb_.CreateRet(llvm::UndefValue::get(ret_type));
1008 irb_.SetInsertPoint(basic_block_cont);
1013 irb_.Runtime().EmitMarkGCCard(call_inst.getArgOperand(0), call_inst.getArgOperand(1));
1024 return irb_.CreateLoad(string_field_addr, kTBAARuntimeInfo);
1035 return irb_.CreateLoad(type_field_addr, kTBAARuntimeInfo);
1054 return irb_.CreateLoad(array_elem_addr, kTBAAHeapArray, elem_jty);
1064 irb_.CreateStore(new_value, array_elem_addr, kTBAAHeapArray, elem_jty);
1090 elem_size = irb_.getPtrEquivInt(sizeof(int32_t));
1091 field_type = irb_.getJIntTy()->getPointerTo();
1093 alignment = irb_.getSizeOfPtrEquivInt();
1094 elem_size = irb_.getSizeOfPtrEquivIntValue();
1095 field_type = irb_.getJObjectTy()->getPointerTo();
1099 irb_.getPtrEquivInt(art::mirror::Array::DataOffset(alignment).Int32Value());
1102 irb_.CreatePtrDisp(array, data_field_offset, field_type);
1108 irb_.CreateStore(reg_value, data_field_addr, kTBAAHeapArray);
1111 irb_.CreatePtrDisp(data_field_addr, elem_size, field_type);
1127 irb_.getJType(field_jty)->getPointerTo();
1129 field_offset_value = irb_.getPtrEquivInt(field_offset);
1132 irb_.CreatePtrDisp(object_addr, field_offset_value, field_type);
1136 return irb_.CreateLoad(field_addr, kTBAAHeapInstance, field_jty);
1150 irb_.getJType(field_jty)->getPointerTo();
1152 field_offset_value = irb_.getPtrEquivInt(field_offset);
1155 irb_.CreatePtrDisp(object_addr, field_offset_value, field_type);
1159 irb_.CreateStore(new_value, field_addr, kTBAAHeapInstance, field_jty);
1173 llvm::Value* static_field_offset_value = irb_.getPtrEquivInt(field_offset);
1176 irb_.CreatePtrDisp(static_storage_addr, static_field_offset_value,
1177 irb_.getJType(field_jty)->getPointerTo());
1181 return irb_.CreateLoad(static_field_addr, kTBAAHeapStatic, field_jty);
1194 llvm::Value* static_field_offset_value = irb_.getPtrEquivInt(field_offset);
1197 irb_.CreatePtrDisp(static_storage_addr, static_field_offset_value,
1198 irb_.getJType(field_jty)->getPointerTo());
1202 irb_.CreateStore(new_value, static_field_addr, kTBAAHeapStatic, field_jty);
1209 return irb_.LoadFromObjectOffset(method_object_addr,
1211 irb_.getJObjectTy(),
1223 return irb_.CreateLoad(storage_field_addr, kTBAARuntimeInfo);
1261 irb_.LoadFromObjectOffset(callee_method_object_addr,
1267 llvm::Value* retval = irb_.CreateCall(code_addr, args);
1284 llvm::Type* op_type = irb_.getJType(op_jty);
1285 llvm::Value* zero = irb_.getJZero(op_jty);
1288 llvm::Function* parent = irb_.GetInsertBlock()->getParent();
1294 llvm::Value* is_equal_neg_one = irb_.CreateICmpEQ(divisor, neg_one);
1295 irb_.CreateCondBr(is_equal_neg_one, eq_neg_one, ne_neg_one, kUnlikely);
1298 irb_.SetInsertPoint(eq_neg_one);
1309 eq_result = irb_.CreateSub(zero, dividend);
1314 irb_.CreateBr(neg_one_cont);
1317 irb_.SetInsertPoint(ne_neg_one);
1320 ne_result = irb_.CreateSDiv(dividend, divisor);
1322 ne_result = irb_.CreateSRem(dividend, divisor);
1324 irb_.CreateBr(neg_one_cont);
1326 irb_.SetInsertPoint(neg_one_cont);
1327 llvm::PHINode* result = irb_.CreatePHI(op_type, 2);
1341 irb_.getShadowFrameTy(num_vregs);
1344 llvm::IRBuilderBase::InsertPoint irb_ip_original = irb_.saveIP();
1346 irb_.SetInsertPoint(&entry_block->front());
1348 shadow_frame_ = irb_.CreateAlloca(shadow_frame_type);
1352 irb_.CreateAlloca(shadow_frame_type->getElementType(0)->getPointerTo());
1354 irb_.restoreIP(irb_ip_original);
1360 irb_.CreateConstGEP2_32(shadow_frame_, 0, 0);
1366 irb_.CreateStore(result, old_shadow_frame_, kTBAARegister);
1381 irb_.getInt32(0), // No pointer displacement
1382 irb_.getInt32(1), // VRegs
1393 llvm::IRBuilderBase::InsertPoint ip = irb_.saveIP();
1394 irb_.SetInsertPoint(static_cast<llvm::Instruction*>(first_non_alloca));
1395 vreg_addr = irb_.CreateGEP(shadow_frame_, gep_index);
1397 irb_.restoreIP(ip);
1400 irb_.CreateStore(value,
1401 irb_.CreateBitCast(vreg_addr, value->getType()->getPointerTo()),
1410 rtb_.EmitPopShadowFrame(irb_.CreateLoad(old_shadow_frame_, kTBAARegister));
1415 irb_.StoreToObjectOffset(shadow_frame_,
1435 irb_.SetInsertPoint(first_non_alloca);
1441 irb_.Runtime().EmitTestSuspend();
1443 llvm::BasicBlock* next_basic_block = irb_.GetInsertBlock();
1447 irb_.GetInsertPoint(), first_basic_block->getInstList(),
1454 UpdatePhiInstruction(first_basic_block, irb_.GetInsertBlock());
1466 llvm::Value* cmp_eq = irb_.CreateFCmpOEQ(src1_value, src2_value);
1470 cmp_lt = irb_.CreateFCmpOLT(src1_value, src2_value);
1472 cmp_lt = irb_.CreateFCmpULT(src1_value, src2_value);
1479 llvm::Value* cmp_eq = irb_.CreateICmpEQ(src1_value, src2_value);
1480 llvm::Value* cmp_lt = irb_.CreateICmpSLT(src1_value, src2_value);
1487 llvm::Constant* zero = irb_.getJInt(0);
1488 llvm::Constant* pos1 = irb_.getJInt(1);
1489 llvm::Constant* neg1 = irb_.getJInt(-1);
1491 llvm::Value* result_lt = irb_.CreateSelect(cmp_lt, neg1, pos1);
1492 llvm::Value* result_eq = irb_.CreateSelect(cmp_eq, zero, result_lt);
1505 src2_value = irb_.CreateAnd(src2_value, 0x1f);
1507 llvm::Value* masked_src2_value = irb_.CreateAnd(src2_value, 0x3f);
1508 src2_value = irb_.CreateZExt(masked_src2_value, irb_.getJLongTy());
1514 return irb_.CreateShl(src1_value, src2_value);
1517 return irb_.CreateAShr(src1_value, src2_value);
1520 return irb_.CreateLShr(src1_value, src2_value);
1532 return irb_.CreateZExt(value, irb_.getJType(kInt));
1535 return irb_.CreateSExt(value, irb_.getJType(kInt));
1555 return irb_.CreateTrunc(value, irb_.getJType(jty));
1582 llvm::Value* array_elem_value = irb_.CreateLoad(array_elem_addr, kTBAAHeapArray, elem_jty);
1605 llvm::Function* runtime_func = irb_.GetRuntime(CheckPutArrayElement);
1607 irb_.CreateCall2(runtime_func, new_value, array_addr);
1614 irb_.CreateStore(new_value, array_elem_addr, kTBAAHeapArray, elem_jty);
1639 runtime_func = irb_.GetRuntime(GetObjectInstance);
1641 runtime_func = irb_.GetRuntime(Get64Instance);
1643 runtime_func = irb_.GetRuntime(Get32Instance);
1646 llvm::ConstantInt* field_idx_value = irb_.getInt32(field_idx);
1652 field_value = irb_.CreateCall3(runtime_func, field_idx_value,
1658 field_value = irb_.CreateBitCast(field_value, irb_.getJType(field_jty));
1664 irb_.getJType(field_jty)->getPointerTo();
1666 llvm::ConstantInt* field_offset_value = irb_.getPtrEquivInt(field_offset);
1669 irb_.CreatePtrDisp(object_addr, field_offset_value, field_type);
1671 field_value = irb_.CreateLoad(field_addr, kTBAAHeapInstance, field_jty);
1675 irb_.CreateMemoryBarrier(art::kLoadLoad);
1701 new_value = irb_.CreateBitCast(new_value, irb_.getJType(kInt));
1703 new_value = irb_.CreateBitCast(new_value, irb_.getJType(kLong));
1707 runtime_func = irb_.GetRuntime(SetObjectInstance);
1709 runtime_func = irb_.GetRuntime(Set64Instance);
1711 runtime_func = irb_.GetRuntime(Set32Instance);
1714 llvm::Value* field_idx_value = irb_.getInt32(field_idx);
1720 irb_.CreateCall4(runtime_func, field_idx_value,
1729 irb_.CreateMemoryBarrier(art::kStoreStore);
1733 irb_.getJType(field_jty)->getPointerTo();
1735 llvm::Value* field_offset_value = irb_.getPtrEquivInt(field_offset);
1738 irb_.CreatePtrDisp(object_addr, field_offset_value, field_type);
1741 irb_.CreateStore(new_value, field_addr, kTBAAHeapInstance, field_jty);
1744 irb_.CreateMemoryBarrier(art::kLoadLoad);
1759 llvm::Value* type_idx_value = irb_.getInt32(type_idx);
1763 llvm::Value* thread_object_addr = irb_.Runtime().EmitGetCurrentThread();
1765 llvm::Function* runtime_func = irb_.GetRuntime(InitializeTypeAndVerifyAccess);
1770 irb_.CreateCall3(runtime_func, type_idx_value, method_object_addr, thread_object_addr);
1781 llvm::Value* type_object_addr = irb_.CreateLoad(type_field_addr, kTBAARuntimeInfo);
1787 llvm::BasicBlock* block_original = irb_.GetInsertBlock();
1791 irb_irb_.getJNull());
1799 irb_.CreateCondBr(equal_null, block_load_class, block_cont, kUnlikely);
1802 irb_.SetInsertPoint(block_load_class);
1804 llvm::Function* runtime_func = irb_.GetRuntime(InitializeType);
1806 llvm::Constant* type_idx_value = irb_.getInt32(type_idx);
1810 llvm::Value* thread_object_addr = irb_.Runtime().EmitGetCurrentThread();
1815 irb_.CreateCall3(runtime_func, type_idx_value, method_object_addr, thread_object_addr);
1819 llvm::BasicBlock* block_after_load_class = irb_.GetInsertBlock();
1821 irb_.CreateBr(block_cont);
1824 irb_.SetInsertPoint(block_cont);
1826 llvm::PHINode* phi = irb_.CreatePHI(irb_.getJObjectTy(), 2);
1846 llvm::Value* storage_object_addr = irb_.CreateLoad(storage_field_addr, kTBAARuntimeInfo);
1848 llvm::BasicBlock* block_original = irb_.GetInsertBlock();
1852 irb_.CreateICmpEQ(storage_object_addr, irb_.getJNull());
1854 irb_.CreateCondBr(equal_null, block_load_static, block_cont, kUnlikely);
1857 irb_.SetInsertPoint(block_load_static);
1859 llvm::Function* runtime_func = irb_.GetRuntime(InitializeStaticStorage);
1861 llvm::Constant* type_idx_value = irb_.getInt32(type_idx);
1865 llvm::Value* thread_object_addr = irb_.Runtime().EmitGetCurrentThread();
1870 irb_.CreateCall3(runtime_func, type_idx_value, method_object_addr, thread_object_addr);
1874 llvm::BasicBlock* block_after_load_static = irb_.GetInsertBlock();
1876 irb_.CreateBr(block_cont);
1879 irb_.SetInsertPoint(block_cont);
1881 llvm::PHINode* phi = irb_.CreatePHI(irb_.getJObjectTy(), 2);
1909 runtime_func = irb_.GetRuntime(GetObjectStatic);
1911 runtime_func = irb_.GetRuntime(Get64Static);
1913 runtime_func = irb_.GetRuntime(Get32Static);
1916 llvm::Constant* field_idx_value = irb_.getInt32(field_idx);
1923 irb_.CreateCall2(runtime_func, field_idx_value, method_object_addr);
1928 static_field_value = irb_.CreateBitCast(static_field_value, irb_.getJType(field_jty));
1940 irb_.LoadFromObjectOffset(method_object_addr,
1942 irb_.getJObjectTy(),
1951 llvm::Value* static_field_offset_value = irb_.getPtrEquivInt(field_offset);
1954 irb_.CreatePtrDisp(static_storage_addr, static_field_offset_value,
1955 irb_.getJType(field_jty)->getPointerTo());
1957 static_field_value = irb_.CreateLoad(static_field_addr, kTBAAHeapStatic, field_jty);
1961 irb_.CreateMemoryBarrier(art::kLoadLoad);
1975 new_value = irb_.CreateBitCast(new_value, irb_.getJType(field_jty));
1991 runtime_func = irb_.GetRuntime(SetObjectStatic);
1993 runtime_func = irb_.GetRuntime(Set64Static);
1995 runtime_func = irb_.GetRuntime(Set32Static);
1999 new_value = irb_.CreateBitCast(new_value, irb_.getJType(kInt));
2001 new_value = irb_.CreateBitCast(new_value, irb_.getJType(kLong));
2004 llvm::Constant* field_idx_value = irb_.getInt32(field_idx);
2010 irb_.CreateCall3(runtime_func, field_idx_value,
2025 irb_.LoadFromObjectOffset(method_object_addr,
2027 irb_.getJObjectTy(),
2037 irb_.CreateMemoryBarrier(art::kStoreStore);
2040 llvm::Value* static_field_offset_value = irb_.getPtrEquivInt(field_offset);
2043 irb_.CreatePtrDisp(static_storage_addr, static_field_offset_value,
2044 irb_.getJType(field_jty)->getPointerTo());
2047 irb_.CreateStore(new_value, static_field_addr, kTBAAHeapStatic, field_jty);
2050 irb_.CreateMemoryBarrier(art::kStoreLoad);
2067 llvm::Value* string_addr = irb_.CreateLoad(string_field_addr, kTBAARuntimeInfo);
2081 llvm::Value* equal_null = irb_.CreateICmpEQ(string_addr, irb_.getJNull());
2083 irb_.CreateCondBr(equal_null, block_str_resolve, block_str_exist, kUnlikely);
2086 irb_.SetInsertPoint(block_str_exist);
2087 irb_.CreateBr(block_cont);
2090 irb_.SetInsertPoint(block_str_resolve);
2092 llvm::Function* runtime_func = irb_.GetRuntime(ResolveString);
2096 llvm::Value* string_idx_value = irb_.getInt32(string_idx);
2100 llvm::Value* result = irb_.CreateCall2(runtime_func, method_object_addr,
2105 irb_.CreateBr(block_cont);
2108 llvm::BasicBlock* block_pre_cont = irb_.GetInsertBlock();
2110 irb_.SetInsertPoint(block_cont);
2112 llvm::PHINode* phi = irb_.CreatePHI(irb_.getJObjectTy(), 2);
2141 irb_.Runtime().EmitLockObject(object_addr);
2155 irb_.Runtime().EmitUnlockObject(object_addr);
2177 llvm::Value* equal_null = irb_.CreateICmpEQ(object_addr, irb_.getJNull());
2179 irb_.CreateCondBr(equal_null, block_cont, block_test_class, kUnlikely);
2182 irb_.SetInsertPoint(block_test_class);
2186 llvm::PointerType* jobject_ptr_ty = irb_.getJObjectTy();
2189 irb_.CreateBitCast(object_addr, jobject_ptr_ty->getPointerTo());
2192 irb_.CreateLoad(object_type_field_addr, kTBAAConstJObject);
2195 irb_.CreateICmpEQ(type_object_addr, object_type_object_addr);
2197 irb_.CreateCondBr(equal_class, block_cont, block_test_sub_class, kLikely);
2200 irb_.SetInsertPoint(block_test_sub_class);
2204 irb_.CreateCall2(irb_.GetRuntime(CheckCast),
2209 irb_.CreateBr(block_cont);
2211 irb_.SetInsertPoint(block_cont);
2241 llvm::Value* equal_null = irb_.CreateICmpEQ(object_addr, irb_.getJNull());
2243 irb_.CreateCondBr(equal_null, block_nullp, block_test_class, kUnlikely);
2245 irb_.SetInsertPoint(block_nullp);
2246 irb_.CreateBr(block_cont);
2249 irb_.SetInsertPoint(block_test_class);
2253 llvm::PointerType* jobject_ptr_ty = irb_.getJObjectTy();
2256 irb_.CreateBitCast(object_addr, jobject_ptr_ty->getPointerTo());
2259 irb_.CreateLoad(object_type_field_addr, kTBAAConstJObject);
2262 irb_.CreateICmpEQ(type_object_addr, object_type_object_addr);
2264 irb_.CreateCondBr(equal_class, block_class_equals, block_test_sub_class, kLikely);
2266 irb_.SetInsertPoint(block_class_equals);
2267 irb_.CreateBr(block_cont);
2270 irb_.SetInsertPoint(block_test_sub_class);
2272 irb_.CreateCall2(irb_.GetRuntime(IsAssignable),
2274 irb_.CreateBr(block_cont);
2276 irb_.SetInsertPoint(block_cont);
2278 llvm::PHINode* phi = irb_.CreatePHI(irb_.getJIntTy(), 3);
2280 phi->addIncoming(irb_.getJInt(0), block_nullp);
2281 phi->addIncoming(irb_.getJInt(1), block_class_equals);
2295 runtime_func = irb_.GetRuntime(AllocObject);
2297 runtime_func = irb_.GetRuntime(AllocObjectWithAccessCheck);
2300 llvm::Constant* type_index_value = irb_.getInt32(type_idx);
2304 llvm::Value* thread_object_addr = irb_.Runtime().EmitGetCurrentThread();
2309 irb_.CreateCall3(runtime_func, type_index_value, method_object_addr, thread_object_addr);
2363 EmitAllocNewArray(dex_pc, irb_.getInt32(length), type_idx, true);
2384 elem_size = irb_.getPtrEquivInt(sizeof(int32_t));
2385 field_type = irb_.getJIntTy()->getPointerTo();
2387 alignment = irb_.getSizeOfPtrEquivInt();
2388 elem_size = irb_.getSizeOfPtrEquivIntValue();
2389 field_type = irb_.getJObjectTy()->getPointerTo();
2393 irb_.getPtrEquivInt(art::mirror::Array::DataOffset(alignment).Int32Value());
2396 irb_.CreatePtrDisp(object_addr, data_field_offset, field_type);
2405 irb_.CreateStore(reg_value, data_field_addr, kTBAAHeapArray);
2408 irb_.CreatePtrDisp(data_field_addr, elem_size, field_type);
2436 llvm::Function* runtime_func = irb_.GetRuntime(FillArrayData);
2442 irb_.CreateCall4(runtime_func,
2443 method_object_addr, irb_.getInt32(dex_pc),
2444 array_addr, irb_.getInt32(payload_offset));
2465 irb_.GetRuntime(CheckAndAllocArray) :
2466 irb_.GetRuntime(CheckAndAllocArrayWithAccessCheck);
2469 irb_.GetRuntime(AllocArray) :
2470 irb_.GetRuntime(AllocArrayWithAccessCheck);
2473 llvm::Constant* type_index_value = irb_.getInt32(type_idx);
2477 llvm::Value* thread_object_addr = irb_.Runtime().EmitGetCurrentThread();
2482 irb_.CreateCall4(runtime_func, type_index_value, method_object_addr,
2500 runtime_func = irb_.GetRuntime(FindStaticMethodWithAccessCheck);
2504 runtime_func = irb_.GetRuntime(FindDirectMethodWithAccessCheck);
2508 runtime_func = irb_.GetRuntime(FindVirtualMethodWithAccessCheck);
2512 runtime_func = irb_.GetRuntime(FindSuperMethodWithAccessCheck);
2517 runtime_func = irb_.GetRuntime(FindInterfaceMethod);
2519 runtime_func = irb_.GetRuntime(FindInterfaceMethodWithAccessCheck);
2524 llvm::Value* callee_method_idx_value = irb_.getInt32(callee_method_idx);
2528 this_addr = irb_.getJNull();
2533 llvm::Value* thread_object_addr = irb_.Runtime().EmitGetCurrentThread();
2538 irb_.CreateCall4(runtime_func,
2551 irb_.Runtime().EmitMarkGCCard(value, target_addr);
2558 irb_.StoreToObjectOffset(shadow_frame_,
2560 irb_.getInt32(dex_pc),
2569 llvm::Constant* zero = irb_.getJZero(op_jty);
2571 llvm::Value* equal_zero = irb_.CreateICmpEQ(denominator, zero);
2577 irb_.CreateCondBr(equal_zero, block_exception, block_continue, kUnlikely);
2579 irb_.SetInsertPoint(block_exception);
2581 irb_.CreateCall(irb_.GetRuntime(ThrowDivZeroException));
2584 irb_.SetInsertPoint(block_continue);
2598 irb_.GetInsertBlock()));
2603 irb_.CreateCondBr(irb_.getFalse(), lpad, block_continue, kUnlikely);
2605 irb_.SetInsertPoint(block_continue);
2608 llvm::Value* equal_null = irb_.CreateICmpEQ(object, irb_.getJNull());
2616 irb_.CreateCondBr(equal_null, block_exception, block_continue, kUnlikely);
2618 irb_.SetInsertPoint(block_exception);
2620 irb_.CreateCall(irb_.GetRuntime(ThrowNullPointerException),
2621 irb_.getInt32(dex_pc));
2624 irb_.SetInsertPoint(block_continue);
2641 irb_.GetInsertBlock()));
2646 irb_.CreateCondBr(irb_.getFalse(), lpad, block_continue, kUnlikely);
2648 irb_.SetInsertPoint(block_continue);
2653 llvm::Value* cmp = irb_.CreateICmpUGE(index, array_len);
2661 irb_.CreateCondBr(cmp, block_exception, block_continue, kUnlikely);
2663 irb_.SetInsertPoint(block_exception);
2666 irb_.CreateCall2(irb_.GetRuntime(ThrowIndexOutOfBounds), index, array_len);
2669 irb_.SetInsertPoint(block_continue);
2686 args_type.push_back(irb_.getJObjectTy()); // method object pointer
2689 args_type.push_back(irb_.getJType('L')); // "this" object pointer
2694 args_type.push_back(irb_.getJType(shorty_type));
2774 llvm::IRBuilderBase::InsertPoint irb_ip_original = irb_.saveIP();
2775 irb_.SetInsertPoint(block_lpad);
2780 llvm::Value* ti_offset_value = irb_.getInt32(ti_offset);
2783 irb_.CreateCall2(irb_.GetRuntime(FindCatchBlock),
2788 irb_.CreateSwitch(catch_handler_index_value, GetUnwindBasicBlock());
2794 sw->addCase(irb_.getInt32(c), GetBasicBlock(iter.GetHandlerAddress()));
2798 irb_.restoreIP(irb_ip_original);
2818 llvm::IRBuilderBase::InsertPoint irb_ip_original = irb_.saveIP();
2819 irb_.SetInsertPoint(basic_block_unwind_);
2828 irb_.CreateRetVoid();
2830 irb_.CreateRet(irb_.getJZero(ret_shorty));
2834 irb_.restoreIP(irb_ip_original);
2842 irb_.GetInsertBlock()));
2843 irb_.CreateBr(lpad);
2845 irb_.CreateBr(GetUnwindBasicBlock());
2850 llvm::Value* exception_pending = irb_.Runtime().EmitIsExceptionPending();
2856 irb_.GetInsertBlock()));
2857 irb_.CreateCondBr(exception_pending, lpad, block_cont, kUnlikely);
2859 irb_.CreateCondBr(exception_pending, GetUnwindBasicBlock(), block_cont, kUnlikely);
2862 irb_.SetInsertPoint(block_cont);
2871 return irb_.Runtime().EmitGetCurrentThread();
2895 irb_.CreateCall(irb_.GetRuntime(ThrowException),
2902 return irb_.Runtime().EmitGetAndClearException();
2905 return irb_.Runtime().EmitIsExceptionPending();
3693 return irb_.CreateBitCast(call_inst.getArgOperand(0),
3694 irb_.getJFloatTy());
3697 return irb_.CreateBitCast(call_inst.getArgOperand(0),
3698 irb_.getJDoubleTy());
3702 return irb_.getJNull();
3755 return irb_.CreateZExt(irb_.CreateTrunc(call_inst.getArgOperand(0), irb_.getJCharTy()),
3756 irb_.getJIntTy());
3759 return irb_.CreateSExt(irb_.CreateTrunc(call_inst.getArgOperand(0), irb_.getJShortTy()),
3760 irb_.getJIntTy());
3763 return irb_.CreateSExt(irb_.CreateTrunc(call_inst.getArgOperand(0), irb_.getJByteTy()),
3764 irb_.getJIntTy());
3769 UpdatePhiInstruction(current_bb_, irb_.GetInsertBlock());
3772 irb_.CreateBr(si->getDefaultDest());
3779 irb_.CreateMemoryBarrier(art::kStoreStore);