Lines Matching defs:B
1439 static IntegerType *getIntTy(IRBuilderBase &B, const TargetLibraryInfo *TLI) {
1440 return B.getIntNTy(TLI->getIntSize());
1443 static IntegerType *getSizeTTy(IRBuilderBase &B, const TargetLibraryInfo *TLI) {
1444 const Module *M = B.GetInsertBlock()->getModule();
1445 return B.getIntNTy(TLI->getSizeTSize(*M));
1450 ArrayRef<Value *> Operands, IRBuilderBase &B,
1453 Module *M = B.GetInsertBlock()->getModule();
1461 CallInst *CI = B.CreateCall(Callee, Operands, FuncName);
1468 Value *llvm::emitStrLen(Value *Ptr, IRBuilderBase &B, const DataLayout &DL,
1470 Type *CharPtrTy = B.getPtrTy();
1471 Type *SizeTTy = getSizeTTy(B, TLI);
1472 return emitLibCall(LibFunc_strlen, SizeTTy, CharPtrTy, Ptr, B, TLI);
1475 Value *llvm::emitStrDup(Value *Ptr, IRBuilderBase &B,
1477 Type *CharPtrTy = B.getPtrTy();
1478 return emitLibCall(LibFunc_strdup, CharPtrTy, CharPtrTy, Ptr, B, TLI);
1481 Value *llvm::emitStrChr(Value *Ptr, char C, IRBuilderBase &B,
1483 Type *CharPtrTy = B.getPtrTy();
1484 Type *IntTy = getIntTy(B, TLI);
1486 {Ptr, ConstantInt::get(IntTy, C)}, B, TLI);
1489 Value *llvm::emitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilderBase &B,
1491 Type *CharPtrTy = B.getPtrTy();
1492 Type *IntTy = getIntTy(B, TLI);
1493 Type *SizeTTy = getSizeTTy(B, TLI);
1497 {Ptr1, Ptr2, Len}, B, TLI);
1500 Value *llvm::emitStrCpy(Value *Dst, Value *Src, IRBuilderBase &B,
1504 {Dst, Src}, B, TLI);
1507 Value *llvm::emitStpCpy(Value *Dst, Value *Src, IRBuilderBase &B,
1509 Type *CharPtrTy = B.getPtrTy();
1511 {Dst, Src}, B, TLI);
1514 Value *llvm::emitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilderBase &B,
1516 Type *CharPtrTy = B.getPtrTy();
1517 Type *SizeTTy = getSizeTTy(B, TLI);
1519 {Dst, Src, Len}, B, TLI);
1522 Value *llvm::emitStpNCpy(Value *Dst, Value *Src, Value *Len, IRBuilderBase &B,
1524 Type *CharPtrTy = B.getPtrTy();
1525 Type *SizeTTy = getSizeTTy(B, TLI);
1527 {Dst, Src, Len}, B, TLI);
1531 IRBuilderBase &B, const DataLayout &DL,
1533 Module *M = B.GetInsertBlock()->getModule();
1540 Type *VoidPtrTy = B.getPtrTy();
1541 Type *SizeTTy = getSizeTTy(B, TLI);
1545 CallInst *CI = B.CreateCall(MemCpy, {Dst, Src, Len, ObjSize});
1552 Value *llvm::emitMemPCpy(Value *Dst, Value *Src, Value *Len, IRBuilderBase &B,
1554 Type *VoidPtrTy = B.getPtrTy();
1555 Type *SizeTTy = getSizeTTy(B, TLI);
1558 {Dst, Src, Len}, B, TLI);
1561 Value *llvm::emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilderBase &B,
1563 Type *VoidPtrTy = B.getPtrTy();
1564 Type *IntTy = getIntTy(B, TLI);
1565 Type *SizeTTy = getSizeTTy(B, TLI);
1568 {Ptr, Val, Len}, B, TLI);
1571 Value *llvm::emitMemRChr(Value *Ptr, Value *Val, Value *Len, IRBuilderBase &B,
1573 Type *VoidPtrTy = B.getPtrTy();
1574 Type *IntTy = getIntTy(B, TLI);
1575 Type *SizeTTy = getSizeTTy(B, TLI);
1578 {Ptr, Val, Len}, B, TLI);
1581 Value *llvm::emitMemCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilderBase &B,
1583 Type *VoidPtrTy = B.getPtrTy();
1584 Type *IntTy = getIntTy(B, TLI);
1585 Type *SizeTTy = getSizeTTy(B, TLI);
1588 {Ptr1, Ptr2, Len}, B, TLI);
1591 Value *llvm::emitBCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilderBase &B,
1593 Type *VoidPtrTy = B.getPtrTy();
1594 Type *IntTy = getIntTy(B, TLI);
1595 Type *SizeTTy = getSizeTTy(B, TLI);
1598 {Ptr1, Ptr2, Len}, B, TLI);
1602 IRBuilderBase &B, const TargetLibraryInfo *TLI) {
1603 Type *VoidPtrTy = B.getPtrTy();
1604 Type *IntTy = getIntTy(B, TLI);
1605 Type *SizeTTy = getSizeTTy(B, TLI);
1608 {Ptr1, Ptr2, Val, Len}, B, TLI);
1612 ArrayRef<Value *> VariadicArgs, IRBuilderBase &B,
1614 Type *CharPtrTy = B.getPtrTy();
1615 Type *IntTy = getIntTy(B, TLI);
1616 Type *SizeTTy = getSizeTTy(B, TLI);
1621 Args, B, TLI, /*IsVaArgs=*/true);
1625 ArrayRef<Value *> VariadicArgs, IRBuilderBase &B,
1627 Type *CharPtrTy = B.getPtrTy();
1628 Type *IntTy = getIntTy(B, TLI);
1632 {CharPtrTy, CharPtrTy}, Args, B, TLI,
1636 Value *llvm::emitStrCat(Value *Dest, Value *Src, IRBuilderBase &B,
1638 Type *CharPtrTy = B.getPtrTy();
1641 {Dest, Src}, B, TLI);
1644 Value *llvm::emitStrLCpy(Value *Dest, Value *Src, Value *Size, IRBuilderBase &B,
1646 Type *CharPtrTy = B.getPtrTy();
1647 Type *SizeTTy = getSizeTTy(B, TLI);
1650 {Dest, Src, Size}, B, TLI);
1653 Value *llvm::emitStrLCat(Value *Dest, Value *Src, Value *Size, IRBuilderBase &B,
1655 Type *CharPtrTy = B.getPtrTy();
1656 Type *SizeTTy = getSizeTTy(B, TLI);
1659 {Dest, Src, Size}, B, TLI);
1662 Value *llvm::emitStrNCat(Value *Dest, Value *Src, Value *Size, IRBuilderBase &B,
1664 Type *CharPtrTy = B.getPtrTy();
1665 Type *SizeTTy = getSizeTTy(B, TLI);
1668 {Dest, Src, Size}, B, TLI);
1672 IRBuilderBase &B, const TargetLibraryInfo *TLI) {
1673 Type *CharPtrTy = B.getPtrTy();
1674 Type *IntTy = getIntTy(B, TLI);
1675 Type *SizeTTy = getSizeTTy(B, TLI);
1679 {Dest, Size, Fmt, VAList}, B, TLI);
1683 IRBuilderBase &B, const TargetLibraryInfo *TLI) {
1684 Type *CharPtrTy = B.getPtrTy();
1685 Type *IntTy = getIntTy(B, TLI);
1688 {Dest, Fmt, VAList}, B, TLI);
1707 StringRef Name, IRBuilderBase &B,
1712 Module *M = B.GetInsertBlock()->getModule();
1715 CallInst *CI = B.CreateCall(Callee, Op, Name);
1721 Attrs.removeFnAttribute(B.getContext(), Attribute::Speculatable));
1730 StringRef Name, IRBuilderBase &B,
1738 return emitUnaryFloatFnCallHelper(Op, TheLibFunc, Name, B, Attrs, TLI);
1743 LibFunc LongDoubleFn, IRBuilderBase &B,
1746 Module *M = B.GetInsertBlock()->getModule();
1751 return emitUnaryFloatFnCallHelper(Op, TheLibFunc, Name, B, Attrs, TLI);
1756 StringRef Name, IRBuilderBase &B,
1761 Module *M = B.GetInsertBlock()->getModule();
1765 CallInst *CI = B.CreateCall(Callee, { Op1, Op2 }, Name);
1771 Attrs.removeFnAttribute(B.getContext(), Attribute::Speculatable));
1781 StringRef Name, IRBuilderBase &B,
1791 return emitBinaryFloatFnCallHelper(Op1, Op2, TheLibFunc, Name, B, Attrs, TLI);
1797 LibFunc LongDoubleFn, IRBuilderBase &B,
1800 Module *M = B.GetInsertBlock()->getModule();
1805 return emitBinaryFloatFnCallHelper(Op1, Op2, TheLibFunc, Name, B, Attrs, TLI);
1810 Value *llvm::emitPutChar(Value *Char, IRBuilderBase &B,
1812 Module *M = B.GetInsertBlock()->getModule();
1816 Type *IntTy = getIntTy(B, TLI);
1821 CallInst *CI = B.CreateCall(PutChar, Char, PutCharName);
1829 Value *llvm::emitPutS(Value *Str, IRBuilderBase &B,
1831 Module *M = B.GetInsertBlock()->getModule();
1835 Type *IntTy = getIntTy(B, TLI);
1838 B.getPtrTy());
1840 CallInst *CI = B.CreateCall(PutS, Str, PutsName);
1847 Value *llvm::emitFPutC(Value *Char, Value *File, IRBuilderBase &B,
1849 Module *M = B.GetInsertBlock()->getModule();
1853 Type *IntTy = getIntTy(B, TLI);
1859 CallInst *CI = B.CreateCall(F, {Char, File}, FPutcName);
1867 Value *llvm::emitFPutS(Value *Str, Value *File, IRBuilderBase &B,
1869 Module *M = B.GetInsertBlock()->getModule();
1873 Type *IntTy = getIntTy(B, TLI);
1876 B.getPtrTy(), File->getType());
1879 CallInst *CI = B.CreateCall(F, {Str, File}, FPutsName);
1887 Value *llvm::emitFWrite(Value *Ptr, Value *Size, Value *File, IRBuilderBase &B,
1889 Module *M = B.GetInsertBlock()->getModule();
1893 Type *SizeTTy = getSizeTTy(B, TLI);
1896 SizeTTy, B.getPtrTy(), SizeTTy,
1902 B.CreateCall(F, {Ptr, Size,
1911 Value *llvm::emitMalloc(Value *Num, IRBuilderBase &B, const DataLayout &DL,
1913 Module *M = B.GetInsertBlock()->getModule();
1918 Type *SizeTTy = getSizeTTy(B, TLI);
1920 B.getPtrTy(), SizeTTy);
1922 CallInst *CI = B.CreateCall(Malloc, Num, MallocName);
1931 Value *llvm::emitCalloc(Value *Num, Value *Size, IRBuilderBase &B,
1933 Module *M = B.GetInsertBlock()->getModule();
1938 Type *SizeTTy = getSizeTTy(B, &TLI);
1940 B.getPtrTy(), SizeTTy, SizeTTy);
1942 CallInst *CI = B.CreateCall(Calloc, {Num, Size}, CallocName);
1951 Value *llvm::emitHotColdNew(Value *Num, IRBuilderBase &B,
1954 Module *M = B.GetInsertBlock()->getModule();
1959 FunctionCallee Func = M->getOrInsertFunction(Name, B.getPtrTy(),
1960 Num->getType(), B.getInt8Ty());
1962 CallInst *CI = B.CreateCall(Func, {Num, B.getInt8(HotCold)}, Name);
1971 Value *llvm::emitHotColdNewNoThrow(Value *Num, Value *NoThrow, IRBuilderBase &B,
1974 Module *M = B.GetInsertBlock()->getModule();
1980 M->getOrInsertFunction(Name, B.getPtrTy(), Num->getType(),
1981 NoThrow->getType(), B.getInt8Ty());
1983 CallInst *CI = B.CreateCall(Func, {Num, NoThrow, B.getInt8(HotCold)}, Name);
1992 Value *llvm::emitHotColdNewAligned(Value *Num, Value *Align, IRBuilderBase &B,
1995 Module *M = B.GetInsertBlock()->getModule();
2001 Name, B.getPtrTy(), Num->getType(), Align->getType(), B.getInt8Ty());
2003 CallInst *CI = B.CreateCall(Func, {Num, Align, B.getInt8(HotCold)}, Name);
2013 Value *NoThrow, IRBuilderBase &B,
2016 Module *M = B.GetInsertBlock()->getModule();
2022 Name, B.getPtrTy(), Num->getType(), Align->getType(),
2023 NoThrow->getType(), B.getInt8Ty());
2026 B.CreateCall(Func, {Num, Align, NoThrow, B.getInt8(HotCold)}, Name);