Go to the source code of this file.
| Functions |
|
|
STATISTIC (NumReadNone, "Number of functions inferred as readnone") |
|
STATISTIC (NumInaccessibleMemOnly, "Number of functions inferred as inaccessiblememonly") |
|
STATISTIC (NumReadOnly, "Number of functions inferred as readonly") |
|
STATISTIC (NumWriteOnly, "Number of functions inferred as writeonly") |
|
STATISTIC (NumArgMemOnly, "Number of functions inferred as argmemonly") |
|
STATISTIC (NumWriteErrnoMemOnly, "Number of functions inferred as memory(errnomem: write)") |
|
STATISTIC (NumInaccessibleMemOrArgMemOnly, "Number of functions inferred as inaccessiblemem_or_argmemonly") |
|
STATISTIC (NumWriteArgumentMemOrErrnoMemOnly, "Number of functions inferred as memory(argmem: write, errnomem: write)") |
|
STATISTIC (NumNoUnwind, "Number of functions inferred as nounwind") |
|
STATISTIC (NumNoCallback, "Number of functions inferred as nocallback") |
|
STATISTIC (NumNoCapture, "Number of arguments inferred as nocapture") |
|
STATISTIC (NumWriteOnlyArg, "Number of arguments inferred as writeonly") |
|
STATISTIC (NumReadOnlyArg, "Number of arguments inferred as readonly") |
|
STATISTIC (NumNoAlias, "Number of function returns inferred as noalias") |
|
STATISTIC (NumNoUndef, "Number of function returns inferred as noundef returns") |
|
STATISTIC (NumReturnedArg, "Number of arguments inferred as returned") |
|
STATISTIC (NumWillReturn, "Number of functions inferred as willreturn") |
|
STATISTIC (NumCold, "Number of functions inferred as cold") |
|
STATISTIC (NumNoReturn, "Number of functions inferred as no return") |
| static bool |
setDoesNotAccessMemory (Function &F) |
| static bool |
setIsCold (Function &F) |
| static bool |
setNoReturn (Function &F) |
| static bool |
setMemoryEffects (Function &F, MemoryEffects ME) |
| static bool |
setOnlyAccessesInaccessibleMemory (Function &F) |
| static bool |
setOnlyReadsMemory (Function &F) |
| static bool |
setOnlyWritesMemory (Function &F) |
| static bool |
setOnlyAccessesArgMemory (Function &F) |
| static bool |
setOnlyAccessesInaccessibleMemOrArgMem (Function &F) |
| static bool |
setOnlyWritesErrnoMemory (Function &F) |
| static bool |
setOnlyWritesArgMemOrErrnoMem (Function &F) |
| static bool |
setDoesNotThrow (Function &F) |
| static bool |
setDoesNotCallback (Function &F) |
| static bool |
setRetDoesNotAlias (Function &F) |
| static bool |
setDoesNotCapture (Function &F, unsigned ArgNo) |
| static bool |
setDoesNotAlias (Function &F, unsigned ArgNo) |
| static bool |
setOnlyReadsMemory (Function &F, unsigned ArgNo) |
| static bool |
setOnlyWritesMemory (Function &F, unsigned ArgNo) |
| static bool |
setRetNoUndef (Function &F) |
| static bool |
setArgsNoUndef (Function &F) |
| static bool |
setArgNoUndef (Function &F, unsigned ArgNo) |
| static bool |
setRetAndArgsNoUndef (Function &F) |
| static bool |
setReturnedArg (Function &F, unsigned ArgNo) |
| static bool |
setNonLazyBind (Function &F) |
| static bool |
setDoesNotFreeMemory (Function &F) |
| static bool |
setWillReturn (Function &F) |
| static bool |
setAlignedAllocParam (Function &F, unsigned ArgNo) |
| static bool |
setAllocatedPointerParam (Function &F, unsigned ArgNo) |
| static bool |
setAllocSize (Function &F, unsigned ElemSizeArg, std::optional< unsigned > NumElemsArg) |
| static bool |
setAllocFamily (Function &F, StringRef Family) |
| static bool |
setAllocKind (Function &F, AllocFnKind K) |
| static void |
setArgExtAttr (Function &F, unsigned ArgNo, const TargetLibraryInfo &TLI, bool Signed=true) |
| static void |
setRetExtAttr (Function &F, const TargetLibraryInfo &TLI, bool Signed=true) |
| static IntegerType * |
getIntTy (IRBuilderBase &B, const TargetLibraryInfo *TLI) |
| static IntegerType * |
getSizeTTy (IRBuilderBase &B, const TargetLibraryInfo *TLI) |
| static Value * |
emitLibCall (LibFunc TheLibFunc, Type *ReturnType, ArrayRef< Type * > ParamTypes, ArrayRef< Value * > Operands, IRBuilderBase &B, const TargetLibraryInfo *TLI, bool IsVaArgs=false) |
| static void |
appendTypeSuffix (Value *Op, StringRef &Name, SmallString< 20 > &NameBuffer) |
|
Append a suffix to the function name according to the type of 'Op'. |
| static Value * |
emitUnaryFloatFnCallHelper (Value *Op, LibFunc TheLibFunc, StringRef Name, IRBuilderBase &B, const AttributeList &Attrs, const TargetLibraryInfo *TLI) |
| static Value * |
emitBinaryFloatFnCallHelper (Value *Op1, Value *Op2, LibFunc TheLibFunc, StringRef Name, IRBuilderBase &B, const AttributeList &Attrs, const TargetLibraryInfo *TLI) |
◆ DEBUG_TYPE
#define DEBUG_TYPE "build-libcalls"
◆ appendTypeSuffix()
◆ emitBinaryFloatFnCallHelper()
◆ emitLibCall()
Definition at line 1612 of file BuildLibCalls.cpp.
References B(), llvm::dyn_cast(), F, llvm::FunctionType::get(), llvm::TargetLibraryInfo::getName(), llvm::getOrInsertLibFunc(), llvm::inferNonMandatoryLibFuncAttrs(), llvm::isLibFuncEmittable(), and llvm::CallBase::setCallingConv().
Referenced by llvm::emitBCmp(), llvm::emitMemCCpy(), llvm::emitMemChr(), llvm::emitMemCmp(), llvm::emitMemPCpy(), llvm::emitMemRChr(), llvm::emitSNPrintf(), llvm::emitSPrintf(), llvm::emitStpCpy(), llvm::emitStpNCpy(), llvm::emitStrCat(), llvm::emitStrChr(), llvm::emitStrCpy(), llvm::emitStrDup(), llvm::emitStrLCat(), llvm::emitStrLCpy(), llvm::emitStrLen(), llvm::emitStrNCat(), llvm::emitStrNCmp(), llvm::emitStrNCpy(), llvm::emitVSNPrintf(), llvm::emitVSPrintf(), and llvm::emitWcsLen().
◆ emitUnaryFloatFnCallHelper()
◆ getIntTy()
Definition at line 1603 of file BuildLibCalls.cpp.
References B(), and llvm::TargetLibraryInfo::getIntSize().
Referenced by llvm::emitBCmp(), llvm::emitFPutC(), llvm::emitFPutS(), llvm::emitMemCCpy(), llvm::emitMemChr(), llvm::emitMemCmp(), llvm::emitMemRChr(), llvm::emitPutChar(), llvm::emitPutS(), llvm::emitSNPrintf(), llvm::emitSPrintf(), llvm::emitStrChr(), llvm::emitStrNCmp(), llvm::emitVSNPrintf(), and llvm::emitVSPrintf().
◆ getSizeTTy()
Definition at line 1607 of file BuildLibCalls.cpp.
References B(), and llvm::TargetLibraryInfo::getSizeTSize().
Referenced by llvm::emitBCmp(), llvm::emitCalloc(), llvm::emitFWrite(), llvm::emitMalloc(), llvm::emitMemCCpy(), llvm::emitMemChr(), llvm::emitMemCmp(), llvm::emitMemCpyChk(), llvm::emitMemPCpy(), llvm::emitMemRChr(), llvm::emitSNPrintf(), llvm::emitStpNCpy(), llvm::emitStrLCat(), llvm::emitStrLCpy(), llvm::emitStrLen(), llvm::emitStrNCat(), llvm::emitStrNCmp(), llvm::emitStrNCpy(), llvm::emitVSNPrintf(), and llvm::emitWcsLen().
◆ setAlignedAllocParam()
◆ setAllocatedPointerParam()
◆ setAllocFamily()
◆ setAllocKind()
◆ setAllocSize()
◆ setArgExtAttr()
◆ setArgNoUndef()
◆ setArgsNoUndef()
◆ setDoesNotAccessMemory()
◆ setDoesNotAlias()
◆ setDoesNotCallback()
◆ setDoesNotCapture()
◆ setDoesNotFreeMemory()
◆ setDoesNotThrow()
◆ setIsCold()
◆ setMemoryEffects()
◆ setNonLazyBind()
◆ setNoReturn()
◆ setOnlyAccessesArgMemory()
◆ setOnlyAccessesInaccessibleMemOrArgMem()
| bool setOnlyAccessesInaccessibleMemOrArgMem ( Function & F) |
static |
◆ setOnlyAccessesInaccessibleMemory()
| bool setOnlyAccessesInaccessibleMemory ( Function & F) |
static |
◆ setOnlyReadsMemory() [1/2]
◆ setOnlyReadsMemory() [2/2]
◆ setOnlyWritesArgMemOrErrnoMem()
◆ setOnlyWritesErrnoMemory()
◆ setOnlyWritesMemory() [1/2]
◆ setOnlyWritesMemory() [2/2]
◆ setRetAndArgsNoUndef()
◆ setRetDoesNotAlias()
◆ setRetExtAttr()
◆ setRetNoUndef()
◆ setReturnedArg()
◆ setWillReturn()
◆ STATISTIC() [1/19]
| STATISTIC |
( |
NumArgMemOnly |
, |
| "Number of functions inferred as argmemonly" |
) |
|
|
◆ STATISTIC() [2/19]
| STATISTIC |
( |
NumCold |
, |
| "Number of functions inferred as cold" |
) |
|
|
◆ STATISTIC() [3/19]
| STATISTIC |
( |
NumInaccessibleMemOnly |
, |
| "Number of functions inferred as inaccessiblememonly" |
) |
|
|
◆ STATISTIC() [4/19]
| STATISTIC |
( |
NumInaccessibleMemOrArgMemOnly |
, |
| "Number of functions inferred as inaccessiblemem_or_argmemonly" |
) |
|
|
◆ STATISTIC() [5/19]
| STATISTIC |
( |
NumNoAlias |
, |
| "Number of function returns inferred as noalias" |
) |
|
|
◆ STATISTIC() [6/19]
| STATISTIC |
( |
NumNoCallback |
, |
| "Number of functions inferred as nocallback" |
) |
|
|
◆ STATISTIC() [7/19]
| STATISTIC |
( |
NumNoCapture |
, |
| "Number of arguments inferred as nocapture" |
) |
|
|
◆ STATISTIC() [8/19]
| STATISTIC |
( |
NumNoReturn |
, |
| "Number of functions inferred as no return" |
) |
|
|
◆ STATISTIC() [9/19]
| STATISTIC |
( |
NumNoUndef |
, |
| "Number of function returns inferred as noundef returns" |
) |
|
|
◆ STATISTIC() [10/19]
| STATISTIC |
( |
NumNoUnwind |
, |
| "Number of functions inferred as nounwind" |
) |
|
|
◆ STATISTIC() [11/19]
| STATISTIC |
( |
NumReadNone |
, |
| "Number of functions inferred as readnone" |
) |
|
|
◆ STATISTIC() [12/19]
| STATISTIC |
( |
NumReadOnly |
, |
| "Number of functions inferred as readonly" |
) |
|
|
◆ STATISTIC() [13/19]
| STATISTIC |
( |
NumReadOnlyArg |
, |
| "Number of arguments inferred as readonly" |
) |
|
|
◆ STATISTIC() [14/19]
| STATISTIC |
( |
NumReturnedArg |
, |
| "Number of arguments inferred as returned" |
) |
|
|
◆ STATISTIC() [15/19]
| STATISTIC |
( |
NumWillReturn |
, |
| "Number of functions inferred as willreturn" |
) |
|
|
◆ STATISTIC() [16/19]
| STATISTIC |
( |
NumWriteArgumentMemOrErrnoMemOnly |
, |
| "Number of functions inferred as memory(argmem: write, errnomem: write)" |
) |
|
|
◆ STATISTIC() [17/19]
| STATISTIC |
( |
NumWriteErrnoMemOnly |
, |
| "Number of functions inferred as memory(errnomem: write)" |
) |
|
|
◆ STATISTIC() [18/19]
| STATISTIC |
( |
NumWriteOnly |
, |
| "Number of functions inferred as writeonly" |
) |
|
|
◆ STATISTIC() [19/19]
| STATISTIC |
( |
NumWriteOnlyArg |
, |
| "Number of arguments inferred as writeonly" |
) |
|
|