40constexpr unsigned CudaFatMagic = 0x466243b1;
41constexpr unsigned HIPFatMagic = 0x48495046;
44 return M.getDataLayout().getIntPtrType(M.getContext());
130 auto [EntriesB, EntriesE] = EntryArray;
136 ImagesInits.
reserve(Bufs.size());
142 ".omp_offloading.device_image" + Suffix);
144 Image->setSection(Relocatable ?
".llvm.offloading.relocatable"
145 :
".llvm.offloading");
163 Binary.bytes_begin() + Header->EntriesOffset);
164 BeginOffset = Entry->ImageOffset;
165 EndOffset = Entry->ImageOffset + Entry->ImageSize;
168 auto *Begin = ConstantInt::get(
getSizeTTy(M), BeginOffset);
179 ImageE, EntriesB, EntriesE));
189 ".omp_offloading.device_images" + Suffix);
200 ".omp_offloading.descriptor" + Suffix);
209 ".omp_offloading.descriptor_unreg" + Suffix, &M);
210 Func->setSection(
".text.startup");
216 M.getOrInsertFunction(
"__tgt_unregister_lib", UnRegFuncTy);
220 Builder.CreateCall(UnRegFuncC, BinDesc);
221 Builder.CreateRetVoid();
231 ".omp_offloading.descriptor_reg" + Suffix, &M);
232 Func->setSection(
".text.startup");
238 M.getOrInsertFunction(
"__tgt_register_lib", RegFuncTy);
242 FunctionCallee AtExit = M.getOrInsertFunction(
"atexit", AtExitTy);
244 Function *UnregFunc = createUnregisterFunction(M, BinDesc, Suffix);
249 Builder.CreateCall(RegFuncC, BinDesc);
255 Builder.CreateCall(AtExit, UnregFunc);
256 Builder.CreateRetVoid();
288 IsHIP ?
".hip_fatbin"
293 ".fatbin_image" + Suffix);
294 Fatbin->setSection(FatbinConstantSection);
297 StringRef FatbinWrapperSection = IsHIP ?
".hipFatBinSegment"
299 :
".nvFatBinSegment";
312 FatbinInitializer,
".fatbin_wrapper" + Suffix);
313 FatbinDesc->setSection(FatbinWrapperSection);
314 FatbinDesc->setAlignment(
Align(8));
348 bool EmitSurfacesAndTextures) {
350 auto [EntriesB, EntriesE] = EntryArray;
359 Int8PtrTy, Int8PtrTy, Int8PtrTy, Int8PtrTy, Int32PtrTy},
362 IsHIP ?
"__hipRegisterFunction" :
"__cudaRegisterFunction", RegFuncTy);
371 IsHIP ?
"__hipRegisterVar" :
"__cudaRegisterVar", RegVarTy);
376 {Int8PtrPtrTy, Int8PtrTy, Int8PtrTy, Int8PtrTy,
380 IsHIP ?
"__hipRegisterManagedVar" :
"__cudaRegisterManagedVar",
386 {Int8PtrPtrTy, Int8PtrTy, Int8PtrTy, Int8PtrTy,
390 IsHIP ?
"__hipRegisterSurface" :
"__cudaRegisterSurface", RegSurfaceTy);
399 IsHIP ?
"__hipRegisterTexture" :
"__cudaRegisterTexture", RegTextureTy);
405 IsHIP ?
".hip.globals_reg" :
".cuda.globals_reg", &M);
406 RegGlobalsFn->setSection(
".text.startup");
421 auto *EntryCmp = Builder.CreateICmpNE(EntriesB, EntriesE);
422 Builder.CreateCondBr(EntryCmp, EntryBB, ExitBB);
423 Builder.SetInsertPoint(EntryBB);
429 auto *Addr = Builder.CreateLoad(Int8PtrTy, AddrPtr,
"addr");
434 auto *AuxAddr = Builder.CreateLoad(Int8PtrTy, AuxAddrPtr,
"aux_addr");
444 auto *
Name = Builder.CreateLoad(Int8PtrTy, NamePtr,
"name");
459 auto *
Data = Builder.CreateTrunc(
462 auto *
Type = Builder.CreateAnd(
466 auto *ExternBit = Builder.CreateAnd(
469 auto *
Extern = Builder.CreateLShr(
474 auto *
Const = Builder.CreateLShr(
476 auto *NormalizedBit = Builder.CreateAnd(
479 auto *Normalized = Builder.CreateLShr(
481 auto *KindCond = Builder.CreateICmpEQ(
485 Builder.CreateCondBr(KindCond, IfKindBB, IfEndBB);
486 Builder.SetInsertPoint(IfKindBB);
487 auto *FnCond = Builder.CreateICmpEQ(
489 Builder.CreateCondBr(FnCond, IfThenBB, IfElseBB);
492 Builder.SetInsertPoint(IfThenBB);
495 {RegGlobalsFn->arg_begin(), Addr,
Name,
Name,
500 Builder.CreateBr(IfEndBB);
501 Builder.SetInsertPoint(IfElseBB);
503 auto *
Switch = Builder.CreateSwitch(
Type, IfEndBB);
505 Builder.SetInsertPoint(SwGlobalBB);
506 Builder.CreateCall(RegVar,
509 Builder.CreateBr(IfEndBB);
514 Builder.SetInsertPoint(SwManagedBB);
515 Builder.CreateCall(RegManagedVar, {RegGlobalsFn->arg_begin(), AuxAddr, Addr,
517 Builder.CreateBr(IfEndBB);
521 Builder.SetInsertPoint(SwSurfaceBB);
522 if (EmitSurfacesAndTextures)
523 Builder.CreateCall(RegSurface, {RegGlobalsFn->arg_begin(), Addr,
Name,
Name,
525 Builder.CreateBr(IfEndBB);
530 Builder.SetInsertPoint(SwTextureBB);
531 if (EmitSurfacesAndTextures)
532 Builder.CreateCall(RegTexture, {RegGlobalsFn->arg_begin(), Addr,
Name,
Name,
534 Builder.CreateBr(IfEndBB);
538 Builder.SetInsertPoint(IfEndBB);
539 auto *NewEntry = Builder.CreateInBoundsGEP(
541 auto *
Cmp = Builder.CreateICmpEQ(NewEntry, EntriesE);
542 Entry->addIncoming(EntriesB, &RegGlobalsFn->getEntryBlock());
543 Entry->addIncoming(NewEntry, IfEndBB);
544 Builder.CreateCondBr(Cmp, ExitBB, EntryBB);
545 Builder.SetInsertPoint(ExitBB);
546 Builder.CreateRetVoid();
556 bool EmitSurfacesAndTextures) {
561 (IsHIP ?
".hip.fatbin_reg" :
".cuda.fatbin_reg") + Suffix, &M);
562 CtorFunc->setSection(
".text.startup");
567 (IsHIP ?
".hip.fatbin_unreg" :
".cuda.fatbin_unreg") + Suffix, &M);
568 DtorFunc->setSection(
".text.startup");
575 IsHIP ?
"__hipRegisterFatBinary" :
"__cudaRegisterFatBinary", RegFatTy);
580 M.getOrInsertFunction(
"__cudaRegisterFatBinaryEnd", RegFatEndTy);
585 IsHIP ?
"__hipUnregisterFatBinary" :
"__cudaUnregisterFatBinary",
590 FunctionCallee AtExit = M.getOrInsertFunction(
"atexit", AtExitTy);
595 (IsHIP ?
".hip.binary_handle" :
".cuda.binary_handle") + Suffix);
599 CallInst *Handle = CtorBuilder.CreateCall(
602 CtorBuilder.CreateAlignedStore(
603 Handle, BinaryHandleGlobal,
604 Align(M.getDataLayout().getPointerTypeSize(PtrTy)));
605 CtorBuilder.CreateCall(createRegisterGlobalsFunction(M, IsHIP, EntryArray,
607 EmitSurfacesAndTextures),
610 CtorBuilder.CreateCall(RegFatbinEnd, Handle);
611 CtorBuilder.CreateCall(AtExit, DtorFunc);
612 CtorBuilder.CreateRetVoid();
618 LoadInst *BinaryHandle = DtorBuilder.CreateAlignedLoad(
619 PtrTy, BinaryHandleGlobal,
620 Align(M.getDataLayout().getPointerTypeSize(PtrTy)));
621 DtorBuilder.CreateCall(UnregFatbin, BinaryHandle);
622 DtorBuilder.CreateRetVoid();
631 SYCLWrapper(
Module &M,
const SYCLJITOptions &Options)
634 SyclDeviceImageTy = getSyclDeviceImageTy();
635 SyclBinDescTy = getSyclBinDescTy();
690 StringRef OffloadKindTag =
".sycl_offloading.";
693 for (
size_t I = 0,
E = OffloadFiles.
size();
I !=
E; ++
I)
695 wrapImage(*OffloadFiles[
I].getBinary(), Twine(
I), OffloadKindTag));
697 return combineWrappedImages(WrappedImages, OffloadKindTag);
700 void createRegisterFatbinFunction(GlobalVariable *FatbinDesc) {
701 FunctionType *FuncTy =
702 FunctionType::get(Type::getVoidTy(C),
false);
704 Twine(
"sycl") +
".descriptor_reg", &M);
705 Func->setSection(
".text.startup");
708 FunctionType *RegFuncTy =
709 FunctionType::get(Type::getVoidTy(C), PointerType::getUnqual(C),
711 FunctionCallee RegFuncC =
712 M.getOrInsertFunction(
"__sycl_register_lib", RegFuncTy);
716 Builder.CreateCall(RegFuncC, FatbinDesc);
717 Builder.CreateRetVoid();
723 void createUnregisterFunction(GlobalVariable *FatbinDesc) {
724 FunctionType *FuncTy =
725 FunctionType::get(Type::getVoidTy(C),
false);
727 "sycl.descriptor_unreg", &M);
728 Func->setSection(
".text.startup");
731 FunctionType *UnRegFuncTy =
732 FunctionType::get(Type::getVoidTy(C), PointerType::getUnqual(C),
734 FunctionCallee UnRegFuncC =
735 M.getOrInsertFunction(
"__sycl_unregister_lib", UnRegFuncTy);
739 Builder.CreateCall(UnRegFuncC, FatbinDesc);
740 Builder.CreateRetVoid();
748 switch (M.getDataLayout().getPointerSize()) {
750 return Type::getInt32Ty(C);
752 return Type::getInt64Ty(C);
760 ConstantInt::get(SizeTTy, Second)};
797 StructType *getSyclDeviceImageTy() {
803 PointerType::getUnqual(C),
804 PointerType::getUnqual(C),
805 PointerType::getUnqual(C),
806 PointerType::getUnqual(C),
807 PointerType::getUnqual(C),
808 PointerType::getUnqual(C),
809 PointerType::getUnqual(C),
810 PointerType::getUnqual(C),
811 PointerType::getUnqual(C)
813 "__sycl.tgt_device_image");
832 StructType *getSyclBinDescTy() {
834 {Type::getInt16Ty(C), Type::getInt16Ty(C), PointerType::getUnqual(C),
835 PointerType::getUnqual(C), PointerType::getUnqual(C)},
836 "__sycl.tgt_bin_desc");
841 GlobalVariable *addGlobalArrayVariable(
const Twine &Name,
842 ArrayRef<char> Initializer,
843 const Twine &Section =
"") {
845 GlobalVariable *Var =
846 new GlobalVariable(M, Arr->
getType(),
true,
847 GlobalVariable::InternalLinkage, Arr, Name);
850 SmallVector<char, 32> NameBuf;
860 std::pair<Constant *, Constant *>
861 addArrayToModule(ArrayRef<char> Buf,
const Twine &Name,
862 const Twine &Section =
"") {
863 GlobalVariable *Var = addGlobalArrayVariable(Name, Buf, Section);
865 getSizetConstPair(0, 0));
868 return std::make_pair(ImageB, ImageE);
874 Constant *addRawDataToModule(ArrayRef<char>
Data,
const Twine &Name) {
875 GlobalVariable *Var = addGlobalArrayVariable(Name,
Data);
877 getSizetConstPair(0, 0));
886 Constant *addStringToModule(StringRef Str,
const Twine &Name) {
888 GlobalVariable *Var =
889 new GlobalVariable(M, Arr->
getType(),
true,
890 GlobalVariable::InternalLinkage, Arr, Name);
900 std::pair<Constant *, Constant *>
901 initOffloadEntriesPerImage(StringRef Entries,
const Twine &OffloadKindTag) {
903 const char *Current = Entries.
data();
904 const char *End = Current + Entries.
size();
905 while (Current < End) {
906 StringRef
Name(Current);
907 Current +=
Name.size() + 1;
913 M, OffloadKind::OFK_SYCL,
920 ArrayType::get(EntryTy, EntriesInits.
size()), EntriesInits);
921 GlobalVariable *EntriesGV =
new GlobalVariable(
922 M, Arr->
getType(),
true, GlobalVariable::InternalLinkage,
923 Arr, OffloadKindTag +
"entries_arr");
926 EntriesGV->
getValueType(), EntriesGV, getSizetConstPair(0, 0));
929 getSizetConstPair(0, EntriesInits.
size()));
930 return std::make_pair(EntriesB, EntriesE);
933 Constant *wrapImage(
const OffloadBinary &OB,
const Twine &ImageID,
934 StringRef OffloadKindTag) {
938 constexpr uint16_t DeviceImageStructVersion = 3;
940 ConstantInt::get(Type::getInt16Ty(C), DeviceImageStructVersion);
941 Constant *OffloadKindConstant = ConstantInt::get(
942 Type::getInt8Ty(C),
static_cast<uint8_t
>(
OB.getOffloadKind()));
943 Constant *ImageKindConstant = ConstantInt::get(
944 Type::getInt8Ty(C),
static_cast<uint8_t
>(
OB.getImageKind()));
945 StringRef Triple =
OB.getString(
"triple");
947 addStringToModule(Triple, Twine(OffloadKindTag) +
"target." + ImageID);
949 addStringToModule(Options.CompileOptions,
950 Twine(OffloadKindTag) +
"opts.compile." + ImageID);
951 Constant *LinkOptions = addStringToModule(
952 Options.LinkOptions, Twine(OffloadKindTag) +
"opts.link." + ImageID);
955 std::pair<Constant *, Constant *> PropertiesConstants = {
959 StringRef RawImage =
OB.getImage();
960 std::pair<Constant *, Constant *>
Binary = addArrayToModule(
961 ArrayRef<char>(RawImage.
begin(), RawImage.
end()),
962 Twine(OffloadKindTag) + ImageID +
".data",
".llvm.offloading");
965 std::pair<Constant *, Constant *> ImageEntriesPtrs =
966 initOffloadEntriesPerImage(
OB.getString(
"symbols"), OffloadKindTag);
971 SyclDeviceImageTy,
Version, OffloadKindConstant, ImageKindConstant,
972 TripleConstant, CompileOptions, LinkOptions,
Binary.first,
973 Binary.second, ImageEntriesPtrs.first, ImageEntriesPtrs.second,
974 PropertiesConstants.first, PropertiesConstants.second);
976 return WrappedBinary;
980 StringRef OffloadKindTag) {
982 ArrayType::get(SyclDeviceImageTy, WrappedImages.
size()), WrappedImages);
983 GlobalVariable *ImagesGV =
984 new GlobalVariable(M, ImagesData->
getType(),
true,
986 Twine(OffloadKindTag) +
"device_images");
991 static constexpr uint16_t BinDescStructVersion = 1;
994 ConstantInt::get(Type::getInt16Ty(C), BinDescStructVersion),
995 ConstantInt::get(Type::getInt16Ty(C), WrappedImages.
size()), ImagesGV,
998 return new GlobalVariable(M, DescInit->
getType(),
true,
1000 Twine(OffloadKindTag) +
"descriptor");
1005 SYCLJITOptions Options;
1007 StructType *EntryTy =
nullptr;
1008 StructType *SyclDeviceImageTy =
nullptr;
1009 StructType *SyclBinDescTy =
nullptr;
1018 createBinDesc(M, Images, EntryArray, Suffix, Relocatable);
1021 "No binary descriptors created.");
1022 createRegisterFunction(M,
Desc, Suffix);
1029 bool EmitSurfacesAndTextures) {
1033 "No fatbin section created.");
1035 createRegisterFatbinFunction(M,
Desc,
false, EntryArray, Suffix,
1036 EmitSurfacesAndTextures);
1042 bool EmitSurfacesAndTextures) {
1046 "No fatbin section created.");
1048 createRegisterFatbinFunction(M,
Desc,
true, EntryArray, Suffix,
1049 EmitSurfacesAndTextures);
1065 "No binary descriptors created.");
1067 W.createRegisterFatbinFunction(
Desc);
1068 W.createUnregisterFunction(
Desc);
static IntegerType * getSizeTTy(IRBuilderBase &B, const TargetLibraryInfo *TLI)
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file contains the declarations for the subclasses of Constant, which represent the different fla...
Module.h This file contains the declarations for the Module class.
Machine Check Debug Module
This file defines the SmallVector class.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_t size() const
size - Get the array size.
static LLVM_ABI ArrayType * get(Type *ElementType, uint64_t NumElements)
This static method is the primary way to construct an ArrayType.
static BasicBlock * Create(LLVMContext &Context, const Twine &Name="", Function *Parent=nullptr, BasicBlock *InsertBefore=nullptr)
Creates a new BasicBlock.
This class represents a function call, abstracting a target machine's calling convention.
static LLVM_ABI Constant * get(ArrayType *T, ArrayRef< Constant * > V)
static LLVM_ABI Constant * getString(LLVMContext &Context, StringRef Initializer, bool AddNull=true)
This method constructs a CDS and initializes it with a text string.
static Constant * get(LLVMContext &Context, ArrayRef< ElementTy > Elts)
get() constructor - Return a constant with array type with an element count and element type matching...
static LLVM_ABI Constant * getPointerBitCastOrAddrSpaceCast(Constant *C, Type *Ty)
Create a BitCast or AddrSpaceCast for a pointer type depending on the address space.
static Constant * getGetElementPtr(Type *Ty, Constant *C, ArrayRef< Constant * > IdxList, GEPNoWrapFlags NW=GEPNoWrapFlags::none(), std::optional< ConstantRange > InRange=std::nullopt, Type *OnlyIfReducedTy=nullptr)
Getelementptr form.
static LLVM_ABI ConstantPointerNull * get(PointerType *T)
Static factory methods - Return objects of the specified value.
static LLVM_ABI Constant * get(StructType *T, ArrayRef< Constant * > V)
This is an important base class in LLVM.
static LLVM_ABI Constant * getAllOnesValue(Type *Ty)
static LLVM_ABI Constant * getNullValue(Type *Ty)
Constructor to create a '0' constant of arbitrary type.
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
A handy container for a FunctionType+Callee-pointer pair, which can be passed around as a single enti...
static LLVM_ABI FunctionType * get(Type *Result, ArrayRef< Type * > Params, bool isVarArg)
This static method is the primary way of constructing a FunctionType.
static Function * Create(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace, const Twine &N="", Module *M=nullptr)
LLVM_ABI void setSection(StringRef S)
Change the section for this global.
void setUnnamedAddr(UnnamedAddr Val)
@ InternalLinkage
Rename collisions when linking (static functions).
Type * getValueType() const
const Constant * getInitializer() const
getInitializer - Return the initializer for this global variable.
This provides a uniform API for creating instructions and inserting them into a basic block: either a...
Class to represent integer types.
This is an important class for using LLVM in a threaded context.
An instruction for reading from memory.
A Module instance is used to store all the information related to an LLVM module.
static PointerType * getUnqual(Type *ElementType)
This constructs a pointer to an object of the specified type in the default address space (address sp...
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 reserve(size_type N)
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.
constexpr size_t size() const
size - Get the string size.
constexpr const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
Class to represent struct types.
static LLVM_ABI StructType * getTypeByName(LLVMContext &C, StringRef Name)
Return the type with the specified name, or null if there is none by that name.
static LLVM_ABI StructType * create(LLVMContext &Context, StringRef Name)
This creates an identified struct.
Triple - Helper class for working with autoconf configuration names.
bool isMacOSX() const
Is this a Mac OS X triple.
The instances of the Type class are immutable: once they are created, they are never changed.
static LLVM_ABI IntegerType * getInt64Ty(LLVMContext &C)
static LLVM_ABI IntegerType * getInt32Ty(LLVMContext &C)
static LLVM_ABI Type * getVoidTy(LLVMContext &C)
static LLVM_ABI IntegerType * getInt16Ty(LLVMContext &C)
Type * getType() const
All values are typed, get the type of this value.
static uint64_t getAlignment()
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ C
The default llvm calling convention, compatible with C.
@ OB
OB - OneByte - Set if this instruction has a one byte opcode.
@ Switch
The "resume-switch" lowering, where there are separate resume and destroy functions that are shared b...
LLVM_ABI Error extractOffloadBinaries(MemoryBufferRef Buffer, SmallVectorImpl< OffloadFile > &Binaries)
Extracts embedded device offloading code from a memory Buffer to a list of Binaries.
LLVM_ABI GlobalVariable * emitOffloadingEntry(Module &M, object::OffloadKind Kind, Constant *Addr, StringRef Name, uint64_t Size, uint32_t Flags, uint64_t Data, Constant *AuxAddr=nullptr, StringRef SectionName="llvm_offload_entries")
Create an offloading section struct used to register this global at runtime.
LLVM_ABI StructType * getEntryTy(Module &M)
Returns the type of the offloading entry we use to store kernels and globals that will be registered ...
LLVM_ABI llvm::Error wrapSYCLBinaries(llvm::Module &M, llvm::ArrayRef< char > Buffer, SYCLJITOptions Options=SYCLJITOptions())
Wraps OffloadBinaries in the given Buffers into the module M as global symbols and registers the imag...
@ OffloadGlobalSurfaceEntry
Mark the entry as a surface variable.
@ OffloadGlobalTextureEntry
Mark the entry as a texture variable.
@ OffloadGlobalNormalized
Mark the entry as being a normalized surface.
@ OffloadGlobalEntry
Mark the entry as a global entry.
@ OffloadGlobalManagedEntry
Mark the entry as a managed global variable.
@ OffloadGlobalExtern
Mark the entry as being extern.
@ OffloadGlobalConstant
Mark the entry as being constant.
LLVM_ABI llvm::Error wrapOpenMPBinaries(llvm::Module &M, llvm::ArrayRef< llvm::ArrayRef< char > > Images, EntryArrayTy EntryArray, llvm::StringRef Suffix="", bool Relocatable=false)
Wraps the input device images into the module M as global symbols and registers the images with the O...
std::pair< GlobalVariable *, GlobalVariable * > EntryArrayTy
LLVM_ABI llvm::Error wrapHIPBinary(llvm::Module &M, llvm::ArrayRef< char > Images, EntryArrayTy EntryArray, llvm::StringRef Suffix="", bool EmitSurfacesAndTextures=true)
Wraps the input bundled image into the module M as global symbols and registers the images with the H...
LLVM_ABI llvm::Error wrapCudaBinary(llvm::Module &M, llvm::ArrayRef< char > Images, EntryArrayTy EntryArray, llvm::StringRef Suffix="", bool EmitSurfacesAndTextures=true)
Wraps the input fatbinary image into the module M as global symbols and registers the images with the...
NodeAddr< FuncNode * > Func
Context & getContext() const
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI file_magic identify_magic(StringRef magic)
Identify the type of a binary file based on how magical it is.
LLVM_ABI std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
FunctionAddr VTableAddr uintptr_t uintptr_t Version
class LLVM_GSL_OWNER SmallVector
Forward declaration of SmallVector so that calculateSmallVectorDefaultInlinedElements can reference s...
@ First
Helpers to iterate all locations in the MemoryEffectsBase class.
FunctionAddr VTableAddr uintptr_t uintptr_t Data
IRBuilder(LLVMContext &, FolderTy, InserterTy, MDNode *, ArrayRef< OperandBundleDef >) -> IRBuilder< FolderTy, InserterTy >
ArrayRef(const T &OneElt) -> ArrayRef< T >
LLVM_ABI void appendToGlobalCtors(Module &M, Function *F, int Priority, Constant *Data=nullptr)
Append F to the list of global ctors of module M with the given Priority.
LLVM_ABI void appendToGlobalDtors(Module &M, Function *F, int Priority, Constant *Data=nullptr)
Same as appendToGlobalCtors(), but for global dtors.
@ Extern
Replace returns with jump to thunk, don't emit thunk.
This struct is a compact representation of a valid (non-zero power of two) alignment.
@ offload_binary
LLVM offload object file.