15#ifndef LLVM_LIB_TARGET_SPIRV_SPIRVSYMBOLICOPERANDS_H
16#define LLVM_LIB_TARGET_SPIRV_SPIRVSYMBOLICOPERANDS_H
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_Environment_DECL
42#include "SPIRVGenTables.inc"
46#define GET_SourceLanguage_DECL
47#include "SPIRVGenTables.inc"
51#define GET_AddressingModel_DECL
52#include "SPIRVGenTables.inc"
56#define GET_ExecutionModel_DECL
57#include "SPIRVGenTables.inc"
61#define GET_MemoryModel_DECL
62#include "SPIRVGenTables.inc"
66#define GET_MatrixMultiplyAccumulateOperands_DECL
67#include "SPIRVGenTables.inc"
71#define GET_ExecutionMode_DECL
72#include "SPIRVGenTables.inc"
76#define GET_StorageClass_DECL
77#include "SPIRVGenTables.inc"
82#include "SPIRVGenTables.inc"
86#define GET_SamplerAddressingMode_DECL
87#include "SPIRVGenTables.inc"
91#define GET_SamplerFilterMode_DECL
92#include "SPIRVGenTables.inc"
96#define GET_ImageFormat_DECL
97#include "SPIRVGenTables.inc"
101#define GET_ImageChannelOrder_DECL
102#include "SPIRVGenTables.inc"
106#define GET_ImageChannelDataType_DECL
107#include "SPIRVGenTables.inc"
111#define GET_ImageOperand_DECL
112#include "SPIRVGenTables.inc"
116#define GET_FPFastMathMode_DECL
117#include "SPIRVGenTables.inc"
121#define GET_FPRoundingMode_DECL
122#include "SPIRVGenTables.inc"
126#define GET_LinkageType_DECL
127#include "SPIRVGenTables.inc"
131#define GET_AccessQualifier_DECL
132#include "SPIRVGenTables.inc"
136#define GET_FunctionParameterAttribute_DECL
137#include "SPIRVGenTables.inc"
141#define GET_Decoration_DECL
142#include "SPIRVGenTables.inc"
146#define GET_BuiltIn_DECL
147#include "SPIRVGenTables.inc"
151#define GET_SelectionControl_DECL
152#include "SPIRVGenTables.inc"
156#define GET_LoopControl_DECL
157#include "SPIRVGenTables.inc"
161#define GET_FunctionControl_DECL
162#include "SPIRVGenTables.inc"
166#define GET_MemorySemantics_DECL
167#include "SPIRVGenTables.inc"
171#define GET_MemoryOperand_DECL
172#include "SPIRVGenTables.inc"
176#define GET_Scope_DECL
177#include "SPIRVGenTables.inc"
181#define GET_GroupOperation_DECL
182#include "SPIRVGenTables.inc"
186#define GET_KernelEnqueueFlags_DECL
187#include "SPIRVGenTables.inc"
191#define GET_KernelProfilingInfo_DECL
192#include "SPIRVGenTables.inc"
196#define GET_InstructionSet_DECL
197#include "SPIRVGenTables.inc"
201#define GET_OpenCLExtInst_DECL
202#include "SPIRVGenTables.inc"
206#define GET_GLSLExtInst_DECL
207#include "SPIRVGenTables.inc"
211#define GET_NonSemanticExtInst_DECL
212#include "SPIRVGenTables.inc"
216#define GET_Opcode_DECL
217#include "SPIRVGenTables.inc"
221#define GET_CooperativeMatrixLayout_DECL
222#include "SPIRVGenTables.inc"
226#define GET_CooperativeMatrixOperands_DECL
227#include "SPIRVGenTables.inc"
231#define GET_SpecConstantOpOperands_DECL
232#include "SPIRVGenTables.inc"
237 InstructionSet::InstructionSet
Set;
264 SPIRV::OperandCategory::OperandCategory Category,
uint32_t Value);
275SPIRV::InstructionSet::InstructionSet
277std::string
getExtInstName(SPIRV::InstructionSet::InstructionSet Set,
282template <
class InstType>
286 const unsigned NumOps =
MI.getNumOperands();
287 bool IsFinished =
false;
288 for (
unsigned i = StartIndex; i <
NumOps && !IsFinished; ++i) {
289 const auto &
Op =
MI.getOperand(i);
292 assert((
Op.getImm() >> 32) == 0 &&
"Imm operand should be i32 word");
294 for (
unsigned ShiftAmount = 0; ShiftAmount < 32; ShiftAmount += 8) {
295 char c = (Imm >> ShiftAmount) & 0xff;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
const size_t AbstractManglingParser< Derived, Alloc >::NumOps
This file defines the SmallVector class.
Defines the llvm::VersionTuple class, which represents a version in the form major[....
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.
LLVM Value Representation.
Represents a version number in the form major[.minor[.subminor[.build]]].
This is an optimization pass for GlobalISel generic memory operations.
SmallVector< SPIRV::Environment::Environment, 8 > EnvironmentList
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)
SmallVector< SPIRV::Extension::Extension, 8 > ExtensionList
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)
EnvironmentList getSymbolicOperandAllowedEnvironments(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)
DWARFExpression::Operation Op
VersionTuple getSymbolicOperandMinVersion(SPIRV::OperandCategory::OperandCategory Category, uint32_t Value)
SmallVector< SPIRV::Capability::Capability, 8 > CapabilityList
std::string getLinkStringForBuiltIn(SPIRV::BuiltIn::BuiltIn BuiltInValue)
InstructionSet::InstructionSet Set