1 //===-- SPIRV.td - Describe the SPIR-V Target Machine ------*- tablegen -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 include "llvm/Target/Target.td"
11 include "SPIRVRegisterInfo.td"
12 include "SPIRVRegisterBanks.td"
13 include "SPIRVInstrInfo.td"
14 include "SPIRVBuiltins.td"
16 def SPIRVInstrInfo : InstrInfo;
18 class Proc<string Name, list<SubtargetFeature> Features>
19 : Processor<Name, NoItineraries, Features>;
21 def : Proc<"generic", []>;
23 def SPIRV10 : SubtargetFeature<"spirv1.0", "SPIRVVersion", "10",
24 "Use SPIR-V version 1.0">;
25 def SPIRV11 : SubtargetFeature<"spirv1.1", "SPIRVVersion", "11",
26 "Use SPIR-V version 1.1">;
27 def SPIRV12 : SubtargetFeature<"spirv1.2", "SPIRVVersion", "12",
28 "Use SPIR-V version 1.2">;
29 def SPIRV13 : SubtargetFeature<"spirv1.3", "SPIRVVersion", "13",
30 "Use SPIR-V version 1.3">;
31 def SPIRV14 : SubtargetFeature<"spirv1.4", "SPIRVVersion", "14",
32 "Use SPIR-V version 1.4">;
33 def SPIRV15 : SubtargetFeature<"spirv1.5", "SPIRVVersion", "15",
34 "Use SPIR-V version 1.5">;
36 def SPIRVInstPrinter : AsmWriter {
37 string AsmWriterClassName = "InstPrinter";
38 bit isMCAsmWriter = 1;
42 let InstructionSet = SPIRVInstrInfo;
43 let AssemblyWriters = [SPIRVInstPrinter];