Lines Matching refs:irb_
124 IRBuilder& irb_;
409 : llvm::FunctionPass(ID), intrinsic_helper_(intrinsic_helper), irb_(irb),
489 irb_.SetInsertPoint(inst_iter);
501 llvm::BasicBlock* next_basic_block = irb_.GetInsertBlock();
504 irb_.GetInsertPoint(), curr_basic_block->getInstList(),
524 irb_.SetInsertPoint(bb_iter);
532 llvm::BasicBlock* last_block = irb_.GetInsertBlock();
550 irb_.SetInsertPoint(lbb->begin());
573 llvm::PHINode* new_phi = irb_.CreatePHI(phi->getType(), rewrite_pair.size());
649 return irb_.CreateCall(irb_.GetRuntime(rt));
656 return irb_.CreateCall(irb_.GetRuntime(rt), args);
670 llvm::Value* frame_address = irb_.CreateCall(frameaddress, irb_.getInt32(0));
673 frame_address = irb_.CreatePtrToInt(frame_address, irb_.getPtrEquivIntTy());
677 irb_.Runtime().EmitLoadFromThreadOffset(art::Thread::StackEndOffset().Int32Value(),
678 irb_.getPtrEquivIntTy(),
682 llvm::Value* is_stack_overflow = irb_.CreateICmpULT(frame_address, stack_end);
690 irb_.CreateCondBr(is_stack_overflow, block_exception, block_continue, kUnlikely);
693 irb_.SetInsertPoint(block_exception);
694 irb_.CreateCall(irb_.GetRuntime(ThrowStackOverflowException));
699 irb_.CreateRetVoid();
704 irb_.CreateRet(llvm::UndefValue::get(ret_type));
707 irb_.SetInsertPoint(block_continue);
713 return irb_.LoadFromObjectOffset(method_object_addr,
715 irb_.getJObjectTy(),
724 llvm::Value* type_idx_value = irb_.getPtrEquivInt(type_idx);
734 llvm::Value* method_idx_value = irb_.getPtrEquivInt(method_idx);
744 llvm::Value* string_idx_value = irb_.getPtrEquivInt(string_idx);
750 llvm::Function* parent_func = irb_.GetInsertBlock()->getParent();
756 return irb_.LoadFromObjectOffset(array,
758 irb_.getJIntTy(),
767 return irb_.CreateLoad(callee_method_object_field_addr, kTBAARuntimeInfo);
774 irb_.LoadFromObjectOffset(this_addr,
776 irb_.getJObjectTy(),
781 irb_.LoadFromObjectOffset(class_object_addr,
783 irb_.getJObjectTy(),
788 irb_.getPtrEquivInt(static_cast<uint64_t>(vtable_idx));
793 return irb_.CreateLoad(method_field_addr, kTBAAConstJObject);
809 irb_.getPtrEquivInt(data_offset);
811 llvm::Type* elem_type = irb_.getJType(elem_jty);
814 irb_.CreatePtrDisp(array_addr, data_offset_value,
817 return irb_.CreateGEP(array_data_addr, index_value);
854 irb_.CreateIntToPtr(irb_.getPtrEquivInt(direct_method),
855 irb_.getJObjectTy());
896 irb_.CreateIntToPtr(irb_.getPtrEquivInt(direct_code),
900 irb_.LoadFromObjectOffset(callee_method_object_addr,
907 llvm::Value* retval = irb_.CreateCall(code_addr, args);
944 irb_.LoadFromObjectOffset(this_object,
946 irb_.getJIntTy(),
949 llvm::Value* count_equals_zero = irb_.CreateICmpEQ(string_count,
950 irb_.getJInt(0));
951 llvm::Value* is_empty = irb_.CreateSelect(count_equals_zero,
952 irb_.getJBoolean(true),
953 irb_.getJBoolean(false));
966 irb_.Runtime().EmitLoadFromThreadOffset(art::Thread::ThreadFlagsOffset().Int32Value(),
967 irb_.getInt16Ty(),
969 llvm::Value* is_suspend = irb_.CreateICmpNE(suspend_count, irb_.getInt16(0));
974 irb_.CreateCondBr(is_suspend, basic_block_suspend, basic_block_cont, kUnlikely);
976 irb_.SetInsertPoint(basic_block_suspend);
980 irb_.Runtime().EmitTestSuspend();
983 llvm::Value* exception_pending = irb_.Runtime().EmitIsExceptionPending();
984 irb_.CreateCondBr(exception_pending, basic_block_exception, basic_block_cont, kUnlikely);
986 irb_.SetInsertPoint(basic_block_exception);
989 irb_.CreateRetVoid();
992 irb_.CreateRet(llvm::UndefValue::get(ret_type));
995 irb_.SetInsertPoint(basic_block_cont);
1000 irb_.Runtime().EmitMarkGCCard(call_inst.getArgOperand(0), call_inst.getArgOperand(1));
1011 return irb_.CreateLoad(string_field_addr, kTBAARuntimeInfo);
1022 return irb_.CreateLoad(type_field_addr, kTBAARuntimeInfo);
1041 return irb_.CreateLoad(array_elem_addr, kTBAAHeapArray, elem_jty);
1051 irb_.CreateStore(new_value, array_elem_addr, kTBAAHeapArray, elem_jty);
1077 elem_size = irb_.getPtrEquivInt(sizeof(int32_t));
1078 field_type = irb_.getJIntTy()->getPointerTo();
1080 alignment = irb_.getSizeOfPtrEquivInt();
1081 elem_size = irb_.getSizeOfPtrEquivIntValue();
1082 field_type = irb_.getJObjectTy()->getPointerTo();
1086 irb_.getPtrEquivInt(art::mirror::Array::DataOffset(alignment).Int32Value());
1089 irb_.CreatePtrDisp(array, data_field_offset, field_type);
1095 irb_.CreateStore(reg_value, data_field_addr, kTBAAHeapArray);
1098 irb_.CreatePtrDisp(data_field_addr, elem_size, field_type);
1114 irb_.getJType(field_jty)->getPointerTo();
1116 field_offset_value = irb_.getPtrEquivInt(field_offset);
1119 irb_.CreatePtrDisp(object_addr, field_offset_value, field_type);
1123 return irb_.CreateLoad(field_addr, kTBAAHeapInstance, field_jty);
1137 irb_.getJType(field_jty)->getPointerTo();
1139 field_offset_value = irb_.getPtrEquivInt(field_offset);
1142 irb_.CreatePtrDisp(object_addr, field_offset_value, field_type);
1146 irb_.CreateStore(new_value, field_addr, kTBAAHeapInstance, field_jty);
1160 llvm::Value* static_field_offset_value = irb_.getPtrEquivInt(field_offset);
1163 irb_.CreatePtrDisp(static_storage_addr, static_field_offset_value,
1164 irb_.getJType(field_jty)->getPointerTo());
1168 return irb_.CreateLoad(static_field_addr, kTBAAHeapStatic, field_jty);
1181 llvm::Value* static_field_offset_value = irb_.getPtrEquivInt(field_offset);
1184 irb_.CreatePtrDisp(static_storage_addr, static_field_offset_value,
1185 irb_.getJType(field_jty)->getPointerTo());
1189 irb_.CreateStore(new_value, static_field_addr, kTBAAHeapStatic, field_jty);
1196 return irb_.LoadFromObjectOffset(method_object_addr,
1198 irb_.getJObjectTy(),
1237 irb_.LoadFromObjectOffset(callee_method_object_addr,
1243 llvm::Value* retval = irb_.CreateCall(code_addr, args);
1260 llvm::Type* op_type = irb_.getJType(op_jty);
1261 llvm::Value* zero = irb_.getJZero(op_jty);
1264 llvm::Function* parent = irb_.GetInsertBlock()->getParent();
1270 llvm::Value* is_equal_neg_one = irb_.CreateICmpEQ(divisor, neg_one);
1271 irb_.CreateCondBr(is_equal_neg_one, eq_neg_one, ne_neg_one, kUnlikely);
1274 irb_.SetInsertPoint(eq_neg_one);
1285 eq_result = irb_.CreateSub(zero, dividend);
1290 irb_.CreateBr(neg_one_cont);
1293 irb_.SetInsertPoint(ne_neg_one);
1296 ne_result = irb_.CreateSDiv(dividend, divisor);
1298 ne_result = irb_.CreateSRem(dividend, divisor);
1300 irb_.CreateBr(neg_one_cont);
1302 irb_.SetInsertPoint(neg_one_cont);
1303 irb_.CreatePHI(op_type, 2);
1317 irb_.getShadowFrameTy(num_vregs);
1320 llvm::IRBuilderBase::InsertPoint irb_ip_original = irb_.saveIP();
1322 irb_.SetInsertPoint(&entry_block->front());
1324 shadow_frame_ = irb_.CreateAlloca(shadow_frame_type);
1328 irb_.CreateAlloca(shadow_frame_type->getElementType(0)->getPointerTo());
1330 irb_.restoreIP(irb_ip_original);
1336 irb_.CreateConstGEP2_32(shadow_frame_, 0, 0);
1342 irb_.CreateStore(result, old_shadow_frame_, kTBAARegister);
1357 irb_.getInt32(0), // No pointer displacement
1358 irb_.getInt32(1), // VRegs
1369 llvm::IRBuilderBase::InsertPoint ip = irb_.saveIP();
1370 irb_.SetInsertPoint(static_cast<llvm::Instruction*>(first_non_alloca));
1371 vreg_addr = irb_.CreateGEP(shadow_frame_, gep_index);
1373 irb_.restoreIP(ip);
1376 irb_.CreateStore(value,
1377 irb_.CreateBitCast(vreg_addr, value->getType()->getPointerTo()),
1386 rtb_.EmitPopShadowFrame(irb_.CreateLoad(old_shadow_frame_, kTBAARegister));
1391 irb_.StoreToObjectOffset(shadow_frame_,
1411 irb_.SetInsertPoint(first_non_alloca);
1417 irb_.Runtime().EmitTestSuspend();
1419 llvm::BasicBlock* next_basic_block = irb_.GetInsertBlock();
1423 irb_.GetInsertPoint(), first_basic_block->getInstList(),
1430 UpdatePhiInstruction(first_basic_block, irb_.GetInsertBlock());
1442 llvm::Value* cmp_eq = irb_.CreateFCmpOEQ(src1_value, src2_value);
1446 cmp_lt = irb_.CreateFCmpOLT(src1_value, src2_value);
1448 cmp_lt = irb_.CreateFCmpULT(src1_value, src2_value);
1455 llvm::Value* cmp_eq = irb_.CreateICmpEQ(src1_value, src2_value);
1456 llvm::Value* cmp_lt = irb_.CreateICmpSLT(src1_value, src2_value);
1463 llvm::Constant* zero = irb_.getJInt(0);
1464 llvm::Constant* pos1 = irb_.getJInt(1);
1465 llvm::Constant* neg1 = irb_.getJInt(-1);
1467 llvm::Value* result_lt = irb_.CreateSelect(cmp_lt, neg1, pos1);
1468 llvm::Value* result_eq = irb_.CreateSelect(cmp_eq, zero, result_lt);
1481 src2_value = irb_.CreateAnd(src2_value, 0x1f);
1483 llvm::Value* masked_src2_value = irb_.CreateAnd(src2_value, 0x3f);
1484 src2_value = irb_.CreateZExt(masked_src2_value, irb_.getJLongTy());
1490 return irb_.CreateShl(src1_value, src2_value);
1493 return irb_.CreateAShr(src1_value, src2_value);
1496 return irb_.CreateLShr(src1_value, src2_value);
1508 return irb_.CreateZExt(value, irb_.getJType(kInt));
1511 return irb_.CreateSExt(value, irb_.getJType(kInt));
1531 return irb_.CreateTrunc(value, irb_.getJType(jty));
1558 llvm::Value* array_elem_value = irb_.CreateLoad(array_elem_addr, kTBAAHeapArray, elem_jty);
1581 llvm::Function* runtime_func = irb_.GetRuntime(CheckPutArrayElement);
1583 irb_.CreateCall2(runtime_func, new_value, array_addr);
1590 irb_.CreateStore(new_value, array_elem_addr, kTBAAHeapArray, elem_jty);
1615 runtime_func = irb_.GetRuntime(GetObjectInstance);
1617 runtime_func = irb_.GetRuntime(Get64Instance);
1619 runtime_func = irb_.GetRuntime(Get32Instance);
1622 llvm::ConstantInt* field_idx_value = irb_.getInt32(field_idx);
1628 field_value = irb_.CreateCall3(runtime_func, field_idx_value,
1634 field_value = irb_.CreateBitCast(field_value, irb_.getJType(field_jty));
1640 irb_.getJType(field_jty)->getPointerTo();
1642 llvm::ConstantInt* field_offset_value = irb_.getPtrEquivInt(field_offset.Int32Value());
1645 irb_.CreatePtrDisp(object_addr, field_offset_value, field_type);
1647 field_value = irb_.CreateLoad(field_addr, kTBAAHeapInstance, field_jty);
1651 irb_.CreateMemoryBarrier(art::kLoadAny);
1677 new_value = irb_.CreateBitCast(new_value, irb_.getJType(kInt));
1679 new_value = irb_.CreateBitCast(new_value, irb_.getJType(kLong));
1683 runtime_func = irb_.GetRuntime(SetObjectInstance);
1685 runtime_func = irb_.GetRuntime(Set64Instance);
1687 runtime_func = irb_.GetRuntime(Set32Instance);
1690 llvm::Value* field_idx_value = irb_.getInt32(field_idx);
1696 irb_.CreateCall4(runtime_func, field_idx_value,
1705 irb_.CreateMemoryBarrier(art::kAnyStore);
1709 irb_.getJType(field_jty)->getPointerTo();
1711 llvm::Value* field_offset_value = irb_.getPtrEquivInt(field_offset.Int32Value());
1714 irb_.CreatePtrDisp(object_addr, field_offset_value, field_type);
1717 irb_.CreateStore(new_value, field_addr, kTBAAHeapInstance, field_jty);
1720 irb_.CreateMemoryBarrier(art::kAnyAny);
1735 llvm::Value* type_idx_value = irb_.getInt32(type_idx);
1739 llvm::Value* thread_object_addr = irb_.Runtime().EmitGetCurrentThread();
1741 llvm::Function* runtime_func = irb_.GetRuntime(InitializeTypeAndVerifyAccess);
1746 irb_.CreateCall3(runtime_func, type_idx_value, method_object_addr, thread_object_addr);
1757 llvm::Value* type_object_addr = irb_.CreateLoad(type_field_addr, kTBAARuntimeInfo);
1763 llvm::BasicBlock* block_original = irb_.GetInsertBlock();
1767 irb_.CreateICmpEQ(type_object_addr, irb_.getJNull());
1775 irb_.CreateCondBr(equal_null, block_load_class, block_cont, kUnlikely);
1778 irb_.SetInsertPoint(block_load_class);
1780 llvm::Function* runtime_func = irb_.GetRuntime(InitializeType);
1782 llvm::Constant* type_idx_value = irb_.getInt32(type_idx);
1786 llvm::Value* thread_object_addr = irb_.Runtime().EmitGetCurrentThread();
1791 irb_.CreateCall3(runtime_func, type_idx_value, method_object_addr, thread_object_addr);
1795 llvm::BasicBlock* block_after_load_class = irb_.GetInsertBlock();
1797 irb_.CreateBr(block_cont);
1800 irb_.SetInsertPoint(block_cont);
1802 llvm::PHINode* phi = irb_.CreatePHI(irb_.getJObjectTy(), 2);
1822 llvm::Value* storage_object_addr = irb_.CreateLoad(storage_field_addr, kTBAARuntimeInfo);
1825 llvm::Value* equal_null = irb_.CreateICmpEQ(storage_object_addr, irb_.getJNull());
1827 irb_.CreateCondBr(equal_null, block_load_static, block_check_init, kUnlikely);
1830 irb_.SetInsertPoint(block_check_init);
1833 irb_.LoadFromObjectOffset(storage_object_addr,
1835 irb_.getJIntTy(), kTBAAHeapInstance);
1838 irb_.CreateICmpULT(class_status, irb_.getInt32(art::mirror::Class::kStatusInitialized));
1840 irb_.CreateCondBr(is_not_initialized, block_load_static, block_cont, kUnlikely);
1843 irb_.SetInsertPoint(block_load_static);
1845 llvm::Function* runtime_func = irb_.GetRuntime(InitializeStaticStorage);
1847 llvm::Constant* type_idx_value = irb_.getInt32(type_idx);
1851 llvm::Value* thread_object_addr = irb_.Runtime().EmitGetCurrentThread();
1856 irb_.CreateCall3(runtime_func, type_idx_value, method_object_addr, thread_object_addr);
1860 llvm::BasicBlock* block_after_load_static = irb_.GetInsertBlock();
1862 irb_.CreateBr(block_cont);
1865 irb_.SetInsertPoint(block_cont);
1867 llvm::PHINode* phi = irb_.CreatePHI(irb_.getJObjectTy(), 2);
1873 irb_.CreateMemoryBarrier(art::kLoadAny);
1899 runtime_func = irb_.GetRuntime(GetObjectStatic);
1901 runtime_func = irb_.GetRuntime(Get64Static);
1903 runtime_func = irb_.GetRuntime(Get32Static);
1906 llvm::Constant* field_idx_value = irb_.getInt32(field_idx);
1913 irb_.CreateCall2(runtime_func, field_idx_value, method_object_addr);
1918 static_field_value = irb_.CreateBitCast(static_field_value, irb_.getJType(field_jty));
1930 irb_.LoadFromObjectOffset(method_object_addr,
1932 irb_.getJObjectTy(),
1941 llvm::Value* static_field_offset_value = irb_.getPtrEquivInt(field_offset.Int32Value());
1944 irb_.CreatePtrDisp(static_storage_addr, static_field_offset_value,
1945 irb_.getJType(field_jty)->getPointerTo());
1947 static_field_value = irb_.CreateLoad(static_field_addr, kTBAAHeapStatic, field_jty);
1951 irb_.CreateMemoryBarrier(art::kLoadAny);
1965 new_value = irb_.CreateBitCast(new_value, irb_.getJType(field_jty));
1982 runtime_func = irb_.GetRuntime(SetObjectStatic);
1984 runtime_func = irb_.GetRuntime(Set64Static);
1986 runtime_func = irb_.GetRuntime(Set32Static);
1990 new_value = irb_.CreateBitCast(new_value, irb_.getJType(kInt));
1992 new_value = irb_.CreateBitCast(new_value, irb_.getJType(kLong));
1995 llvm::Constant* field_idx_value = irb_.getInt32(field_idx);
2001 irb_.CreateCall3(runtime_func, field_idx_value,
2016 irb_.LoadFromObjectOffset(method_object_addr,
2018 irb_.getJObjectTy(),
2028 irb_.CreateMemoryBarrier(art::kAnyStore);
2031 llvm::Value* static_field_offset_value = irb_.getPtrEquivInt(field_offset.Int32Value());
2034 irb_.CreatePtrDisp(static_storage_addr, static_field_offset_value,
2035 irb_.getJType(field_jty)->getPointerTo());
2038 irb_.CreateStore(new_value, static_field_addr, kTBAAHeapStatic, field_jty);
2041 irb_.CreateMemoryBarrier(art::kAnyAny);
2058 llvm::Value* string_addr = irb_.CreateLoad(string_field_addr, kTBAARuntimeInfo);
2072 llvm::Value* equal_null = irb_.CreateICmpEQ(string_addr, irb_.getJNull());
2074 irb_.CreateCondBr(equal_null, block_str_resolve, block_str_exist, kUnlikely);
2077 irb_.SetInsertPoint(block_str_exist);
2078 irb_.CreateBr(block_cont);
2081 irb_.SetInsertPoint(block_str_resolve);
2083 llvm::Function* runtime_func = irb_.GetRuntime(ResolveString);
2087 llvm::Value* string_idx_value = irb_.getInt32(string_idx);
2091 llvm::Value* result = irb_.CreateCall2(runtime_func, method_object_addr,
2096 irb_.CreateBr(block_cont);
2099 llvm::BasicBlock* block_pre_cont = irb_.GetInsertBlock();
2101 irb_.SetInsertPoint(block_cont);
2103 llvm::PHINode* phi = irb_.CreatePHI(irb_.getJObjectTy(), 2);
2132 irb_.Runtime().EmitLockObject(object_addr);
2146 irb_.Runtime().EmitUnlockObject(object_addr);
2168 llvm::Value* equal_null = irb_.CreateICmpEQ(object_addr, irb_.getJNull());
2170 irb_.CreateCondBr(equal_null, block_cont, block_test_class, kUnlikely);
2173 irb_.SetInsertPoint(block_test_class);
2177 llvm::PointerType* jobject_ptr_ty = irb_.getJObjectTy();
2180 irb_.CreateBitCast(object_addr, jobject_ptr_ty->getPointerTo());
2183 irb_.CreateLoad(object_type_field_addr, kTBAAConstJObject);
2186 irb_.CreateICmpEQ(type_object_addr, object_type_object_addr);
2188 irb_.CreateCondBr(equal_class, block_cont, block_test_sub_class, kLikely);
2191 irb_.SetInsertPoint(block_test_sub_class);
2195 irb_.CreateCall2(irb_.GetRuntime(CheckCast),
2200 irb_.CreateBr(block_cont);
2202 irb_.SetInsertPoint(block_cont);
2232 llvm::Value* equal_null = irb_.CreateICmpEQ(object_addr, irb_.getJNull());
2234 irb_.CreateCondBr(equal_null, block_nullp, block_test_class, kUnlikely);
2236 irb_.SetInsertPoint(block_nullp);
2237 irb_.CreateBr(block_cont);
2240 irb_.SetInsertPoint(block_test_class);
2244 llvm::PointerType* jobject_ptr_ty = irb_.getJObjectTy();
2247 irb_.CreateBitCast(object_addr, jobject_ptr_ty->getPointerTo());
2250 irb_.CreateLoad(object_type_field_addr, kTBAAConstJObject);
2253 irb_.CreateICmpEQ(type_object_addr, object_type_object_addr);
2255 irb_.CreateCondBr(equal_class, block_class_equals, block_test_sub_class, kLikely);
2257 irb_.SetInsertPoint(block_class_equals);
2258 irb_.CreateBr(block_cont);
2261 irb_.SetInsertPoint(block_test_sub_class);
2263 irb_.CreateCall2(irb_.GetRuntime(IsAssignable),
2265 irb_.CreateBr(block_cont);
2267 irb_.SetInsertPoint(block_cont);
2269 llvm::PHINode* phi = irb_.CreatePHI(irb_.getJIntTy(), 3);
2271 irb_.getJInt(0), block_nullp);
2272 phi->addIncoming(irb_.getJInt(1), block_class_equals);
2286 runtime_func = irb_.GetRuntime(AllocObject);
2288 runtime_func = irb_.GetRuntime(AllocObjectWithAccessCheck);
2291 llvm::Constant* type_index_value = irb_.getInt32(type_idx);
2295 llvm::Value* thread_object_addr = irb_.Runtime().EmitGetCurrentThread();
2300 irb_.CreateCall3(runtime_func, type_index_value, method_object_addr, thread_object_addr);
2354 EmitAllocNewArray(dex_pc, irb_.getInt32(length), type_idx, true);
2375 elem_size = irb_.getPtrEquivInt(sizeof(int32_t));
2376 field_type = irb_.getJIntTy()->getPointerTo();
2378 alignment = irb_.getSizeOfPtrEquivInt();
2379 elem_size = irb_.getSizeOfPtrEquivIntValue();
2380 field_type = irb_.getJObjectTy()->getPointerTo();
2384 irb_.getPtrEquivInt(art::mirror::Array::DataOffset(alignment).Int32Value());
2387 irb_.CreatePtrDisp(object_addr, data_field_offset, field_type);
2396 irb_.CreateStore(reg_value, data_field_addr, kTBAAHeapArray);
2399 irb_.CreatePtrDisp(data_field_addr, elem_size, field_type);
2427 llvm::Function* runtime_func = irb_.GetRuntime(FillArrayData);
2433 irb_.CreateCall4(runtime_func,
2434 method_object_addr, irb_.getInt32(dex_pc),
2435 array_addr, irb_.getInt32(payload_offset));
2456 irb_.GetRuntime(CheckAndAllocArray) :
2457 irb_.GetRuntime(CheckAndAllocArrayWithAccessCheck);
2460 irb_.GetRuntime(AllocArray) :
2461 irb_.GetRuntime(AllocArrayWithAccessCheck);
2464 llvm::Constant* type_index_value = irb_.getInt32(type_idx);
2468 llvm::Value* thread_object_addr = irb_.Runtime().EmitGetCurrentThread();
2473 irb_.CreateCall4(runtime_func, type_index_value, method_object_addr,
2491 runtime_func = irb_.GetRuntime(FindStaticMethodWithAccessCheck);
2495 runtime_func = irb_.GetRuntime(FindDirectMethodWithAccessCheck);
2499 runtime_func = irb_.GetRuntime(FindVirtualMethodWithAccessCheck);
2503 runtime_func = irb_.GetRuntime(FindSuperMethodWithAccessCheck);
2508 runtime_func = irb_.GetRuntime(FindInterfaceMethod);
2510 runtime_func = irb_.GetRuntime(FindInterfaceMethodWithAccessCheck);
2515 llvm::Value* callee_method_idx_value = irb_.getInt32(callee_method_idx);
2519 this_addr = irb_.getJNull();
2524 llvm::Value* thread_object_addr = irb_.Runtime().EmitGetCurrentThread();
2529 irb_.CreateCall4(runtime_func,
2542 irb_.Runtime().EmitMarkGCCard(value, target_addr);
2549 irb_.StoreToObjectOffset(shadow_frame_,
2551 irb_.getInt32(dex_pc),
2560 llvm::Constant* zero = irb_.getJZero(op_jty);
2562 llvm::Value* equal_zero = irb_.CreateICmpEQ(denominator, zero);
2568 irb_.CreateCondBr(equal_zero, block_exception, block_continue, kUnlikely);
2570 irb_.SetInsertPoint(block_exception);
2572 irb_.CreateCall(irb_.GetRuntime(ThrowDivZeroException));
2575 irb_.SetInsertPoint(block_continue);
2589 irb_.GetInsertBlock()));
2594 irb_.CreateCondBr(irb_.getFalse(), lpad, block_continue, kUnlikely);
2596 irb_.SetInsertPoint(block_continue);
2599 llvm::Value* equal_null = irb_.CreateICmpEQ(object, irb_.getJNull());
2607 irb_.CreateCondBr(equal_null, block_exception, block_continue, kUnlikely);
2609 irb_.SetInsertPoint(block_exception);
2611 irb_.CreateCall(irb_.GetRuntime(ThrowNullPointerException),
2612 irb_.getInt32(dex_pc));
2615 irb_.SetInsertPoint(block_continue);
2632 irb_.GetInsertBlock()));
2637 irb_.CreateCondBr(irb_.getFalse(), lpad, block_continue, kUnlikely);
2639 irb_.SetInsertPoint(block_continue);
2644 llvm::Value* cmp = irb_.CreateICmpUGE(index, array_len);
2652 irb_.CreateCondBr(cmp, block_exception, block_continue, kUnlikely);
2654 irb_.SetInsertPoint(block_exception);
2657 irb_.CreateCall2(irb_.GetRuntime(ThrowIndexOutOfBounds), index, array_len);
2660 irb_.SetInsertPoint(block_continue);
2677 args_type.push_back(irb_.getJObjectTy()); // method object pointer
2680 args_type.push_back(irb_.getJType('L')); // "this" object pointer
2685 args_type.push_back(irb_.getJType(shorty_type));
2765 llvm::IRBuilderBase::InsertPoint irb_ip_original = irb_.saveIP();
2766 irb_.SetInsertPoint(block_lpad);
2771 llvm::Value* ti_offset_value = irb_.getInt32(ti_offset);
2774 irb_.CreateCall2(irb_.GetRuntime(FindCatchBlock),
2779 irb_.CreateSwitch(catch_handler_index_value, GetUnwindBasicBlock());
2785 sw->addCase(irb_.getInt32(c), GetBasicBlock(iter.GetHandlerAddress()));
2789 irb_.restoreIP(irb_ip_original);
2809 llvm::IRBuilderBase::InsertPoint irb_ip_original = irb_.saveIP();
2810 irb_.SetInsertPoint(basic_block_unwind_);
2819 irb_.CreateRetVoid();
2821 irb_.CreateRet(irb_.getJZero(ret_shorty));
2825 irb_.restoreIP(irb_ip_original);
2833 irb_.GetInsertBlock()));
2834 irb_.CreateBr(lpad);
2836 irb_.CreateBr(GetUnwindBasicBlock());
2841 llvm::Value* exception_pending = irb_.Runtime().EmitIsExceptionPending();
2847 irb_.GetInsertBlock()));
2848 irb_.CreateCondBr(exception_pending, lpad, block_cont, kUnlikely);
2850 irb_.CreateCondBr(exception_pending, GetUnwindBasicBlock(), block_cont, kUnlikely);
2853 irb_.SetInsertPoint(block_cont);
2862 return irb_.Runtime().EmitGetCurrentThread();
2886 irb_.CreateCall(irb_.GetRuntime(ThrowException),
2893 return irb_.Runtime().EmitGetAndClearException();
2896 return irb_.Runtime().EmitIsExceptionPending();
3681 return irb_.CreateBitCast(call_inst.getArgOperand(0),
3682 irb_.getJFloatTy());
3685 return irb_.CreateBitCast(call_inst.getArgOperand(0),
3686 irb_.getJDoubleTy());
3690 return irb_.getJNull();
3743 return irb_.CreateZExt(irb_.CreateTrunc(call_inst.getArgOperand(0), irb_.getJCharTy()),
3744 irb_.getJIntTy());
3747 return irb_.CreateSExt(irb_.CreateTrunc(call_inst.getArgOperand(0), irb_.getJShortTy()),
3748 irb_.getJIntTy());
3751 return irb_.CreateSExt(irb_.CreateTrunc(call_inst.getArgOperand(0), irb_.getJByteTy()),
3752 irb_.getJIntTy());
3757 UpdatePhiInstruction(current_bb_, irb_.GetInsertBlock());
3760 irb_.CreateBr(si->getDefaultDest());
3767 irb_.CreateMemoryBarrier(art::kStoreStore);