LLVM 22.0.0git
OffloadBinary.h File Reference
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Object/Binary.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/MemoryBuffer.h"
#include <memory>

Go to the source code of this file.

Classes

class  llvm::object::OffloadBinary
 A simple binary serialization of an offloading file. More...
struct  llvm::object::OffloadBinary::OffloadingImage
 The offloading metadata that will be serialized to a memory buffer. More...
struct  llvm::object::OffloadBinary::Header
struct  llvm::object::OffloadBinary::Entry
struct  llvm::object::OffloadBinary::StringEntry
class  llvm::object::OffloadFile
 A class to contain the binary information for a single OffloadBinary that owns its memory. More...

Namespaces

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

Enumerations

enum  llvm::object::OffloadKind : uint16_t {
  llvm::object::OFK_None = 0 , llvm::object::OFK_OpenMP = (1 << 0) , llvm::object::OFK_Cuda = (1 << 1) , llvm::object::OFK_HIP = (1 << 2) ,
  llvm::object::OFK_SYCL = (1 << 3) , llvm::object::OFK_LAST = (1 << 4)
}
 The producer of the associated offloading image. More...
enum  llvm::object::ImageKind : uint16_t {
  llvm::object::IMG_None = 0 , llvm::object::IMG_Object , llvm::object::IMG_Bitcode , llvm::object::IMG_Cubin ,
  llvm::object::IMG_Fatbinary , llvm::object::IMG_PTX , llvm::object::IMG_SPIRV , llvm::object::IMG_LAST
}
 The type of contents the offloading image contains. More...

Functions

LLVM_ABI Error llvm::object::extractOffloadBinaries (MemoryBufferRef Buffer, SmallVectorImpl< OffloadFile > &Binaries)
 Extracts embedded device offloading code from a memory Buffer to a list of Binaries.
LLVM_ABI ImageKind llvm::object::getImageKind (StringRef Name)
 Convert a string Name to an image kind.
LLVM_ABI StringRef llvm::object::getImageKindName (ImageKind Name)
 Convert an image kind to its string representation.
LLVM_ABI OffloadKind llvm::object::getOffloadKind (StringRef Name)
 Convert a string Name to an offload kind.
LLVM_ABI StringRef llvm::object::getOffloadKindName (OffloadKind Name)
 Convert an offload kind to its string representation.
LLVM_ABI bool llvm::object::areTargetsCompatible (const OffloadFile::TargetID &LHS, const OffloadFile::TargetID &RHS)
 If the target is AMD we check the target IDs for mutual compatibility.