14#ifndef LLVM_TARGETPARSER_INTELGPUTARGETPARSER_H
15#define LLVM_TARGETPARSER_INTELGPUTARGETPARSER_H
34#define INTEL_GPU(NAME, KIND, MAJOR, MINOR, IGCA_TARGET, IGCA_FEATURE_SETS) \
36#define INTEL_GPU_COMPAT(NAME, KIND, IGCA_TARGET, IGCA_FEATURE_SETS) GK_##KIND,
37#include "llvm/TargetParser/IntelGPUTargetParser.def"
68 static constexpr uint32_t TargetShift = 16;
69 static constexpr uint32_t FeatureSetMask = 0x7;
70 static constexpr uint32_t IsExactMask = 0x1;
72 static constexpr uint32_t ReservedMask =
73 ((
uint32_t(1) << TargetShift) - 1) & ~FeatureSetMask;
81 constexpr IGCATarget() =
default;
83 explicit IGCATarget(
uint32_t Packed) {
87 if (isKnownIGCATarget(Packed))
97 static constexpr IGCATarget
invalid() {
return IGCATarget(); }
113 constexpr bool isExact()
const {
return V & IsExactMask; }
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
This file contains library features backported from future STL versions.
constexpr bool isAnyRender() const
constexpr IGCAFeatureSet getFeatureSet() const
IGCATarget(uint16_t Target, IGCAFeatureSet FeatureSet)
constexpr bool isComputeExact() const
constexpr bool isCore() const
constexpr uint32_t pack() const
constexpr bool isExact() const
static IGCATarget unpack(uint32_t V)
Wrap a packed uint32_t IGCA target with an IGCATarget class.
constexpr bool isValid() const
friend constexpr bool operator==(IGCATarget A, IGCATarget B)
friend constexpr bool operator!=(IGCATarget A, IGCATarget B)
constexpr uint16_t getTarget() const
constexpr bool isAnyCompute() const
static constexpr IGCATarget invalid()
constexpr bool isRenderExact() const
Represent a constant reference to a string, i.e.
Target - Wrapper for Target specific information.
LLVM_ABI GPUKind parseArch(StringRef Name)
LLVM_ABI std::string getNumericArchName(uint32_t GPUIPVersion)
IGCAFeatureSet
Represents an IGCA feature set, including whether or not it is exact.
LLVM_ABI IGCATarget parseIGCATarget(StringRef MaybeTarget)
Parse an IGCA target string such as "igca_20ca".
LLVM_ABI StringRef getIGCATargetName(IGCATarget Target)
LLVM_ABI StringRef getArchName(uint32_t GPUIPVersion)
GPUKind
Intel GPU architecture names, covering both physical devices and the compatibility names that stand f...
This is an optimization pass for GlobalISel generic memory operations.
constexpr std::underlying_type_t< Enum > to_underlying(Enum E)
Returns underlying integer value of an enum.