15#ifndef LLVM_LIB_TARGET_SPIRV_SPIRVSYMBOLICOPERANDS_H
16#define LLVM_LIB_TARGET_SPIRV_SPIRVSYMBOLICOPERANDS_H
25namespace OperandCategory {
26#define GET_OperandCategory_DECL
27#include "SPIRVGenTables.inc"
31#define GET_Extension_DECL
32#include "SPIRVGenTables.inc"
36#define GET_Capability_DECL
37#include "SPIRVGenTables.inc"
41#define GET_SourceLanguage_DECL
42#include "SPIRVGenTables.inc"
45namespace AddressingModel {
46#define GET_AddressingModel_DECL
47#include "SPIRVGenTables.inc"
50namespace ExecutionModel {
51#define GET_ExecutionModel_DECL
52#include "SPIRVGenTables.inc"
55namespace MemoryModel {
56#define GET_MemoryModel_DECL
57#include "SPIRVGenTables.inc"
60namespace ExecutionMode {
61#define GET_ExecutionMode_DECL
62#include "SPIRVGenTables.inc"
66#define GET_StorageClass_DECL
67#include "SPIRVGenTables.inc"
72#include "SPIRVGenTables.inc"
75namespace SamplerAddressingMode {
76#define GET_SamplerAddressingMode_DECL
77#include "SPIRVGenTables.inc"
80namespace SamplerFilterMode {
81#define GET_SamplerFilterMode_DECL
82#include "SPIRVGenTables.inc"
85namespace ImageFormat {
86#define GET_ImageFormat_DECL
87#include "SPIRVGenTables.inc"
90namespace ImageChannelOrder {
91#define GET_ImageChannelOrder_DECL
92#include "SPIRVGenTables.inc"
95namespace ImageChannelDataType {
96#define GET_ImageChannelDataType_DECL
97#include "SPIRVGenTables.inc"
100namespace ImageOperand {
101#define GET_ImageOperand_DECL
102#include "SPIRVGenTables.inc"
105namespace FPFastMathMode {
106#define GET_FPFastMathMode_DECL
107#include "SPIRVGenTables.inc"
110namespace FPRoundingMode {
111#define GET_FPRoundingMode_DECL
112#include "SPIRVGenTables.inc"
115namespace LinkageType {
116#define GET_LinkageType_DECL
117#include "SPIRVGenTables.inc"
120namespace AccessQualifier {
121#define GET_AccessQualifier_DECL
122#include "SPIRVGenTables.inc"
125namespace FunctionParameterAttribute {
126#define GET_FunctionParameterAttribute_DECL
127#include "SPIRVGenTables.inc"
130namespace Decoration {
131#define GET_Decoration_DECL
132#include "SPIRVGenTables.inc"
136#define GET_BuiltIn_DECL
137#include "SPIRVGenTables.inc"
140namespace SelectionControl {
141#define GET_SelectionControl_DECL
142#include "SPIRVGenTables.inc"
145namespace LoopControl {
146#define GET_LoopControl_DECL
147#include "SPIRVGenTables.inc"
150namespace FunctionControl {
151#define GET_FunctionControl_DECL
152#include "SPIRVGenTables.inc"
155namespace MemorySemantics {
156#define GET_MemorySemantics_DECL
157#include "SPIRVGenTables.inc"
160namespace MemoryOperand {
161#define GET_MemoryOperand_DECL
162#include "SPIRVGenTables.inc"
166#define GET_Scope_DECL
167#include "SPIRVGenTables.inc"
170namespace GroupOperation {
171#define GET_GroupOperation_DECL
172#include "SPIRVGenTables.inc"
175namespace KernelEnqueueFlags {
176#define GET_KernelEnqueueFlags_DECL
177#include "SPIRVGenTables.inc"
180namespace KernelProfilingInfo {
181#define GET_KernelProfilingInfo_DECL
182#include "SPIRVGenTables.inc"
185namespace InstructionSet {
186#define GET_InstructionSet_DECL
187#include "SPIRVGenTables.inc"
190namespace OpenCLExtInst {
191#define GET_OpenCLExtInst_DECL
192#include "SPIRVGenTables.inc"
195namespace GLSLExtInst {
196#define GET_GLSLExtInst_DECL
197#include "SPIRVGenTables.inc"
200namespace NonSemanticExtInst {
201#define GET_NonSemanticExtInst_DECL
202#include "SPIRVGenTables.inc"
206#define GET_Opcode_DECL
207#include "SPIRVGenTables.inc"
210namespace CooperativeMatrixLayout {
211#define GET_CooperativeMatrixLayout_DECL
212#include "SPIRVGenTables.inc"
215namespace CooperativeMatrixOperands {
216#define GET_CooperativeMatrixOperands_DECL
217#include "SPIRVGenTables.inc"
222 InstructionSet::InstructionSet
Set;
252SPIRV::InstructionSet::InstructionSet
254std::string
getExtInstName(SPIRV::InstructionSet::InstructionSet Set,
259template <
class InstType>
263 const unsigned NumOps =
MI.getNumOperands();
264 bool IsFinished =
false;
265 for (
unsigned i = StartIndex; i < NumOps && !IsFinished; ++i) {
266 const auto &
Op =
MI.getOperand(i);
269 assert((
Op.getImm() >> 32) == 0 &&
"Imm operand should be i32 word");
271 for (
unsigned ShiftAmount = 0; ShiftAmount < 32; ShiftAmount += 8) {
272 char c = (Imm >> ShiftAmount) & 0xff;
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallVector class.
Defines the llvm::VersionTuple class, which represents a version in the form major[....
This class represents an Operation in the Expression.
StringRef - Represent a constant reference to a string, i.e.
LLVM Value Representation.
Represents a version number in the form major[.minor[.subminor[.build]]].
This is an optimization pass for GlobalISel generic memory operations.
ExtensionList getSymbolicOperandExtensions(SPIRV::OperandCategory::OperandCategory Category, uint32_t Value)
std::string getExtInstName(SPIRV::InstructionSet::InstructionSet Set, uint32_t InstructionNumber)
CapabilityList getSymbolicOperandCapabilities(SPIRV::OperandCategory::OperandCategory Category, uint32_t Value)
std::string getExtInstSetName(SPIRV::InstructionSet::InstructionSet Set)
bool getSpirvBuiltInIdByName(llvm::StringRef Name, SPIRV::BuiltIn::BuiltIn &BI)
VersionTuple getSymbolicOperandMaxVersion(SPIRV::OperandCategory::OperandCategory Category, uint32_t Value)
std::string getSPIRVStringOperand(const InstType &MI, unsigned StartIndex)
CapabilityList getCapabilitiesEnabledByExtension(SPIRV::Extension::Extension Extension)
SPIRV::InstructionSet::InstructionSet getExtInstSetFromString(std::string SetName)
std::string getSymbolicOperandMnemonic(SPIRV::OperandCategory::OperandCategory Category, int32_t Value)
VersionTuple getSymbolicOperandMinVersion(SPIRV::OperandCategory::OperandCategory Category, uint32_t Value)
std::string getLinkStringForBuiltIn(SPIRV::BuiltIn::BuiltIn BuiltInValue)
InstructionSet::InstructionSet Set