LLVM  15.0.0git
BuildLibCalls.h
Go to the documentation of this file.
1 //===- BuildLibCalls.h - Utility builder for libcalls -----------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file exposes an interface to build some C language libcalls for
10 // optimization passes that need to call the various functions.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_TRANSFORMS_UTILS_BUILDLIBCALLS_H
15 #define LLVM_TRANSFORMS_UTILS_BUILDLIBCALLS_H
16 
18 
19 namespace llvm {
20  class Value;
21  class DataLayout;
22  class IRBuilderBase;
23 
24  /// Analyze the name and prototype of the given function and set any
25  /// applicable attributes. Note that this merely helps optimizations on an
26  /// already existing function but does not consider mandatory attributes.
27  ///
28  /// If the library function is unavailable, this doesn't modify it.
29  ///
30  /// Returns true if any attributes were set and false otherwise.
31  bool inferNonMandatoryLibFuncAttrs(Module *M, StringRef Name,
32  const TargetLibraryInfo &TLI);
33  bool inferNonMandatoryLibFuncAttrs(Function &F, const TargetLibraryInfo &TLI);
34 
35  /// Calls getOrInsertFunction() and then makes sure to add mandatory
36  /// argument attributes.
37  FunctionCallee getOrInsertLibFunc(Module *M, const TargetLibraryInfo &TLI,
38  LibFunc TheLibFunc, FunctionType *T,
39  AttributeList AttributeList);
40  FunctionCallee getOrInsertLibFunc(Module *M, const TargetLibraryInfo &TLI,
41  LibFunc TheLibFunc, FunctionType *T);
42  template <typename... ArgsTy>
45  Type *RetTy, ArgsTy... Args) {
46  SmallVector<Type*, sizeof...(ArgsTy)> ArgTys{Args...};
47  return getOrInsertLibFunc(M, TLI, TheLibFunc,
48  FunctionType::get(RetTy, ArgTys, false),
50  }
51  /// Same as above, but without the attributes.
52  template <typename... ArgsTy>
54  LibFunc TheLibFunc, Type *RetTy, ArgsTy... Args) {
55  return getOrInsertLibFunc(M, TLI, TheLibFunc, AttributeList{}, RetTy,
56  Args...);
57  }
58  // Avoid an incorrect ordering that'd otherwise compile incorrectly.
59  template <typename... ArgsTy>
60  FunctionCallee
61  getOrInsertLibFunc(Module *M, const TargetLibraryInfo &TLI,
62  LibFunc TheLibFunc, AttributeList AttributeList,
63  FunctionType *Invalid, ArgsTy... Args) = delete;
64 
65  /// Check whether the library function is available on target and also that
66  /// it in the current Module is a Function with the right type.
67  bool isLibFuncEmittable(const Module *M, const TargetLibraryInfo *TLI,
68  LibFunc TheLibFunc);
69  bool isLibFuncEmittable(const Module *M, const TargetLibraryInfo *TLI,
70  StringRef Name);
71 
72  /// Check whether the overloaded floating point function
73  /// corresponding to \a Ty is available.
74  bool hasFloatFn(const Module *M, const TargetLibraryInfo *TLI, Type *Ty,
75  LibFunc DoubleFn, LibFunc FloatFn, LibFunc LongDoubleFn);
76 
77  /// Get the name of the overloaded floating point function
78  /// corresponding to \a Ty. Return the LibFunc in \a TheLibFunc.
79  StringRef getFloatFn(const Module *M, const TargetLibraryInfo *TLI, Type *Ty,
80  LibFunc DoubleFn, LibFunc FloatFn, LibFunc LongDoubleFn,
81  LibFunc &TheLibFunc);
82 
83  /// Return V if it is an i8*, otherwise cast it to i8*.
84  Value *castToCStr(Value *V, IRBuilderBase &B);
85 
86  /// Emit a call to the strlen function to the builder, for the specified
87  /// pointer. Ptr is required to be some pointer type, and the return value has
88  /// 'intptr_t' type.
89  Value *emitStrLen(Value *Ptr, IRBuilderBase &B, const DataLayout &DL,
90  const TargetLibraryInfo *TLI);
91 
92  /// Emit a call to the strdup function to the builder, for the specified
93  /// pointer. Ptr is required to be some pointer type, and the return value has
94  /// 'i8*' type.
95  Value *emitStrDup(Value *Ptr, IRBuilderBase &B, const TargetLibraryInfo *TLI);
96 
97  /// Emit a call to the strchr function to the builder, for the specified
98  /// pointer and character. Ptr is required to be some pointer type, and the
99  /// return value has 'i8*' type.
100  Value *emitStrChr(Value *Ptr, char C, IRBuilderBase &B,
101  const TargetLibraryInfo *TLI);
102 
103  /// Emit a call to the strncmp function to the builder.
104  Value *emitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilderBase &B,
105  const DataLayout &DL, const TargetLibraryInfo *TLI);
106 
107  /// Emit a call to the strcpy function to the builder, for the specified
108  /// pointer arguments.
109  Value *emitStrCpy(Value *Dst, Value *Src, IRBuilderBase &B,
110  const TargetLibraryInfo *TLI);
111 
112  /// Emit a call to the stpcpy function to the builder, for the specified
113  /// pointer arguments.
114  Value *emitStpCpy(Value *Dst, Value *Src, IRBuilderBase &B,
115  const TargetLibraryInfo *TLI);
116 
117  /// Emit a call to the strncpy function to the builder, for the specified
118  /// pointer arguments and length.
119  Value *emitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilderBase &B,
120  const TargetLibraryInfo *TLI);
121 
122  /// Emit a call to the stpncpy function to the builder, for the specified
123  /// pointer arguments and length.
124  Value *emitStpNCpy(Value *Dst, Value *Src, Value *Len, IRBuilderBase &B,
125  const TargetLibraryInfo *TLI);
126 
127  /// Emit a call to the __memcpy_chk function to the builder. This expects that
128  /// the Len and ObjSize have type 'intptr_t' and Dst/Src are pointers.
129  Value *emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize,
130  IRBuilderBase &B, const DataLayout &DL,
131  const TargetLibraryInfo *TLI);
132 
133  /// Emit a call to the mempcpy function.
134  Value *emitMemPCpy(Value *Dst, Value *Src, Value *Len, IRBuilderBase &B,
135  const DataLayout &DL, const TargetLibraryInfo *TLI);
136 
137  /// Emit a call to the memchr function. This assumes that Ptr is a pointer,
138  /// Val is an i32 value, and Len is an 'intptr_t' value.
139  Value *emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilderBase &B,
140  const DataLayout &DL, const TargetLibraryInfo *TLI);
141 
142  /// Emit a call to the memcmp function.
143  Value *emitMemCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilderBase &B,
144  const DataLayout &DL, const TargetLibraryInfo *TLI);
145 
146  /// Emit a call to the bcmp function.
147  Value *emitBCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilderBase &B,
148  const DataLayout &DL, const TargetLibraryInfo *TLI);
149 
150  /// Emit a call to the memccpy function.
151  Value *emitMemCCpy(Value *Ptr1, Value *Ptr2, Value *Val, Value *Len,
152  IRBuilderBase &B, const TargetLibraryInfo *TLI);
153 
154  /// Emit a call to the snprintf function.
155  Value *emitSNPrintf(Value *Dest, Value *Size, Value *Fmt,
156  ArrayRef<Value *> Args, IRBuilderBase &B,
157  const TargetLibraryInfo *TLI);
158 
159  /// Emit a call to the sprintf function.
160  Value *emitSPrintf(Value *Dest, Value *Fmt, ArrayRef<Value *> VariadicArgs,
161  IRBuilderBase &B, const TargetLibraryInfo *TLI);
162 
163  /// Emit a call to the strcat function.
164  Value *emitStrCat(Value *Dest, Value *Src, IRBuilderBase &B,
165  const TargetLibraryInfo *TLI);
166 
167  /// Emit a call to the strlcpy function.
168  Value *emitStrLCpy(Value *Dest, Value *Src, Value *Size, IRBuilderBase &B,
169  const TargetLibraryInfo *TLI);
170 
171  /// Emit a call to the strlcat function.
172  Value *emitStrLCat(Value *Dest, Value *Src, Value *Size, IRBuilderBase &B,
173  const TargetLibraryInfo *TLI);
174 
175  /// Emit a call to the strncat function.
176  Value *emitStrNCat(Value *Dest, Value *Src, Value *Size, IRBuilderBase &B,
177  const TargetLibraryInfo *TLI);
178 
179  /// Emit a call to the vsnprintf function.
180  Value *emitVSNPrintf(Value *Dest, Value *Size, Value *Fmt, Value *VAList,
181  IRBuilderBase &B, const TargetLibraryInfo *TLI);
182 
183  /// Emit a call to the vsprintf function.
184  Value *emitVSPrintf(Value *Dest, Value *Fmt, Value *VAList, IRBuilderBase &B,
185  const TargetLibraryInfo *TLI);
186 
187  /// Emit a call to the unary function named 'Name' (e.g. 'floor'). This
188  /// function is known to take a single of type matching 'Op' and returns one
189  /// value with the same type. If 'Op' is a long double, 'l' is added as the
190  /// suffix of name, if 'Op' is a float, we add a 'f' suffix.
191  Value *emitUnaryFloatFnCall(Value *Op, const TargetLibraryInfo *TLI,
192  StringRef Name, IRBuilderBase &B,
193  const AttributeList &Attrs);
194 
195  /// Emit a call to the unary function DoubleFn, FloatFn or LongDoubleFn,
196  /// depending of the type of Op.
197  Value *emitUnaryFloatFnCall(Value *Op, const TargetLibraryInfo *TLI,
198  LibFunc DoubleFn, LibFunc FloatFn,
199  LibFunc LongDoubleFn, IRBuilderBase &B,
200  const AttributeList &Attrs);
201 
202  /// Emit a call to the binary function named 'Name' (e.g. 'fmin'). This
203  /// function is known to take type matching 'Op1' and 'Op2' and return one
204  /// value with the same type. If 'Op1/Op2' are long double, 'l' is added as
205  /// the suffix of name, if 'Op1/Op2' are float, we add a 'f' suffix.
207  const TargetLibraryInfo *TLI,
208  StringRef Name, IRBuilderBase &B,
209  const AttributeList &Attrs);
210 
211  /// Emit a call to the binary function DoubleFn, FloatFn or LongDoubleFn,
212  /// depending of the type of Op1.
214  const TargetLibraryInfo *TLI, LibFunc DoubleFn,
215  LibFunc FloatFn, LibFunc LongDoubleFn,
216  IRBuilderBase &B, const AttributeList &Attrs);
217 
218  /// Emit a call to the putchar function. This assumes that Char is an integer.
219  Value *emitPutChar(Value *Char, IRBuilderBase &B,
220  const TargetLibraryInfo *TLI);
221 
222  /// Emit a call to the puts function. This assumes that Str is some pointer.
223  Value *emitPutS(Value *Str, IRBuilderBase &B, const TargetLibraryInfo *TLI);
224 
225  /// Emit a call to the fputc function. This assumes that Char is an i32, and
226  /// File is a pointer to FILE.
227  Value *emitFPutC(Value *Char, Value *File, IRBuilderBase &B,
228  const TargetLibraryInfo *TLI);
229 
230  /// Emit a call to the fputs function. Str is required to be a pointer and
231  /// File is a pointer to FILE.
232  Value *emitFPutS(Value *Str, Value *File, IRBuilderBase &B,
233  const TargetLibraryInfo *TLI);
234 
235  /// Emit a call to the fwrite function. This assumes that Ptr is a pointer,
236  /// Size is an 'intptr_t', and File is a pointer to FILE.
237  Value *emitFWrite(Value *Ptr, Value *Size, Value *File, IRBuilderBase &B,
238  const DataLayout &DL, const TargetLibraryInfo *TLI);
239 
240  /// Emit a call to the malloc function.
241  Value *emitMalloc(Value *Num, IRBuilderBase &B, const DataLayout &DL,
242  const TargetLibraryInfo *TLI);
243 
244  /// Emit a call to the calloc function.
245  Value *emitCalloc(Value *Num, Value *Size, IRBuilderBase &B,
246  const TargetLibraryInfo &TLI);
247 }
248 
249 #endif
llvm::Check::Size
@ Size
Definition: FileCheck.h:77
Attrs
Function Attrs
Definition: README_ALTIVEC.txt:215
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
FunctionType
Definition: ItaniumDemangle.h:765
llvm::emitCalloc
Value * emitCalloc(Value *Num, Value *Size, IRBuilderBase &B, const TargetLibraryInfo &TLI)
Emit a call to the calloc function.
Definition: BuildLibCalls.cpp:1856
llvm::SmallVector
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1185
llvm::emitUnaryFloatFnCall
Value * emitUnaryFloatFnCall(Value *Op, const TargetLibraryInfo *TLI, StringRef Name, IRBuilderBase &B, const AttributeList &Attrs)
Emit a call to the unary function named 'Name' (e.g.
Definition: BuildLibCalls.cpp:1653
llvm::emitMemCmp
Value * emitMemCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilderBase &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
Emit a call to the memcmp function.
Definition: BuildLibCalls.cpp:1526
llvm::emitFWrite
Value * emitFWrite(Value *Ptr, Value *Size, Value *File, IRBuilderBase &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
Emit a call to the fwrite function.
Definition: BuildLibCalls.cpp:1812
llvm::emitMemCCpy
Value * emitMemCCpy(Value *Ptr1, Value *Ptr2, Value *Val, Value *Len, IRBuilderBase &B, const TargetLibraryInfo *TLI)
Emit a call to the memccpy function.
Definition: BuildLibCalls.cpp:1544
llvm::FunctionType::get
static FunctionType * get(Type *Result, ArrayRef< Type * > Params, bool isVarArg)
This static method is the primary way of constructing a FunctionType.
Definition: Type.cpp:361
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::AttributeList
Definition: Attributes.h:408
T
#define T
Definition: Mips16ISelLowering.cpp:341
F
#define F(x, y, z)
Definition: MD5.cpp:55
llvm::emitStrDup
Value * emitStrDup(Value *Ptr, IRBuilderBase &B, const TargetLibraryInfo *TLI)
Emit a call to the strdup function to the builder, for the specified pointer.
Definition: BuildLibCalls.cpp:1433
llvm::emitFPutC
Value * emitFPutC(Value *Char, Value *File, IRBuilderBase &B, const TargetLibraryInfo *TLI)
Emit a call to the fputc function.
Definition: BuildLibCalls.cpp:1772
llvm::LibFunc
LibFunc
Definition: TargetLibraryInfo.h:35
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::emitStrCat
Value * emitStrCat(Value *Dest, Value *Src, IRBuilderBase &B, const TargetLibraryInfo *TLI)
Emit a call to the strcat function.
Definition: BuildLibCalls.cpp:1572
llvm::emitStrLCpy
Value * emitStrLCpy(Value *Dest, Value *Src, Value *Size, IRBuilderBase &B, const TargetLibraryInfo *TLI)
Emit a call to the strlcpy function.
Definition: BuildLibCalls.cpp:1579
TargetLibraryInfo.h
B
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
llvm::emitPutChar
Value * emitPutChar(Value *Char, IRBuilderBase &B, const TargetLibraryInfo *TLI)
Emit a call to the putchar function. This assumes that Char is an integer.
Definition: BuildLibCalls.cpp:1732
llvm::emitStrNCmp
Value * 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.
Definition: BuildLibCalls.cpp:1447
llvm::getFloatFn
StringRef 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.
Definition: BuildLibCalls.cpp:1378
llvm::emitSPrintf
Value * emitSPrintf(Value *Dest, Value *Fmt, ArrayRef< Value * > VariadicArgs, IRBuilderBase &B, const TargetLibraryInfo *TLI)
Emit a call to the sprintf function.
Definition: BuildLibCalls.cpp:1562
llvm::emitMemCpyChk
Value * 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.
Definition: BuildLibCalls.cpp:1484
llvm::hasFloatFn
bool 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.
Definition: BuildLibCalls.cpp:1364
llvm::emitStrLCat
Value * emitStrLCat(Value *Dest, Value *Src, Value *Size, IRBuilderBase &B, const TargetLibraryInfo *TLI)
Emit a call to the strlcat function.
Definition: BuildLibCalls.cpp:1586
TemplateParamKind::Type
@ Type
llvm::getOrInsertLibFunc
FunctionCallee getOrInsertLibFunc(Module *M, const TargetLibraryInfo &TLI, LibFunc TheLibFunc, FunctionType *T, AttributeList AttributeList)
Calls getOrInsertFunction() and then makes sure to add mandatory argument attributes.
Definition: BuildLibCalls.cpp:1265
llvm::emitBCmp
Value * emitBCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilderBase &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
Emit a call to the bcmp function.
Definition: BuildLibCalls.cpp:1535
llvm::emitMemPCpy
Value * emitMemPCpy(Value *Dst, Value *Src, Value *Len, IRBuilderBase &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
Emit a call to the mempcpy function.
Definition: BuildLibCalls.cpp:1508
llvm::emitStpNCpy
Value * 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.
Definition: BuildLibCalls.cpp:1477
llvm::emitStrNCat
Value * emitStrNCat(Value *Dest, Value *Src, Value *Size, IRBuilderBase &B, const TargetLibraryInfo *TLI)
Emit a call to the strncat function.
Definition: BuildLibCalls.cpp:1593
llvm::Module
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
DL
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Definition: AArch64SLSHardening.cpp:76
llvm::emitStpCpy
Value * 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.
Definition: BuildLibCalls.cpp:1463
Module
Machine Check Debug Module
Definition: MachineCheckDebugify.cpp:122
llvm::emitStrLen
Value * 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.
Definition: BuildLibCalls.cpp:1426
llvm::emitStrCpy
Value * 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.
Definition: BuildLibCalls.cpp:1456
llvm::isLibFuncEmittable
bool 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...
Definition: BuildLibCalls.cpp:1340
llvm::GraphProgram::Name
Name
Definition: GraphWriter.h:50
llvm::AMDGPU::SendMsg::Op
Op
Definition: SIDefines.h:344
llvm::TargetStackID::Value
Value
Definition: TargetFrameLowering.h:27
llvm::TargetLibraryInfo
Provides information about what library functions are available for the current target.
Definition: TargetLibraryInfo.h:222
llvm::emitFPutS
Value * emitFPutS(Value *Str, Value *File, IRBuilderBase &B, const TargetLibraryInfo *TLI)
Emit a call to the fputs function.
Definition: BuildLibCalls.cpp:1793
llvm::emitMalloc
Value * emitMalloc(Value *Num, IRBuilderBase &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
Emit a call to the malloc function.
Definition: BuildLibCalls.cpp:1836
llvm::castToCStr
Value * castToCStr(Value *V, IRBuilderBase &B)
Return V if it is an i8*, otherwise cast it to i8*.
Definition: BuildLibCalls.cpp:1401
Invalid
@ Invalid
Definition: AArch64ISelLowering.cpp:8744
llvm::emitStrNCpy
Value * 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.
Definition: BuildLibCalls.cpp:1470
llvm::emitBinaryFloatFnCall
Value * 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.
Definition: BuildLibCalls.cpp:1703
llvm::FunctionCallee
A handy container for a FunctionType+Callee-pointer pair, which can be passed around as a single enti...
Definition: DerivedTypes.h:165
llvm::emitSNPrintf
Value * emitSNPrintf(Value *Dest, Value *Size, Value *Fmt, ArrayRef< Value * > Args, IRBuilderBase &B, const TargetLibraryInfo *TLI)
Emit a call to the snprintf function.
Definition: BuildLibCalls.cpp:1552
llvm::emitPutS
Value * emitPutS(Value *Str, IRBuilderBase &B, const TargetLibraryInfo *TLI)
Emit a call to the puts function. This assumes that Str is some pointer.
Definition: BuildLibCalls.cpp:1755
llvm::emitStrChr
Value * 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.
Definition: BuildLibCalls.cpp:1439
llvm::inferNonMandatoryLibFuncAttrs
bool inferNonMandatoryLibFuncAttrs(Module *M, StringRef Name, const TargetLibraryInfo &TLI)
Analyze the name and prototype of the given function and set any applicable attributes.
Definition: BuildLibCalls.cpp:249
llvm::AMDGPU::HSAMD::Kernel::Key::Args
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
Definition: AMDGPUMetadata.h:394
llvm::emitVSPrintf
Value * emitVSPrintf(Value *Dest, Value *Fmt, Value *VAList, IRBuilderBase &B, const TargetLibraryInfo *TLI)
Emit a call to the vsprintf function.
Definition: BuildLibCalls.cpp:1608
llvm::emitVSNPrintf
Value * emitVSNPrintf(Value *Dest, Value *Size, Value *Fmt, Value *VAList, IRBuilderBase &B, const TargetLibraryInfo *TLI)
Emit a call to the vsnprintf function.
Definition: BuildLibCalls.cpp:1600
File
Instrumentation for Order File
Definition: InstrOrderFile.cpp:198
llvm::emitMemChr
Value * emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilderBase &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
Emit a call to the memchr function.
Definition: BuildLibCalls.cpp:1517