1 //===- NVPTX.td - Describe the NVPTX Target Machine -----------*- tblgen -*-==//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
9 // This is the top level entry point for the NVPTX target.
10 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
13 // Target-independent interfaces
14 //===----------------------------------------------------------------------===//
16 include "llvm/Target/Target.td"
18 include "NVPTXRegisterInfo.td"
19 include "NVPTXInstrInfo.td"
21 //===----------------------------------------------------------------------===//
22 // Subtarget Features.
23 // - We use the SM version number instead of explicit feature table.
24 // - Need at least one feature to avoid generating zero sized array by
25 // TableGen in NVPTXGenSubtarget.inc.
26 //===----------------------------------------------------------------------===//
29 def SM20 : SubtargetFeature<"sm_20", "SmVersion", "20",
31 def SM21 : SubtargetFeature<"sm_21", "SmVersion", "21",
33 def SM30 : SubtargetFeature<"sm_30", "SmVersion", "30",
35 def SM32 : SubtargetFeature<"sm_32", "SmVersion", "32",
37 def SM35 : SubtargetFeature<"sm_35", "SmVersion", "35",
39 def SM37 : SubtargetFeature<"sm_37", "SmVersion", "37",
41 def SM50 : SubtargetFeature<"sm_50", "SmVersion", "50",
43 def SM52 : SubtargetFeature<"sm_52", "SmVersion", "52",
45 def SM53 : SubtargetFeature<"sm_53", "SmVersion", "53",
47 def SM60 : SubtargetFeature<"sm_60", "SmVersion", "60",
49 def SM61 : SubtargetFeature<"sm_61", "SmVersion", "61",
51 def SM62 : SubtargetFeature<"sm_62", "SmVersion", "62",
54 def SATOM : SubtargetFeature<"satom", "HasAtomScope", "true",
55 "Atomic operations with scope">;
58 def PTX32 : SubtargetFeature<"ptx32", "PTXVersion", "32",
59 "Use PTX version 3.2">;
60 def PTX40 : SubtargetFeature<"ptx40", "PTXVersion", "40",
61 "Use PTX version 4.0">;
62 def PTX41 : SubtargetFeature<"ptx41", "PTXVersion", "41",
63 "Use PTX version 4.1">;
64 def PTX42 : SubtargetFeature<"ptx42", "PTXVersion", "42",
65 "Use PTX version 4.2">;
66 def PTX43 : SubtargetFeature<"ptx43", "PTXVersion", "43",
67 "Use PTX version 4.3">;
68 def PTX50 : SubtargetFeature<"ptx50", "PTXVersion", "50",
69 "Use PTX version 5.0">;
71 //===----------------------------------------------------------------------===//
72 // NVPTX supported processors.
73 //===----------------------------------------------------------------------===//
75 class Proc<string Name, list<SubtargetFeature> Features>
76 : Processor<Name, NoItineraries, Features>;
78 def : Proc<"sm_20", [SM20]>;
79 def : Proc<"sm_21", [SM21]>;
80 def : Proc<"sm_30", [SM30]>;
81 def : Proc<"sm_32", [SM32, PTX40]>;
82 def : Proc<"sm_35", [SM35]>;
83 def : Proc<"sm_37", [SM37, PTX41]>;
84 def : Proc<"sm_50", [SM50, PTX40]>;
85 def : Proc<"sm_52", [SM52, PTX41]>;
86 def : Proc<"sm_53", [SM53, PTX42]>;
87 def : Proc<"sm_60", [SM60, PTX50, SATOM]>;
88 def : Proc<"sm_61", [SM61, PTX50, SATOM]>;
89 def : Proc<"sm_62", [SM62, PTX50, SATOM]>;
91 def NVPTXInstrInfo : InstrInfo {
95 let InstructionSet = NVPTXInstrInfo;