LLVM 23.0.0git
RuntimeLibcalls.cpp
Go to the documentation of this file.
1//===- RuntimeLibcalls.cpp - Interface for runtime 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
12#include "llvm/IR/Module.h"
14#include "llvm/Support/Debug.h"
15#include "llvm/Support/xxhash.h"
17
18#define DEBUG_TYPE "runtime-libcalls-info"
19
20using namespace llvm;
21using namespace RTLIB;
22
23#define GET_RUNTIME_LIBCALLS_INFO
24#define GET_INIT_RUNTIME_LIBCALL_NAMES
25#define GET_SET_TARGET_RUNTIME_LIBCALL_SETS
26#define DEFINE_GET_LOOKUP_LIBCALL_IMPL_NAME
27#include "llvm/IR/RuntimeLibcalls.inc"
28
30 ExceptionHandling ExceptionModel,
32 EABI EABIVersion, StringRef ABIName,
33 VectorLibrary VecLib) {
34 // FIXME: The ExceptionModel parameter is to handle the field in
35 // TargetOptions. This interface fails to distinguish the forced disable
36 // case for targets which support exceptions by default. This should
37 // probably be a module flag and removed from TargetOptions.
38 if (ExceptionModel == ExceptionHandling::None)
39 ExceptionModel = TT.getDefaultExceptionHandling();
40
41 initLibcalls(TT, ExceptionModel, FloatABI, EABIVersion, ABIName);
42
43 // TODO: Tablegen should generate these sets
44 switch (VecLib) {
46 for (RTLIB::LibcallImpl Impl :
47 {RTLIB::impl__ZGVnN2vv_fmod, RTLIB::impl__ZGVnN4vv_fmodf,
48 RTLIB::impl__ZGVsMxvv_fmod, RTLIB::impl__ZGVsMxvv_fmodf,
49 RTLIB::impl__ZGVnN2vl8_modf, RTLIB::impl__ZGVnN4vl4_modff,
50 RTLIB::impl__ZGVsNxvl8_modf, RTLIB::impl__ZGVsNxvl4_modff,
51 RTLIB::impl__ZGVnN2vl8l8_sincos, RTLIB::impl__ZGVnN4vl4l4_sincosf,
52 RTLIB::impl__ZGVsNxvl8l8_sincos, RTLIB::impl__ZGVsNxvl4l4_sincosf,
53 RTLIB::impl__ZGVnN4vl4l4_sincospif, RTLIB::impl__ZGVnN2vl8l8_sincospi,
54 RTLIB::impl__ZGVsNxvl4l4_sincospif,
55 RTLIB::impl__ZGVsNxvl8l8_sincospi})
56 setAvailable(Impl);
57 break;
59 for (RTLIB::LibcallImpl Impl :
60 {RTLIB::impl_armpl_svfmod_f32_x, RTLIB::impl_armpl_svfmod_f64_x,
61 RTLIB::impl_armpl_vfmodq_f32, RTLIB::impl_armpl_vfmodq_f64,
62 RTLIB::impl_armpl_vmodfq_f64, RTLIB::impl_armpl_vmodfq_f32,
63 RTLIB::impl_armpl_svmodf_f64_x, RTLIB::impl_armpl_svmodf_f32_x,
64 RTLIB::impl_armpl_vsincosq_f64, RTLIB::impl_armpl_vsincosq_f32,
65 RTLIB::impl_armpl_svsincos_f64_x, RTLIB::impl_armpl_svsincos_f32_x,
66 RTLIB::impl_armpl_vsincospiq_f32, RTLIB::impl_armpl_vsincospiq_f64,
67 RTLIB::impl_armpl_svsincospi_f32_x,
68 RTLIB::impl_armpl_svsincospi_f64_x, RTLIB::impl_armpl_svpow_f32_x,
69 RTLIB::impl_armpl_svpow_f64_x, RTLIB::impl_armpl_vpowq_f32,
70 RTLIB::impl_armpl_vpowq_f64})
71 setAvailable(Impl);
72
73 for (RTLIB::LibcallImpl Impl :
74 {RTLIB::impl_armpl_vfmodq_f32, RTLIB::impl_armpl_vfmodq_f64,
75 RTLIB::impl_armpl_vsincosq_f64, RTLIB::impl_armpl_vsincosq_f32,
76 RTLIB::impl_armpl_vpowq_f32, RTLIB::impl_armpl_vpowq_f64})
78 break;
79 default:
80 break;
81 }
82}
83
85 : RuntimeLibcallsInfo(M.getTargetTriple()) {
86 // TODO: Consider module flags
87}
88
89/// Set default libcall names. If a target wants to opt-out of a libcall it
90/// should be placed here.
91void RuntimeLibcallsInfo::initLibcalls(const Triple &TT,
92 ExceptionHandling ExceptionModel,
94 EABI EABIVersion, StringRef ABIName) {
95 setTargetRuntimeLibcallSets(TT, ExceptionModel, FloatABI, EABIVersion,
96 ABIName);
97}
98
101RuntimeLibcallsInfo::libcallImplNameHit(uint16_t NameOffsetEntry,
102 uint16_t StrOffset) {
103 int NumAliases = 1;
104 for (uint16_t Entry : ArrayRef(RuntimeLibcallNameOffsetTable)
105 .drop_front(NameOffsetEntry + 1)) {
106 if (Entry != StrOffset)
107 break;
108 ++NumAliases;
109 }
110
111 RTLIB::LibcallImpl ImplStart = static_cast<RTLIB::LibcallImpl>(
112 &RuntimeLibcallNameOffsetTable[NameOffsetEntry] -
113 &RuntimeLibcallNameOffsetTable[0]);
114 return enum_seq(ImplStart,
115 static_cast<RTLIB::LibcallImpl>(ImplStart + NumAliases));
116}
117
118bool RuntimeLibcallsInfo::isAAPCS_ABI(const Triple &TT, StringRef ABIName) {
119 const ARM::ARMABI TargetABI = ARM::computeTargetABI(TT, ABIName);
120 return TargetABI == ARM::ARM_ABI_AAPCS || TargetABI == ARM::ARM_ABI_AAPCS16;
121}
122
123bool RuntimeLibcallsInfo::darwinHasExp10(const Triple &TT) {
124 switch (TT.getOS()) {
125 case Triple::MacOSX:
126 return !TT.isMacOSXVersionLT(10, 9);
127 case Triple::IOS:
128 return !TT.isOSVersionLT(7, 0);
130 case Triple::TvOS:
131 case Triple::WatchOS:
132 case Triple::XROS:
133 case Triple::BridgeOS:
134 return true;
135 default:
136 return false;
137 }
138}
139
140/// TODO: There is really no guarantee that sizeof(size_t) is equal to the index
141/// size of the default address space. This matches TargetLibraryInfo and should
142/// be kept in sync.
144 return DL.getIndexType(Ctx, /*AddressSpace=*/0);
145}
146
147std::pair<FunctionType *, AttributeList>
149 const DataLayout &DL,
150 RTLIB::LibcallImpl LibcallImpl) const {
151 // TODO: NoCallback probably unsafe in general
152 static constexpr Attribute::AttrKind CommonFnAttrs[] = {
153 Attribute::MustProgress, Attribute::NoCallback, Attribute::NoFree,
154 Attribute::NoSync, Attribute::NoUnwind, Attribute::WillReturn};
155 static constexpr Attribute::AttrKind MemoryFnAttrs[] = {
156 Attribute::MustProgress, Attribute::NoUnwind, Attribute::WillReturn};
157 static constexpr Attribute::AttrKind CommonPtrArgAttrs[] = {
158 Attribute::NoAlias, Attribute::WriteOnly, Attribute::NonNull};
159
160 switch (LibcallImpl) {
161 case RTLIB::impl___sincos_stret:
162 case RTLIB::impl___sincosf_stret: {
163 if (!darwinHasSinCosStret(TT)) // Non-darwin currently unexpected
164 return {};
165
166 Type *ScalarTy = LibcallImpl == RTLIB::impl___sincosf_stret
167 ? Type::getFloatTy(Ctx)
168 : Type::getDoubleTy(Ctx);
169
170 AttrBuilder FuncAttrBuilder(Ctx);
171 for (Attribute::AttrKind Attr : CommonFnAttrs)
172 FuncAttrBuilder.addAttribute(Attr);
173
174 const bool UseSret =
175 TT.isX86_32() || ((TT.isARM() || TT.isThumb()) &&
177
178 FuncAttrBuilder.addMemoryAttr(MemoryEffects::argumentOrErrnoMemOnly(
180
181 AttributeList Attrs;
182 Attrs = Attrs.addFnAttributes(Ctx, FuncAttrBuilder);
183
184 if (UseSret) {
185 AttrBuilder AttrBuilder(Ctx);
186 StructType *StructTy = StructType::get(ScalarTy, ScalarTy);
187 AttrBuilder.addStructRetAttr(StructTy);
188 AttrBuilder.addAlignmentAttr(DL.getABITypeAlign(StructTy));
190 Type::getVoidTy(Ctx), {DL.getAllocaPtrType(Ctx), ScalarTy}, false);
191
192 return {FuncTy, Attrs.addParamAttributes(Ctx, 0, AttrBuilder)};
193 }
194
195 Type *RetTy =
196 LibcallImpl == RTLIB::impl___sincosf_stret && TT.isX86_64()
197 ? static_cast<Type *>(FixedVectorType::get(ScalarTy, 2))
198 : static_cast<Type *>(StructType::get(ScalarTy, ScalarTy));
199
200 return {FunctionType::get(RetTy, {ScalarTy}, false), Attrs};
201 }
202 case RTLIB::impl_malloc:
203 case RTLIB::impl_calloc: {
204 AttrBuilder FuncAttrBuilder(Ctx);
205 for (Attribute::AttrKind Attr : MemoryFnAttrs)
206 FuncAttrBuilder.addAttribute(Attr);
207 FuncAttrBuilder.addAttribute(Attribute::NoFree);
208
210 if (LibcallImpl == RTLIB::impl_malloc)
211 AllocKind |= AllocFnKind::Uninitialized;
212
213 // TODO: Set memory attribute
214 FuncAttrBuilder.addAllocKindAttr(AllocKind);
215 FuncAttrBuilder.addAttribute("alloc-family", "malloc");
216 FuncAttrBuilder.addAllocSizeAttr(0, LibcallImpl == RTLIB::impl_malloc
217 ? std::nullopt
218 : std::make_optional(1));
219
220 AttributeList Attrs;
221 Attrs = Attrs.addFnAttributes(Ctx, FuncAttrBuilder);
222
223 {
224 AttrBuilder ArgAttrBuilder(Ctx);
225 for (Attribute::AttrKind AK : CommonPtrArgAttrs)
226 ArgAttrBuilder.addAttribute(AK);
227
228 Attrs = Attrs.addRetAttribute(Ctx, Attribute::NoUndef);
229 Attrs = Attrs.addRetAttribute(Ctx, Attribute::NoAlias);
230 Attrs = Attrs.addParamAttribute(Ctx, 0, Attribute::NoUndef);
231 if (LibcallImpl == RTLIB::impl_calloc)
232 Attrs = Attrs.addParamAttribute(Ctx, 1, Attribute::NoUndef);
233 }
234
235 IntegerType *SizeT = getSizeTType(Ctx, DL);
236 PointerType *PtrTy = PointerType::get(Ctx, 0);
237 SmallVector<Type *, 2> ArgTys = {SizeT};
238 if (LibcallImpl == RTLIB::impl_calloc)
239 ArgTys.push_back(SizeT);
240
241 return {FunctionType::get(PtrTy, ArgTys, false), Attrs};
242 }
243 case RTLIB::impl_free: {
244 // TODO: Set memory attribute
245 AttrBuilder FuncAttrBuilder(Ctx);
246 for (Attribute::AttrKind Attr : MemoryFnAttrs)
247 FuncAttrBuilder.addAttribute(Attr);
248
249 FuncAttrBuilder.addAllocKindAttr(AllocFnKind::Free);
250 FuncAttrBuilder.addAttribute("alloc-family", "malloc");
251
252 AttributeList Attrs;
253 Attrs = Attrs.addFnAttributes(Ctx, FuncAttrBuilder);
254
255 {
256 AttrBuilder ArgAttrBuilder(Ctx);
257 ArgAttrBuilder.addAttribute(Attribute::NoUndef);
258 ArgAttrBuilder.addAttribute(Attribute::AllocatedPointer);
259 ArgAttrBuilder.addCapturesAttr(CaptureInfo::none());
260 Attrs = Attrs.addParamAttributes(Ctx, 0, ArgAttrBuilder);
261 }
262
263 return {FunctionType::get(Type::getVoidTy(Ctx), {PointerType::get(Ctx, 0)},
264 false),
265 Attrs};
266 }
267 case RTLIB::impl_sqrtf:
268 case RTLIB::impl_sqrt: {
269 AttrBuilder FuncAttrBuilder(Ctx);
270
271 for (Attribute::AttrKind Attr : CommonFnAttrs)
272 FuncAttrBuilder.addAttribute(Attr);
273 FuncAttrBuilder.addMemoryAttr(MemoryEffects::errnoMemOnly(ModRefInfo::Mod));
274
275 AttributeList Attrs;
276 Attrs = Attrs.addFnAttributes(Ctx, FuncAttrBuilder);
277
278 Type *ScalarTy = LibcallImpl == RTLIB::impl_sqrtf ? Type::getFloatTy(Ctx)
279 : Type::getDoubleTy(Ctx);
280 FunctionType *FuncTy = FunctionType::get(ScalarTy, {ScalarTy}, false);
281
282 Attrs = Attrs.addRetAttribute(
284 fcNegNormal));
285 return {FuncTy, Attrs};
286 }
287 case RTLIB::impl__ZGVnN2vv_fmod:
288 case RTLIB::impl__ZGVnN4vv_fmodf:
289 case RTLIB::impl__ZGVsMxvv_fmod:
290 case RTLIB::impl__ZGVsMxvv_fmodf:
291 case RTLIB::impl_armpl_vfmodq_f32:
292 case RTLIB::impl_armpl_vfmodq_f64:
293 case RTLIB::impl_armpl_svfmod_f32_x:
294 case RTLIB::impl_armpl_svfmod_f64_x:
295 case RTLIB::impl_armpl_vpowq_f32:
296 case RTLIB::impl_armpl_vpowq_f64:
297 case RTLIB::impl_armpl_svpow_f32_x:
298 case RTLIB::impl_armpl_svpow_f64_x: {
299 bool IsF32 = LibcallImpl == RTLIB::impl__ZGVnN4vv_fmodf ||
300 LibcallImpl == RTLIB::impl__ZGVsMxvv_fmodf ||
301 LibcallImpl == RTLIB::impl_armpl_svfmod_f32_x ||
302 LibcallImpl == RTLIB::impl_armpl_vfmodq_f32 ||
303 LibcallImpl == RTLIB::impl_armpl_vpowq_f32 ||
304 LibcallImpl == RTLIB::impl_armpl_svpow_f32_x;
305
306 bool IsScalable = LibcallImpl == RTLIB::impl__ZGVsMxvv_fmod ||
307 LibcallImpl == RTLIB::impl__ZGVsMxvv_fmodf ||
308 LibcallImpl == RTLIB::impl_armpl_svfmod_f32_x ||
309 LibcallImpl == RTLIB::impl_armpl_svfmod_f64_x ||
310 LibcallImpl == RTLIB::impl_armpl_svpow_f32_x ||
311 LibcallImpl == RTLIB::impl_armpl_svpow_f64_x;
312
313 AttrBuilder FuncAttrBuilder(Ctx);
314
315 for (Attribute::AttrKind Attr : CommonFnAttrs)
316 FuncAttrBuilder.addAttribute(Attr);
317
318 AttributeList Attrs;
319 Attrs = Attrs.addFnAttributes(Ctx, FuncAttrBuilder);
320
321 Type *ScalarTy = IsF32 ? Type::getFloatTy(Ctx) : Type::getDoubleTy(Ctx);
322 unsigned EC = IsF32 ? 4 : 2;
323 VectorType *VecTy = VectorType::get(ScalarTy, EC, IsScalable);
324
325 SmallVector<Type *, 3> ArgTys = {VecTy, VecTy};
326 if (hasVectorMaskArgument(LibcallImpl))
327 ArgTys.push_back(VectorType::get(Type::getInt1Ty(Ctx), EC, IsScalable));
328
329 FunctionType *FuncTy = FunctionType::get(VecTy, ArgTys, false);
330 return {FuncTy, Attrs};
331 }
332 case RTLIB::impl__ZGVnN2vl8_modf:
333 case RTLIB::impl__ZGVnN4vl4_modff:
334 case RTLIB::impl__ZGVsNxvl8_modf:
335 case RTLIB::impl__ZGVsNxvl4_modff:
336 case RTLIB::impl_armpl_vmodfq_f64:
337 case RTLIB::impl_armpl_vmodfq_f32:
338 case RTLIB::impl_armpl_svmodf_f64_x:
339 case RTLIB::impl_armpl_svmodf_f32_x: {
340 AttrBuilder FuncAttrBuilder(Ctx);
341
342 bool IsF32 = LibcallImpl == RTLIB::impl__ZGVnN4vl4_modff ||
343 LibcallImpl == RTLIB::impl__ZGVsNxvl4_modff ||
344 LibcallImpl == RTLIB::impl_armpl_vmodfq_f32 ||
345 LibcallImpl == RTLIB::impl_armpl_svmodf_f32_x;
346
347 bool IsScalable = LibcallImpl == RTLIB::impl__ZGVsNxvl8_modf ||
348 LibcallImpl == RTLIB::impl__ZGVsNxvl4_modff ||
349 LibcallImpl == RTLIB::impl_armpl_svmodf_f64_x ||
350 LibcallImpl == RTLIB::impl_armpl_svmodf_f32_x;
351
352 Type *ScalarTy = IsF32 ? Type::getFloatTy(Ctx) : Type::getDoubleTy(Ctx);
353 unsigned EC = IsF32 ? 4 : 2;
354 VectorType *VecTy = VectorType::get(ScalarTy, EC, IsScalable);
355
356 for (Attribute::AttrKind Attr : CommonFnAttrs)
357 FuncAttrBuilder.addAttribute(Attr);
358 FuncAttrBuilder.addMemoryAttr(MemoryEffects::argMemOnly(ModRefInfo::Mod));
359
360 AttributeList Attrs;
361 Attrs = Attrs.addFnAttributes(Ctx, FuncAttrBuilder);
362
363 {
364 AttrBuilder ArgAttrBuilder(Ctx);
365 for (Attribute::AttrKind AK : CommonPtrArgAttrs)
366 ArgAttrBuilder.addAttribute(AK);
367 ArgAttrBuilder.addAlignmentAttr(DL.getABITypeAlign(VecTy));
368 Attrs = Attrs.addParamAttributes(Ctx, 1, ArgAttrBuilder);
369 }
370
371 PointerType *PtrTy = PointerType::get(Ctx, 0);
372 SmallVector<Type *, 4> ArgTys = {VecTy, PtrTy};
373 if (hasVectorMaskArgument(LibcallImpl))
374 ArgTys.push_back(VectorType::get(Type::getInt1Ty(Ctx), EC, IsScalable));
375
376 return {FunctionType::get(VecTy, ArgTys, false), Attrs};
377 }
378 case RTLIB::impl__ZGVnN2vl8l8_sincos:
379 case RTLIB::impl__ZGVnN4vl4l4_sincosf:
380 case RTLIB::impl__ZGVsNxvl8l8_sincos:
381 case RTLIB::impl__ZGVsNxvl4l4_sincosf:
382 case RTLIB::impl_armpl_vsincosq_f64:
383 case RTLIB::impl_armpl_vsincosq_f32:
384 case RTLIB::impl_armpl_svsincos_f64_x:
385 case RTLIB::impl_armpl_svsincos_f32_x:
386 case RTLIB::impl__ZGVnN4vl4l4_sincospif:
387 case RTLIB::impl__ZGVnN2vl8l8_sincospi:
388 case RTLIB::impl__ZGVsNxvl4l4_sincospif:
389 case RTLIB::impl__ZGVsNxvl8l8_sincospi:
390 case RTLIB::impl_armpl_vsincospiq_f32:
391 case RTLIB::impl_armpl_vsincospiq_f64:
392 case RTLIB::impl_armpl_svsincospi_f32_x:
393 case RTLIB::impl_armpl_svsincospi_f64_x: {
394 AttrBuilder FuncAttrBuilder(Ctx);
395
396 bool IsF32 = LibcallImpl == RTLIB::impl__ZGVnN4vl4l4_sincospif ||
397 LibcallImpl == RTLIB::impl__ZGVsNxvl4l4_sincospif ||
398 LibcallImpl == RTLIB::impl_armpl_vsincospiq_f32 ||
399 LibcallImpl == RTLIB::impl_armpl_svsincospi_f32_x ||
400 LibcallImpl == RTLIB::impl__ZGVnN4vl4l4_sincosf ||
401 LibcallImpl == RTLIB::impl__ZGVsNxvl4l4_sincosf ||
402 LibcallImpl == RTLIB::impl_armpl_vsincosq_f32 ||
403 LibcallImpl == RTLIB::impl_armpl_svsincos_f32_x;
404
405 Type *ScalarTy = IsF32 ? Type::getFloatTy(Ctx) : Type::getDoubleTy(Ctx);
406 unsigned EC = IsF32 ? 4 : 2;
407
408 bool IsScalable = LibcallImpl == RTLIB::impl__ZGVsNxvl8l8_sincos ||
409 LibcallImpl == RTLIB::impl__ZGVsNxvl4l4_sincosf ||
410 LibcallImpl == RTLIB::impl_armpl_svsincos_f32_x ||
411 LibcallImpl == RTLIB::impl_armpl_svsincos_f64_x ||
412 LibcallImpl == RTLIB::impl__ZGVsNxvl4l4_sincospif ||
413 LibcallImpl == RTLIB::impl__ZGVsNxvl8l8_sincospi ||
414 LibcallImpl == RTLIB::impl_armpl_svsincospi_f32_x ||
415 LibcallImpl == RTLIB::impl_armpl_svsincospi_f64_x;
416 VectorType *VecTy = VectorType::get(ScalarTy, EC, IsScalable);
417
418 for (Attribute::AttrKind Attr : CommonFnAttrs)
419 FuncAttrBuilder.addAttribute(Attr);
420 FuncAttrBuilder.addMemoryAttr(MemoryEffects::argMemOnly(ModRefInfo::Mod));
421
422 AttributeList Attrs;
423 Attrs = Attrs.addFnAttributes(Ctx, FuncAttrBuilder);
424
425 {
426 AttrBuilder ArgAttrBuilder(Ctx);
427 for (Attribute::AttrKind AK : CommonPtrArgAttrs)
428 ArgAttrBuilder.addAttribute(AK);
429 ArgAttrBuilder.addAlignmentAttr(DL.getABITypeAlign(VecTy));
430 Attrs = Attrs.addParamAttributes(Ctx, 1, ArgAttrBuilder);
431 Attrs = Attrs.addParamAttributes(Ctx, 2, ArgAttrBuilder);
432 }
433
434 PointerType *PtrTy = PointerType::get(Ctx, 0);
435 SmallVector<Type *, 4> ArgTys = {VecTy, PtrTy, PtrTy};
436 if (hasVectorMaskArgument(LibcallImpl))
437 ArgTys.push_back(VectorType::get(Type::getInt1Ty(Ctx), EC, IsScalable));
438
439 return {FunctionType::get(Type::getVoidTy(Ctx), ArgTys, false), Attrs};
440 }
441 default:
442 return {};
443 }
444
445 return {};
446}
447
448bool RuntimeLibcallsInfo::hasVectorMaskArgument(RTLIB::LibcallImpl Impl) {
449 /// FIXME: This should be generated by tablegen and support the argument at an
450 /// arbitrary position
451 switch (Impl) {
452 case RTLIB::impl_armpl_svfmod_f32_x:
453 case RTLIB::impl_armpl_svfmod_f64_x:
454 case RTLIB::impl_armpl_svmodf_f64_x:
455 case RTLIB::impl_armpl_svmodf_f32_x:
456 case RTLIB::impl_armpl_svsincos_f32_x:
457 case RTLIB::impl_armpl_svsincos_f64_x:
458 case RTLIB::impl_armpl_svsincospi_f32_x:
459 case RTLIB::impl_armpl_svsincospi_f64_x:
460 case RTLIB::impl__ZGVsMxvv_fmod:
461 case RTLIB::impl__ZGVsMxvv_fmodf:
462 case RTLIB::impl_armpl_svpow_f32_x:
463 case RTLIB::impl_armpl_svpow_f64_x:
464 return true;
465 default:
466 return false;
467 }
468}
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
#define LLVM_ATTRIBUTE_ALWAYS_INLINE
LLVM_ATTRIBUTE_ALWAYS_INLINE - On compilers where we have a directive to do so, mark a method "always...
Definition Compiler.h:356
Utilities for dealing with flags related to floating point properties and mode controls.
Module.h This file contains the declarations for the Module class.
static IntegerType * getSizeTType(LLVMContext &Ctx, const DataLayout &DL)
TODO: There is really no guarantee that sizeof(size_t) is equal to the index size of the default addr...
static LLVM_ABI Attribute getWithNoFPClass(LLVMContext &Context, FPClassTest Mask)
AttrKind
This enumeration lists the attributes that can be associated with parameters, function results,...
Definition Attributes.h:124
static CaptureInfo none()
Create CaptureInfo that does not capture any components of the pointer.
Definition ModRef.h:384
A parsed version of the target data layout string in and methods for querying it.
Definition DataLayout.h:64
static LLVM_ABI FixedVectorType * get(Type *ElementType, unsigned NumElts)
Definition Type.cpp:802
Class to represent function types.
static LLVM_ABI FunctionType * get(Type *Result, ArrayRef< Type * > Params, bool isVarArg)
This static method is the primary way of constructing a FunctionType.
Class to represent integer types.
This is an important class for using LLVM in a threaded context.
Definition LLVMContext.h:68
static MemoryEffectsBase argMemOnly(ModRefInfo MR=ModRefInfo::ModRef)
Definition ModRef.h:143
static MemoryEffectsBase errnoMemOnly(ModRefInfo MR=ModRefInfo::ModRef)
Definition ModRef.h:154
static MemoryEffectsBase argumentOrErrnoMemOnly(ModRefInfo ArgMR=ModRefInfo::ModRef, ModRefInfo ErrnoMR=ModRefInfo::ModRef)
Definition ModRef.h:175
A Module instance is used to store all the information related to an LLVM module.
Definition Module.h:67
Class to represent pointers.
static LLVM_ABI PointerType * get(Type *ElementType, unsigned AddressSpace)
This constructs a pointer to an object of the specified type in a numbered address space.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
Definition StringRef.h:55
Class to represent struct types.
static LLVM_ABI StructType * get(LLVMContext &Context, ArrayRef< Type * > Elements, bool isPacked=false)
This static method is the primary way to create a literal StructType.
Definition Type.cpp:413
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:47
The instances of the Type class are immutable: once they are created, they are never changed.
Definition Type.h:45
static LLVM_ABI Type * getVoidTy(LLVMContext &C)
Definition Type.cpp:280
static LLVM_ABI IntegerType * getInt1Ty(LLVMContext &C)
Definition Type.cpp:293
static LLVM_ABI Type * getDoubleTy(LLVMContext &C)
Definition Type.cpp:285
static LLVM_ABI Type * getFloatTy(LLVMContext &C)
Definition Type.cpp:284
Base class of all SIMD vector types.
static LLVM_ABI VectorType * get(Type *ElementType, ElementCount EC)
This static method is the primary way to construct an VectorType.
LLVM_ABI LLVM_READONLY ARMABI computeTargetABI(const Triple &TT, StringRef ABIName="")
@ AArch64_VectorCall
Used between AArch64 Advanced SIMD functions.
This is an optimization pass for GlobalISel generic memory operations.
Definition Types.h:26
auto enum_seq(EnumT Begin, EnumT End)
Iterate over an enum type from Begin up to - but not including - End.
Definition Sequence.h:337
AllocFnKind
Definition Attributes.h:53
ExceptionHandling
Definition CodeGen.h:53
@ None
No exception support.
Definition CodeGen.h:54
@ Mod
The access may modify the value stored in memory.
Definition ModRef.h:34
@ NoModRef
The access neither references nor modifies the value stored in memory.
Definition ModRef.h:30
ArrayRef(const T &OneElt) -> ArrayRef< T >
VectorLibrary
List of known vector-functions libraries.
EABI
Definition CodeGen.h:73
std::pair< FunctionType *, AttributeList > getFunctionTy(LLVMContext &Ctx, const Triple &TT, const DataLayout &DL, RTLIB::LibcallImpl LibcallImpl) const
void setAvailable(RTLIB::LibcallImpl Impl)
static bool hasVectorMaskArgument(RTLIB::LibcallImpl Impl)
Returns true if the function has a vector mask argument, which is assumed to be the last argument.
void setLibcallImplCallingConv(RTLIB::LibcallImpl Call, CallingConv::ID CC)
Set the CallingConv that should be used for the specified libcall implementation.