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 SM35 : SubtargetFeature<"sm_35", "SmVersion", "35",
39 def PTX30 : SubtargetFeature<"ptx30", "PTXVersion", "30",
40 "Use PTX version 3.0">;
41 def PTX31 : SubtargetFeature<"ptx31", "PTXVersion", "31",
42 "Use PTX version 3.1">;
44 //===----------------------------------------------------------------------===//
45 // NVPTX supported processors.
46 //===----------------------------------------------------------------------===//
48 class Proc<string Name, list<SubtargetFeature> Features>
49 : Processor<Name, NoItineraries, Features>;
51 def : Proc<"sm_20", [SM20]>;
52 def : Proc<"sm_21", [SM21]>;
53 def : Proc<"sm_30", [SM30]>;
54 def : Proc<"sm_35", [SM35]>;
57 def NVPTXInstrInfo : InstrInfo {
61 let InstructionSet = NVPTXInstrInfo;