LLVM 20.0.0git
Namespaces | Functions
BuildLibCalls.h File Reference
#include "llvm/Analysis/TargetLibraryInfo.h"

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Functions

bool llvm::inferNonMandatoryLibFuncAttrs (Module *M, StringRef Name, const TargetLibraryInfo &TLI)
 Analyze the name and prototype of the given function and set any applicable attributes.
 
bool llvm::inferNonMandatoryLibFuncAttrs (Function &F, const TargetLibraryInfo &TLI)
 
FunctionCallee llvm::getOrInsertLibFunc (Module *M, const TargetLibraryInfo &TLI, LibFunc TheLibFunc, FunctionType *T, AttributeList AttributeList)
 Calls getOrInsertFunction() and then makes sure to add mandatory argument attributes.
 
FunctionCallee llvm::getOrInsertLibFunc (Module *M, const TargetLibraryInfo &TLI, LibFunc TheLibFunc, FunctionType *T)
 
template<typename... ArgsTy>
FunctionCallee llvm::getOrInsertLibFunc (Module *M, const TargetLibraryInfo &TLI, LibFunc TheLibFunc, AttributeList AttributeList, Type *RetTy, ArgsTy... Args)
 
template<typename... ArgsTy>
FunctionCallee llvm::getOrInsertLibFunc (Module *M, const TargetLibraryInfo &TLI, LibFunc TheLibFunc, Type *RetTy, ArgsTy... Args)
 Same as above, but without the attributes.
 
template<typename... ArgsTy>
FunctionCallee llvm::getOrInsertLibFunc (Module *M, const TargetLibraryInfo &TLI, LibFunc TheLibFunc, AttributeList AttributeList, FunctionType *Invalid, ArgsTy... Args)=delete
 
void llvm::markRegisterParameterAttributes (Function *F)
 
bool llvm::isLibFuncEmittable (const Module *M, const TargetLibraryInfo *TLI, LibFunc TheLibFunc)
 Check whether the library function is available on target and also that it in the current Module is a Function with the right type.
 
bool llvm::isLibFuncEmittable (const Module *M, const TargetLibraryInfo *TLI, StringRef Name)
 
bool llvm::hasFloatFn (const Module *M, const TargetLibraryInfo *TLI, Type *Ty, LibFunc DoubleFn, LibFunc FloatFn, LibFunc LongDoubleFn)
 Check whether the overloaded floating point function corresponding to Ty is available.
 
StringRef llvm::getFloatFn (const Module *M, const TargetLibraryInfo *TLI, Type *Ty, LibFunc DoubleFn, LibFunc FloatFn, LibFunc LongDoubleFn, LibFunc &TheLibFunc)
 Get the name of the overloaded floating point function corresponding to Ty.
 
Valuellvm::emitStrLen (Value *Ptr, IRBuilderBase &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the strlen function to the builder, for the specified pointer.
 
Valuellvm::emitStrDup (Value *Ptr, IRBuilderBase &B, const TargetLibraryInfo *TLI)
 Emit a call to the strdup function to the builder, for the specified pointer.
 
Valuellvm::emitStrChr (Value *Ptr, char C, IRBuilderBase &B, const TargetLibraryInfo *TLI)
 Emit a call to the strchr function to the builder, for the specified pointer and character.
 
Valuellvm::emitStrNCmp (Value *Ptr1, Value *Ptr2, Value *Len, IRBuilderBase &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the strncmp function to the builder.
 
Valuellvm::emitStrCpy (Value *Dst, Value *Src, IRBuilderBase &B, const TargetLibraryInfo *TLI)
 Emit a call to the strcpy function to the builder, for the specified pointer arguments.
 
Valuellvm::emitStpCpy (Value *Dst, Value *Src, IRBuilderBase &B, const TargetLibraryInfo *TLI)
 Emit a call to the stpcpy function to the builder, for the specified pointer arguments.
 
Valuellvm::emitStrNCpy (Value *Dst, Value *Src, Value *Len, IRBuilderBase &B, const TargetLibraryInfo *TLI)
 Emit a call to the strncpy function to the builder, for the specified pointer arguments and length.
 
Valuellvm::emitStpNCpy (Value *Dst, Value *Src, Value *Len, IRBuilderBase &B, const TargetLibraryInfo *TLI)
 Emit a call to the stpncpy function to the builder, for the specified pointer arguments and length.
 
Valuellvm::emitMemCpyChk (Value *Dst, Value *Src, Value *Len, Value *ObjSize, IRBuilderBase &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the __memcpy_chk function to the builder.
 
Valuellvm::emitMemPCpy (Value *Dst, Value *Src, Value *Len, IRBuilderBase &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the mempcpy function.
 
Valuellvm::emitMemChr (Value *Ptr, Value *Val, Value *Len, IRBuilderBase &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the memchr function.
 
Valuellvm::emitMemRChr (Value *Ptr, Value *Val, Value *Len, IRBuilderBase &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the memrchr function, analogously to emitMemChr.
 
Valuellvm::emitMemCmp (Value *Ptr1, Value *Ptr2, Value *Len, IRBuilderBase &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the memcmp function.
 
Valuellvm::emitBCmp (Value *Ptr1, Value *Ptr2, Value *Len, IRBuilderBase &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the bcmp function.
 
Valuellvm::emitMemCCpy (Value *Ptr1, Value *Ptr2, Value *Val, Value *Len, IRBuilderBase &B, const TargetLibraryInfo *TLI)
 Emit a call to the memccpy function.
 
Valuellvm::emitSNPrintf (Value *Dest, Value *Size, Value *Fmt, ArrayRef< Value * > Args, IRBuilderBase &B, const TargetLibraryInfo *TLI)
 Emit a call to the snprintf function.
 
Valuellvm::emitSPrintf (Value *Dest, Value *Fmt, ArrayRef< Value * > VariadicArgs, IRBuilderBase &B, const TargetLibraryInfo *TLI)
 Emit a call to the sprintf function.
 
Valuellvm::emitStrCat (Value *Dest, Value *Src, IRBuilderBase &B, const TargetLibraryInfo *TLI)
 Emit a call to the strcat function.
 
Valuellvm::emitStrLCpy (Value *Dest, Value *Src, Value *Size, IRBuilderBase &B, const TargetLibraryInfo *TLI)
 Emit a call to the strlcpy function.
 
Valuellvm::emitStrLCat (Value *Dest, Value *Src, Value *Size, IRBuilderBase &B, const TargetLibraryInfo *TLI)
 Emit a call to the strlcat function.
 
Valuellvm::emitStrNCat (Value *Dest, Value *Src, Value *Size, IRBuilderBase &B, const TargetLibraryInfo *TLI)
 Emit a call to the strncat function.
 
Valuellvm::emitVSNPrintf (Value *Dest, Value *Size, Value *Fmt, Value *VAList, IRBuilderBase &B, const TargetLibraryInfo *TLI)
 Emit a call to the vsnprintf function.
 
Valuellvm::emitVSPrintf (Value *Dest, Value *Fmt, Value *VAList, IRBuilderBase &B, const TargetLibraryInfo *TLI)
 Emit a call to the vsprintf function.
 
Valuellvm::emitUnaryFloatFnCall (Value *Op, const TargetLibraryInfo *TLI, StringRef Name, IRBuilderBase &B, const AttributeList &Attrs)
 Emit a call to the unary function named 'Name' (e.g.
 
Valuellvm::emitUnaryFloatFnCall (Value *Op, const TargetLibraryInfo *TLI, LibFunc DoubleFn, LibFunc FloatFn, LibFunc LongDoubleFn, IRBuilderBase &B, const AttributeList &Attrs)
 Emit a call to the unary function DoubleFn, FloatFn or LongDoubleFn, depending of the type of Op.
 
Valuellvm::emitBinaryFloatFnCall (Value *Op1, Value *Op2, const TargetLibraryInfo *TLI, StringRef Name, IRBuilderBase &B, const AttributeList &Attrs)
 Emit a call to the binary function named 'Name' (e.g.
 
Valuellvm::emitBinaryFloatFnCall (Value *Op1, Value *Op2, const TargetLibraryInfo *TLI, LibFunc DoubleFn, LibFunc FloatFn, LibFunc LongDoubleFn, IRBuilderBase &B, const AttributeList &Attrs)
 Emit a call to the binary function DoubleFn, FloatFn or LongDoubleFn, depending of the type of Op1.
 
Valuellvm::emitPutChar (Value *Char, IRBuilderBase &B, const TargetLibraryInfo *TLI)
 Emit a call to the putchar function. This assumes that Char is an 'int'.
 
Valuellvm::emitPutS (Value *Str, IRBuilderBase &B, const TargetLibraryInfo *TLI)
 Emit a call to the puts function. This assumes that Str is some pointer.
 
Valuellvm::emitFPutC (Value *Char, Value *File, IRBuilderBase &B, const TargetLibraryInfo *TLI)
 Emit a call to the fputc function.
 
Valuellvm::emitFPutS (Value *Str, Value *File, IRBuilderBase &B, const TargetLibraryInfo *TLI)
 Emit a call to the fputs function.
 
Valuellvm::emitFWrite (Value *Ptr, Value *Size, Value *File, IRBuilderBase &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the fwrite function.
 
Valuellvm::emitMalloc (Value *Num, IRBuilderBase &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 Emit a call to the malloc function.
 
Valuellvm::emitCalloc (Value *Num, Value *Size, IRBuilderBase &B, const TargetLibraryInfo &TLI)
 Emit a call to the calloc function.
 
Valuellvm::emitHotColdNew (Value *Num, IRBuilderBase &B, const TargetLibraryInfo *TLI, LibFunc NewFunc, uint8_t HotCold)
 Emit a call to the hot/cold operator new function.
 
Valuellvm::emitHotColdNewNoThrow (Value *Num, Value *NoThrow, IRBuilderBase &B, const TargetLibraryInfo *TLI, LibFunc NewFunc, uint8_t HotCold)
 
Valuellvm::emitHotColdNewAligned (Value *Num, Value *Align, IRBuilderBase &B, const TargetLibraryInfo *TLI, LibFunc NewFunc, uint8_t HotCold)
 
Valuellvm::emitHotColdNewAlignedNoThrow (Value *Num, Value *Align, Value *NoThrow, IRBuilderBase &B, const TargetLibraryInfo *TLI, LibFunc NewFunc, uint8_t HotCold)
 
Valuellvm::emitHotColdSizeReturningNew (Value *Num, IRBuilderBase &B, const TargetLibraryInfo *TLI, LibFunc NewFunc, uint8_t HotCold)
 
Valuellvm::emitHotColdSizeReturningNewAligned (Value *Num, Value *Align, IRBuilderBase &B, const TargetLibraryInfo *TLI, LibFunc NewFunc, uint8_t HotCold)