40constexpr unsigned CudaFatMagic = 0x466243b1;
41constexpr unsigned HIPFatMagic = 0x48495046;
44 return M.getDataLayout().getIntPtrType(M.getContext());
130 auto [EntriesB, EntriesE] = EntryArray;
137 ImagesInits.
reserve(Bufs.size());
143 ".omp_offloading.device_image" + Suffix);
145 Image->setSection(Relocatable ?
".llvm.offloading.relocatable"
146 :
".llvm.offloading");
151 "Invalid binary format");
160 Binary.bytes_begin() + Header->EntryOffset);
162 auto *Begin = ConstantInt::get(
getSizeTTy(M), Entry->ImageOffset);
164 ConstantInt::get(
getSizeTTy(M), Entry->ImageOffset + Entry->ImageSize);
174 ImageE, EntriesB, EntriesE));
184 ".omp_offloading.device_images" + Suffix);
198 ".omp_offloading.descriptor" + Suffix);
207 ".omp_offloading.descriptor_unreg" + Suffix, &M);
208 Func->setSection(
".text.startup");
214 M.getOrInsertFunction(
"__tgt_unregister_lib", UnRegFuncTy);
218 Builder.CreateCall(UnRegFuncC, BinDesc);
219 Builder.CreateRetVoid();
229 ".omp_offloading.descriptor_reg" + Suffix, &M);
230 Func->setSection(
".text.startup");
236 M.getOrInsertFunction(
"__tgt_register_lib", RegFuncTy);
240 FunctionCallee AtExit = M.getOrInsertFunction(
"atexit", AtExitTy);
242 Function *UnregFunc = createUnregisterFunction(M, BinDesc, Suffix);
247 Builder.CreateCall(RegFuncC, BinDesc);
253 Builder.CreateCall(AtExit, UnregFunc);
254 Builder.CreateRetVoid();
286 IsHIP ?
".hip_fatbin"
291 ".fatbin_image" + Suffix);
292 Fatbin->setSection(FatbinConstantSection);
295 StringRef FatbinWrapperSection = IsHIP ?
".hipFatBinSegment"
297 :
".nvFatBinSegment";
310 FatbinInitializer,
".fatbin_wrapper" + Suffix);
311 FatbinDesc->setSection(FatbinWrapperSection);
312 FatbinDesc->setAlignment(
Align(8));
346 bool EmitSurfacesAndTextures) {
348 auto [EntriesB, EntriesE] = EntryArray;
357 Int8PtrTy, Int8PtrTy, Int8PtrTy, Int8PtrTy, Int32PtrTy},
360 IsHIP ?
"__hipRegisterFunction" :
"__cudaRegisterFunction", RegFuncTy);
369 IsHIP ?
"__hipRegisterVar" :
"__cudaRegisterVar", RegVarTy);
374 {Int8PtrPtrTy, Int8PtrTy, Int8PtrTy, Int8PtrTy,
378 IsHIP ?
"__hipRegisterManagedVar" :
"__cudaRegisterManagedVar",
384 {Int8PtrPtrTy, Int8PtrTy, Int8PtrTy, Int8PtrTy,
388 IsHIP ?
"__hipRegisterSurface" :
"__cudaRegisterSurface", RegSurfaceTy);
397 IsHIP ?
"__hipRegisterTexture" :
"__cudaRegisterTexture", RegTextureTy);
403 IsHIP ?
".hip.globals_reg" :
".cuda.globals_reg", &M);
404 RegGlobalsFn->setSection(
".text.startup");
419 auto *EntryCmp = Builder.CreateICmpNE(EntriesB, EntriesE);
420 Builder.CreateCondBr(EntryCmp, EntryBB, ExitBB);
421 Builder.SetInsertPoint(EntryBB);
427 auto *Addr = Builder.CreateLoad(Int8PtrTy, AddrPtr,
"addr");
432 auto *AuxAddr = Builder.CreateLoad(Int8PtrTy, AuxAddrPtr,
"aux_addr");
442 auto *
Name = Builder.CreateLoad(Int8PtrTy, NamePtr,
"name");
457 auto *
Data = Builder.CreateTrunc(
460 auto *
Type = Builder.CreateAnd(
464 auto *ExternBit = Builder.CreateAnd(
467 auto *
Extern = Builder.CreateLShr(
472 auto *
Const = Builder.CreateLShr(
474 auto *NormalizedBit = Builder.CreateAnd(
477 auto *Normalized = Builder.CreateLShr(
479 auto *KindCond = Builder.CreateICmpEQ(
483 Builder.CreateCondBr(KindCond, IfKindBB, IfEndBB);
484 Builder.SetInsertPoint(IfKindBB);
485 auto *FnCond = Builder.CreateICmpEQ(
487 Builder.CreateCondBr(FnCond, IfThenBB, IfElseBB);
490 Builder.SetInsertPoint(IfThenBB);
491 Builder.CreateCall(RegFunc, {RegGlobalsFn->arg_begin(), Addr,
Name,
Name,
498 Builder.CreateBr(IfEndBB);
499 Builder.SetInsertPoint(IfElseBB);
501 auto *
Switch = Builder.CreateSwitch(
Type, IfEndBB);
503 Builder.SetInsertPoint(SwGlobalBB);
504 Builder.CreateCall(RegVar,
507 Builder.CreateBr(IfEndBB);
512 Builder.SetInsertPoint(SwManagedBB);
513 Builder.CreateCall(RegManagedVar, {RegGlobalsFn->arg_begin(), AuxAddr, Addr,
515 Builder.CreateBr(IfEndBB);
519 Builder.SetInsertPoint(SwSurfaceBB);
520 if (EmitSurfacesAndTextures)
521 Builder.CreateCall(RegSurface, {RegGlobalsFn->arg_begin(), Addr,
Name,
Name,
523 Builder.CreateBr(IfEndBB);
528 Builder.SetInsertPoint(SwTextureBB);
529 if (EmitSurfacesAndTextures)
530 Builder.CreateCall(RegTexture, {RegGlobalsFn->arg_begin(), Addr,
Name,
Name,
532 Builder.CreateBr(IfEndBB);
536 Builder.SetInsertPoint(IfEndBB);
537 auto *NewEntry = Builder.CreateInBoundsGEP(
539 auto *
Cmp = Builder.CreateICmpEQ(
550 &RegGlobalsFn->getEntryBlock());
551 Entry->addIncoming(NewEntry, IfEndBB);
552 Builder.CreateCondBr(Cmp, ExitBB, EntryBB);
553 Builder.SetInsertPoint(ExitBB);
554 Builder.CreateRetVoid();
564 bool EmitSurfacesAndTextures) {
569 (IsHIP ?
".hip.fatbin_reg" :
".cuda.fatbin_reg") + Suffix, &M);
570 CtorFunc->setSection(
".text.startup");
575 (IsHIP ?
".hip.fatbin_unreg" :
".cuda.fatbin_unreg") + Suffix, &M);
576 DtorFunc->setSection(
".text.startup");
583 IsHIP ?
"__hipRegisterFatBinary" :
"__cudaRegisterFatBinary", RegFatTy);
588 M.getOrInsertFunction(
"__cudaRegisterFatBinaryEnd", RegFatEndTy);
593 IsHIP ?
"__hipUnregisterFatBinary" :
"__cudaUnregisterFatBinary",
598 FunctionCallee AtExit = M.getOrInsertFunction(
"atexit", AtExitTy);
603 (IsHIP ?
".hip.binary_handle" :
".cuda.binary_handle") + Suffix);
607 CallInst *Handle = CtorBuilder.CreateCall(
610 CtorBuilder.CreateAlignedStore(
611 Handle, BinaryHandleGlobal,
612 Align(M.getDataLayout().getPointerTypeSize(PtrTy)));
613 CtorBuilder.CreateCall(createRegisterGlobalsFunction(M, IsHIP, EntryArray,
615 EmitSurfacesAndTextures),
618 CtorBuilder.CreateCall(RegFatbinEnd, Handle);
619 CtorBuilder.CreateCall(AtExit, DtorFunc);
620 CtorBuilder.CreateRetVoid();
626 LoadInst *BinaryHandle = DtorBuilder.CreateAlignedLoad(
627 PtrTy, BinaryHandleGlobal,
628 Align(M.getDataLayout().getPointerTypeSize(PtrTy)));
629 DtorBuilder.CreateCall(UnregFatbin, BinaryHandle);
630 DtorBuilder.CreateRetVoid();
640 SYCLJITOptions Options;
642 StructType *EntryTy =
nullptr;
643 StructType *SyclDeviceImageTy =
nullptr;
644 StructType *SyclBinDescTy =
nullptr;
646 SYCLWrapper(
Module &M,
const SYCLJITOptions &Options)
649 SyclDeviceImageTy = getSyclDeviceImageTy();
650 SyclBinDescTy = getSyclBinDescTy();
654 switch (M.getDataLayout().getPointerSize()) {
656 return Type::getInt32Ty(C);
658 return Type::getInt64Ty(C);
666 ConstantInt::get(SizeTTy, Second)};
703 StructType *getSyclDeviceImageTy() {
709 PointerType::getUnqual(C),
710 PointerType::getUnqual(C),
711 PointerType::getUnqual(C),
712 PointerType::getUnqual(C),
713 PointerType::getUnqual(C),
714 PointerType::getUnqual(C),
715 PointerType::getUnqual(C),
716 PointerType::getUnqual(C),
717 PointerType::getUnqual(C)
719 "__sycl.tgt_device_image");
738 StructType *getSyclBinDescTy() {
740 {Type::getInt16Ty(C), Type::getInt16Ty(C), PointerType::getUnqual(C),
741 PointerType::getUnqual(C), PointerType::getUnqual(C)},
742 "__sycl.tgt_bin_desc");
747 GlobalVariable *addGlobalArrayVariable(
const Twine &Name,
748 ArrayRef<char> Initializer,
749 const Twine &Section =
"") {
751 auto *Var =
new GlobalVariable(M, Arr->getType(),
true,
752 GlobalVariable::InternalLinkage, Arr, Name);
753 Var->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
755 SmallVector<char, 32> NameBuf;
758 Var->setSection(SectionName);
765 std::pair<Constant *, Constant *>
766 addArrayToModule(ArrayRef<char> Buf,
const Twine &Name,
767 const Twine &Section =
"") {
768 auto *Var = addGlobalArrayVariable(Name, Buf, Section);
770 getSizetConstPair(0, 0));
772 Var->getValueType(), Var, getSizetConstPair(0, Buf.
size()));
773 return std::make_pair(ImageB, ImageE);
779 Constant *addRawDataToModule(ArrayRef<char>
Data,
const Twine &Name) {
780 auto *Var = addGlobalArrayVariable(Name,
Data);
782 getSizetConstPair(0, 0));
791 Constant *addStringToModule(StringRef Str,
const Twine &Name) {
793 auto *Var =
new GlobalVariable(M, Arr->getType(),
true,
794 GlobalVariable::InternalLinkage, Arr, Name);
795 Var->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
806 std::pair<Constant *, Constant *>
807 initOffloadEntriesPerImage(StringRef Entries,
const Twine &OffloadKindTag) {
811 for (line_iterator LI(*MB); !LI.is_at_eof(); ++LI) {
822 auto *EntriesGV =
new GlobalVariable(M, Arr->getType(),
true,
823 GlobalVariable::InternalLinkage, Arr,
824 OffloadKindTag +
"entries_arr");
827 EntriesGV->getValueType(), EntriesGV, getSizetConstPair(0, 0));
829 EntriesGV->getValueType(), EntriesGV,
830 getSizetConstPair(0, EntriesInits.
size()));
831 return std::make_pair(EntriesB, EntriesE);
834 Constant *wrapImage(
const OffloadBinary &OB,
const Twine &ImageID,
835 StringRef OffloadKindTag) {
839 constexpr uint16_t DeviceImageStructVersion = 3;
841 ConstantInt::get(Type::getInt16Ty(C), DeviceImageStructVersion);
842 Constant *OffloadKindConstant = ConstantInt::get(
843 Type::getInt8Ty(C),
static_cast<uint8_t
>(
OB.getOffloadKind()));
844 Constant *ImageKindConstant = ConstantInt::get(
845 Type::getInt8Ty(C),
static_cast<uint8_t
>(
OB.getImageKind()));
846 StringRef Triple =
OB.getString(
"triple");
848 addStringToModule(Triple, Twine(OffloadKindTag) +
"target." + ImageID);
850 addStringToModule(Options.CompileOptions,
851 Twine(OffloadKindTag) +
"opts.compile." + ImageID);
852 Constant *LinkOptions = addStringToModule(
853 Options.LinkOptions, Twine(OffloadKindTag) +
"opts.link." + ImageID);
856 std::pair<Constant *, Constant *> PropertiesConstants = {
860 StringRef RawImage =
OB.getImage();
861 std::pair<Constant *, Constant *>
Binary = addArrayToModule(
862 ArrayRef<char>(RawImage.
begin(), RawImage.
end()),
863 Twine(OffloadKindTag) + ImageID +
".data",
".llvm.offloading");
866 std::pair<Constant *, Constant *> ImageEntriesPtrs =
867 initOffloadEntriesPerImage(
OB.getString(
"symbols"), OffloadKindTag);
869 SyclDeviceImageTy,
Version, OffloadKindConstant, ImageKindConstant,
870 TripleConstant, CompileOptions, LinkOptions,
Binary.first,
871 Binary.second, ImageEntriesPtrs.first, ImageEntriesPtrs.second,
872 PropertiesConstants.first, PropertiesConstants.second);
874 return WrappedBinary;
878 StringRef OffloadKindTag) {
880 ArrayType::get(SyclDeviceImageTy, WrappedImages.
size()), WrappedImages);
882 new GlobalVariable(M, ImagesData->getType(),
true,
884 Twine(OffloadKindTag) +
"device_images");
885 ImagesGV->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
894 static constexpr uint16_t BinDescStructVersion = 1;
897 ConstantInt::get(Type::getInt16Ty(C), BinDescStructVersion),
898 ConstantInt::get(Type::getInt16Ty(C), WrappedImages.
size()), ImagesB,
901 return new GlobalVariable(M, DescInit->getType(),
true,
903 Twine(OffloadKindTag) +
"descriptor");
958 StringRef OffloadKindTag =
".sycl_offloading.";
961 for (
size_t I = 0,
E = OffloadFiles.
size();
I !=
E; ++
I)
963 wrapImage(*OffloadFiles[
I].getBinary(), Twine(
I), OffloadKindTag));
965 return combineWrappedImages(WrappedImages, OffloadKindTag);
968 void createRegisterFatbinFunction(GlobalVariable *FatbinDesc) {
969 auto *FuncTy = FunctionType::get(Type::getVoidTy(C),
false);
971 Twine(
"sycl") +
".descriptor_reg", &M);
972 Func->setSection(
".text.startup");
976 FunctionType::get(Type::getVoidTy(C), PointerType::getUnqual(C),
978 FunctionCallee RegFuncC =
979 M.getOrInsertFunction(
"__sycl_register_lib", RegFuncTy);
983 Builder.CreateCall(RegFuncC, FatbinDesc);
984 Builder.CreateRetVoid();
990 void createUnregisterFunction(GlobalVariable *FatbinDesc) {
991 auto *FuncTy = FunctionType::get(Type::getVoidTy(C),
false);
993 "sycl.descriptor_unreg", &M);
994 Func->setSection(
".text.startup");
998 FunctionType::get(Type::getVoidTy(C), PointerType::getUnqual(C),
1000 FunctionCallee UnRegFuncC =
1001 M.getOrInsertFunction(
"__sycl_unregister_lib", UnRegFuncTy);
1005 Builder.CreateCall(UnRegFuncC, FatbinDesc);
1006 Builder.CreateRetVoid();
1019 createBinDesc(M, Images, EntryArray, Suffix, Relocatable);
1022 "No binary descriptors created.");
1023 createRegisterFunction(M,
Desc, Suffix);
1030 bool EmitSurfacesAndTextures) {
1034 "No fatbin section created.");
1036 createRegisterFatbinFunction(M,
Desc,
false, EntryArray, Suffix,
1037 EmitSurfacesAndTextures);
1043 bool EmitSurfacesAndTextures) {
1047 "No fatbin section created.");
1049 createRegisterFatbinFunction(M,
Desc,
true, EntryArray, Suffix,
1050 EmitSurfacesAndTextures);
1066 "No binary descriptors created.");
1068 W.createRegisterFatbinFunction(
Desc);
1069 W.createUnregisterFunction(
Desc);
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
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 Constant * getInBoundsGetElementPtr(Type *Ty, Constant *C, ArrayRef< Constant * > IdxList)
Create an "inbounds" getelementptr.
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 * 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)
@ InternalLinkage
Rename collisions when linking (static functions).
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.
static std::unique_ptr< MemoryBuffer > getMemBuffer(StringRef InputData, StringRef BufferName="", bool RequiresNullTerminator=true)
Open the specified memory range as a MemoryBuffer.
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.
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)
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.