15#ifndef LLVM_LIB_TARGET_SPIRV_SPIRVSYMBOLICOPERANDS_H
16#define LLVM_LIB_TARGET_SPIRV_SPIRVSYMBOLICOPERANDS_H
24namespace OperandCategory {
25#define GET_OperandCategory_DECL
26#include "SPIRVGenTables.inc"
30#define GET_Extension_DECL
31#include "SPIRVGenTables.inc"
35#define GET_Capability_DECL
36#include "SPIRVGenTables.inc"
40#define GET_SourceLanguage_DECL
41#include "SPIRVGenTables.inc"
44namespace AddressingModel {
45#define GET_AddressingModel_DECL
46#include "SPIRVGenTables.inc"
49namespace ExecutionModel {
50#define GET_ExecutionModel_DECL
51#include "SPIRVGenTables.inc"
54namespace MemoryModel {
55#define GET_MemoryModel_DECL
56#include "SPIRVGenTables.inc"
59namespace ExecutionMode {
60#define GET_ExecutionMode_DECL
61#include "SPIRVGenTables.inc"
65#define GET_StorageClass_DECL
66#include "SPIRVGenTables.inc"
71#include "SPIRVGenTables.inc"
74namespace SamplerAddressingMode {
75#define GET_SamplerAddressingMode_DECL
76#include "SPIRVGenTables.inc"
79namespace SamplerFilterMode {
80#define GET_SamplerFilterMode_DECL
81#include "SPIRVGenTables.inc"
84namespace ImageFormat {
85#define GET_ImageFormat_DECL
86#include "SPIRVGenTables.inc"
89namespace ImageChannelOrder {
90#define GET_ImageChannelOrder_DECL
91#include "SPIRVGenTables.inc"
94namespace ImageChannelDataType {
95#define GET_ImageChannelDataType_DECL
96#include "SPIRVGenTables.inc"
99namespace ImageOperand {
100#define GET_ImageOperand_DECL
101#include "SPIRVGenTables.inc"
104namespace FPFastMathMode {
105#define GET_FPFastMathMode_DECL
106#include "SPIRVGenTables.inc"
109namespace FPRoundingMode {
110#define GET_FPRoundingMode_DECL
111#include "SPIRVGenTables.inc"
114namespace LinkageType {
115#define GET_LinkageType_DECL
116#include "SPIRVGenTables.inc"
119namespace AccessQualifier {
120#define GET_AccessQualifier_DECL
121#include "SPIRVGenTables.inc"
124namespace FunctionParameterAttribute {
125#define GET_FunctionParameterAttribute_DECL
126#include "SPIRVGenTables.inc"
129namespace Decoration {
130#define GET_Decoration_DECL
131#include "SPIRVGenTables.inc"
135#define GET_BuiltIn_DECL
136#include "SPIRVGenTables.inc"
139namespace SelectionControl {
140#define GET_SelectionControl_DECL
141#include "SPIRVGenTables.inc"
144namespace LoopControl {
145#define GET_LoopControl_DECL
146#include "SPIRVGenTables.inc"
149namespace FunctionControl {
150#define GET_FunctionControl_DECL
151#include "SPIRVGenTables.inc"
154namespace MemorySemantics {
155#define GET_MemorySemantics_DECL
156#include "SPIRVGenTables.inc"
159namespace MemoryOperand {
160#define GET_MemoryOperand_DECL
161#include "SPIRVGenTables.inc"
165#define GET_Scope_DECL
166#include "SPIRVGenTables.inc"
169namespace GroupOperation {
170#define GET_GroupOperation_DECL
171#include "SPIRVGenTables.inc"
174namespace KernelEnqueueFlags {
175#define GET_KernelEnqueueFlags_DECL
176#include "SPIRVGenTables.inc"
179namespace KernelProfilingInfo {
180#define GET_KernelProfilingInfo_DECL
181#include "SPIRVGenTables.inc"
184namespace InstructionSet {
185#define GET_InstructionSet_DECL
186#include "SPIRVGenTables.inc"
189namespace OpenCLExtInst {
190#define GET_OpenCLExtInst_DECL
191#include "SPIRVGenTables.inc"
194namespace GLSLExtInst {
195#define GET_GLSLExtInst_DECL
196#include "SPIRVGenTables.inc"
200#define GET_Opcode_DECL
201#include "SPIRVGenTables.inc"
206 InstructionSet::InstructionSet
Set;
236SPIRV::InstructionSet::InstructionSet
238std::string
getExtInstName(SPIRV::InstructionSet::InstructionSet Set,
243template <
class InstType>
247 const unsigned NumOps =
MI.getNumOperands();
248 bool IsFinished =
false;
249 for (
unsigned i = StartIndex; i < NumOps && !IsFinished; ++i) {
250 const auto &
Op =
MI.getOperand(i);
253 assert((
Op.getImm() >> 32) == 0 &&
"Imm operand should be i32 word");
255 for (
unsigned ShiftAmount = 0; ShiftAmount < 32; ShiftAmount += 8) {
256 char c = (Imm >> ShiftAmount) & 0xff;
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallVector class.
static constexpr uint32_t Opcode
This class represents an Operation in the Expression.
StringRef - Represent a constant reference to a string, i.e.
LLVM Value Representation.
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)
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)
uint32_t getSymbolicOperandMinVersion(SPIRV::OperandCategory::OperandCategory Category, uint32_t Value)
uint32_t getSymbolicOperandMaxVersion(SPIRV::OperandCategory::OperandCategory Category, uint32_t Value)
std::string getLinkStringForBuiltIn(SPIRV::BuiltIn::BuiltIn BuiltInValue)
InstructionSet::InstructionSet Set