15#ifndef LLVM_LIB_TARGET_SPIRV_SPIRVSYMBOLICOPERANDS_H
16#define LLVM_LIB_TARGET_SPIRV_SPIRVSYMBOLICOPERANDS_H
27#define GET_OperandCategory_DECL
28#include "SPIRVGenTables.inc"
32#define GET_Extension_DECL
33#include "SPIRVGenTables.inc"
37#define GET_Capability_DECL
38#include "SPIRVGenTables.inc"
42#define GET_Environment_DECL
43#include "SPIRVGenTables.inc"
47#define GET_SourceLanguage_DECL
48#include "SPIRVGenTables.inc"
52#define GET_AddressingModel_DECL
53#include "SPIRVGenTables.inc"
57#define GET_ExecutionModel_DECL
58#include "SPIRVGenTables.inc"
62#define GET_MemoryModel_DECL
63#include "SPIRVGenTables.inc"
67#define GET_MatrixMultiplyAccumulateOperands_DECL
68#include "SPIRVGenTables.inc"
72#define GET_ExecutionMode_DECL
73#include "SPIRVGenTables.inc"
77#define GET_StorageClass_DECL
78#include "SPIRVGenTables.inc"
83#include "SPIRVGenTables.inc"
87#define GET_SamplerAddressingMode_DECL
88#include "SPIRVGenTables.inc"
92#define GET_SamplerFilterMode_DECL
93#include "SPIRVGenTables.inc"
97#define GET_ImageFormat_DECL
98#include "SPIRVGenTables.inc"
102#define GET_ImageChannelOrder_DECL
103#include "SPIRVGenTables.inc"
107#define GET_ImageChannelDataType_DECL
108#include "SPIRVGenTables.inc"
112#define GET_ImageOperand_DECL
113#include "SPIRVGenTables.inc"
117#define GET_FPFastMathMode_DECL
118#include "SPIRVGenTables.inc"
122#define GET_FPRoundingMode_DECL
123#include "SPIRVGenTables.inc"
127#define GET_LinkageType_DECL
128#include "SPIRVGenTables.inc"
132#define GET_AccessQualifier_DECL
133#include "SPIRVGenTables.inc"
137#define GET_FunctionParameterAttribute_DECL
138#include "SPIRVGenTables.inc"
142#define GET_Decoration_DECL
143#include "SPIRVGenTables.inc"
147#define GET_BuiltIn_DECL
148#include "SPIRVGenTables.inc"
152#define GET_SelectionControl_DECL
153#include "SPIRVGenTables.inc"
157#define GET_LoopControl_DECL
158#include "SPIRVGenTables.inc"
162#define GET_FunctionControl_DECL
163#include "SPIRVGenTables.inc"
167#define GET_MemorySemantics_DECL
168#include "SPIRVGenTables.inc"
172#define GET_MemoryOperand_DECL
173#include "SPIRVGenTables.inc"
177#define GET_Scope_DECL
178#include "SPIRVGenTables.inc"
182#define GET_GroupOperation_DECL
183#include "SPIRVGenTables.inc"
187#define GET_KernelEnqueueFlags_DECL
188#include "SPIRVGenTables.inc"
192#define GET_KernelProfilingInfo_DECL
193#include "SPIRVGenTables.inc"
197#define GET_InstructionSet_DECL
198#include "SPIRVGenTables.inc"
202#define GET_OpenCLExtInst_DECL
203#include "SPIRVGenTables.inc"
207#define GET_GLSLExtInst_DECL
208#include "SPIRVGenTables.inc"
212#define GET_NonSemanticExtInst_DECL
213#include "SPIRVGenTables.inc"
217#define GET_Opcode_DECL
218#include "SPIRVGenTables.inc"
222#define GET_CooperativeMatrixLayout_DECL
223#include "SPIRVGenTables.inc"
227#define GET_CooperativeMatrixOperands_DECL
228#include "SPIRVGenTables.inc"
232#define GET_SpecConstantOpOperands_DECL
233#include "SPIRVGenTables.inc"
237#define GET_FPEncoding_DECL
238#include "SPIRVGenTables.inc"
243 InstructionSet::InstructionSet
Set;
275 SPIRV::OperandCategory::OperandCategory Category,
uint32_t Value);
286SPIRV::InstructionSet::InstructionSet
288std::string
getExtInstName(SPIRV::InstructionSet::InstructionSet Set,
293template <
class InstType>
297 const unsigned NumOps =
MI.getNumOperands();
298 bool IsFinished =
false;
299 for (
unsigned i = StartIndex; i <
NumOps && !IsFinished; ++i) {
300 const auto &
Op =
MI.getOperand(i);
303 assert((
Op.getImm() >> 32) == 0 &&
"Imm operand should be i32 word");
305 for (
unsigned ShiftAmount = 0; ShiftAmount < 32; ShiftAmount += 8) {
306 char c = (Imm >> ShiftAmount) & 0xff;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file defines the DenseSet and SmallDenseSet classes.
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[....
Implements a dense probed hash-table based set.
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)
DenseSet< SPIRV::Extension::Extension > ExtensionSet
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