15#ifndef LLVM_LIB_TARGET_SPIRV_MCTARGETDESC_SPIRVBASEINFO_H
16#define LLVM_LIB_TARGET_SPIRV_MCTARGETDESC_SPIRVBASEINFO_H
28#define GET_OperandCategory_DECL
29#include "SPIRVGenTables.inc"
33#define GET_Extension_DECL
34#include "SPIRVGenTables.inc"
38#define GET_Capability_DECL
39#include "SPIRVGenTables.inc"
43#define GET_Environment_DECL
44#include "SPIRVGenTables.inc"
48#define GET_SourceLanguage_DECL
49#include "SPIRVGenTables.inc"
53#define GET_AddressingModel_DECL
54#include "SPIRVGenTables.inc"
58#define GET_ExecutionModel_DECL
59#include "SPIRVGenTables.inc"
63#define GET_MemoryModel_DECL
64#include "SPIRVGenTables.inc"
68#define GET_MatrixMultiplyAccumulateOperands_DECL
69#include "SPIRVGenTables.inc"
73#define GET_ExecutionMode_DECL
74#include "SPIRVGenTables.inc"
78#define GET_StorageClass_DECL
79#include "SPIRVGenTables.inc"
84#include "SPIRVGenTables.inc"
88#define GET_SamplerAddressingMode_DECL
89#include "SPIRVGenTables.inc"
93#define GET_SamplerFilterMode_DECL
94#include "SPIRVGenTables.inc"
98#define GET_ImageFormat_DECL
99#include "SPIRVGenTables.inc"
103#define GET_ImageChannelOrder_DECL
104#include "SPIRVGenTables.inc"
108#define GET_ImageChannelDataType_DECL
109#include "SPIRVGenTables.inc"
113#define GET_ImageOperand_DECL
114#include "SPIRVGenTables.inc"
118#define GET_FPFastMathMode_DECL
119#include "SPIRVGenTables.inc"
123#define GET_FPRoundingMode_DECL
124#include "SPIRVGenTables.inc"
128#define GET_LinkageType_DECL
129#include "SPIRVGenTables.inc"
133#define GET_AccessQualifier_DECL
134#include "SPIRVGenTables.inc"
138#define GET_FunctionParameterAttribute_DECL
139#include "SPIRVGenTables.inc"
143#define GET_Decoration_DECL
144#include "SPIRVGenTables.inc"
148#define GET_BuiltIn_DECL
149#include "SPIRVGenTables.inc"
153#define GET_SelectionControl_DECL
154#include "SPIRVGenTables.inc"
158#define GET_LoopControl_DECL
159#include "SPIRVGenTables.inc"
163#define GET_FunctionControl_DECL
164#include "SPIRVGenTables.inc"
168#define GET_MemorySemantics_DECL
169#include "SPIRVGenTables.inc"
173#define GET_MemoryOperand_DECL
174#include "SPIRVGenTables.inc"
178#define GET_Scope_DECL
179#include "SPIRVGenTables.inc"
183#define GET_GroupOperation_DECL
184#include "SPIRVGenTables.inc"
188#define GET_KernelEnqueueFlags_DECL
189#include "SPIRVGenTables.inc"
193#define GET_KernelProfilingInfo_DECL
194#include "SPIRVGenTables.inc"
198#define GET_InstructionSet_DECL
199#include "SPIRVGenTables.inc"
203#define GET_OpenCLExtInst_DECL
204#include "SPIRVGenTables.inc"
208#define GET_GLSLExtInst_DECL
209#include "SPIRVGenTables.inc"
213#define GET_NonSemanticExtInst_DECL
214#include "SPIRVGenTables.inc"
218#define GET_Opcode_DECL
219#include "SPIRVGenTables.inc"
223#define GET_CooperativeMatrixLayout_DECL
224#include "SPIRVGenTables.inc"
228#define GET_CooperativeMatrixOperands_DECL
229#include "SPIRVGenTables.inc"
233#define GET_SpecConstantOpOperands_DECL
234#include "SPIRVGenTables.inc"
238#define GET_FPEncoding_DECL
239#include "SPIRVGenTables.inc"
244 InstructionSet::InstructionSet
Set;
276 SPIRV::OperandCategory::OperandCategory Category,
uint32_t Value);
287SPIRV::InstructionSet::InstructionSet
289std::string
getExtInstName(SPIRV::InstructionSet::InstructionSet Set,
294template <
class InstType>
298 const unsigned NumOps =
MI.getNumOperands();
299 bool IsFinished =
false;
300 for (
unsigned i = StartIndex; i <
NumOps && !IsFinished; ++i) {
301 const auto &
Op =
MI.getOperand(i);
304 assert((
Op.getImm() >> 32) == 0 &&
"Imm operand should be i32 word");
306 for (
unsigned ShiftAmount = 0; ShiftAmount < 32; ShiftAmount += 8) {
307 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.
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