LLVM  6.0.0svn
NVPTX.h
Go to the documentation of this file.
1 //===-- NVPTX.h - Top-level interface for NVPTX representation --*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the entry points for global functions defined in
11 // the LLVM NVPTX back-end.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_LIB_TARGET_NVPTX_NVPTX_H
16 #define LLVM_LIB_TARGET_NVPTX_NVPTX_H
17 
19 #include "llvm/ADT/StringMap.h"
20 #include "llvm/IR/Module.h"
21 #include "llvm/IR/Value.h"
24 #include <cassert>
25 #include <iosfwd>
26 
27 namespace llvm {
28 class NVPTXTargetMachine;
29 class FunctionPass;
30 class MachineFunctionPass;
31 class formatted_raw_ostream;
32 
33 namespace NVPTXCC {
34 enum CondCodes {
35  EQ,
36  NE,
37  LT,
38  LE,
39  GT,
41 };
42 }
43 
45  llvm::CodeGenOpt::Level OptLevel);
48 FunctionPass *createNVVMIntrRangePass(unsigned int SmVersion);
56 
59 
60 namespace NVPTX {
64 };
65 
66 // A field inside TSFlags needs a shift and a mask. The usage is
67 // always as follows :
68 // ((TSFlags & fieldMask) >> fieldShift)
69 // The enum keeps the mask, the shift, and all valid values of the
70 // field in one place.
74 
75  VecNOP = 0,
76  VecLoad = 1,
77  VecStore = 2,
78  VecBuild = 3,
81  VecInsert = 6,
82  VecDest = 7,
83  VecOther = 15
84 };
85 
86 enum SimpleMove {
89 };
90 enum LoadStore {
91  isLoadMask = 0x20,
93  isStoreMask = 0x40,
95 };
96 
97 namespace PTXLdStInstCode {
99  GENERIC = 0,
100  GLOBAL = 1,
101  CONSTANT = 2,
102  SHARED = 3,
103  PARAM = 4,
104  LOCAL = 5
105 };
106 enum FromType {
107  Unsigned = 0,
111 };
112 enum VecType {
113  Scalar = 1,
114  V2 = 2,
115  V4 = 4
116 };
117 }
118 
119 /// PTXCvtMode - Conversion code enumeration
120 namespace PTXCvtMode {
121 enum CvtMode {
122  NONE = 0,
127  RN,
128  RZ,
129  RM,
130  RP,
131 
132  BASE_MASK = 0x0F,
133  FTZ_FLAG = 0x10,
134  SAT_FLAG = 0x20
135 };
136 }
137 
138 /// PTXCmpMode - Comparison mode enumeration
139 namespace PTXCmpMode {
140 enum CmpMode {
141  EQ = 0,
142  NE,
143  LT,
144  LE,
145  GT,
146  GE,
147  LO,
148  LS,
149  HI,
150  HS,
158  // NAN is a MACRO
160 
161  BASE_MASK = 0xFF,
162  FTZ_FLAG = 0x100
163 };
164 }
165 }
166 } // end namespace llvm;
167 
168 // Defines symbolic names for NVPTX registers. This defines a mapping from
169 // register name to register number.
170 #define GET_REGINFO_ENUM
171 #include "NVPTXGenRegisterInfo.inc"
172 
173 // Defines symbolic names for the NVPTX instructions.
174 #define GET_INSTRINFO_ENUM
175 #include "NVPTXGenInstrInfo.inc"
176 
177 #endif
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
FunctionPass * createNVVMReflectPass()
Definition: NVVMReflect.cpp:61
ModulePass * createNVPTXAssignValidGlobalNamesPass()
SimpleMove
Definition: NVPTX.h:86
MachineFunctionPass * createNVPTXPrologEpilogPass()
ModulePass * createGenericToNVVMPass()
DrvInterface
Definition: NVPTX.h:61
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
Target & getTheNVPTXTarget64()
FunctionPass * createNVPTXImageOptimizerPass()
Target & getTheNVPTXTarget32()
MachineFunctionPass * createNVPTXReplaceImageHandlesPass()
FunctionPass class - This class is used to implement most global optimizations.
Definition: Pass.h:285
VecInstType
Definition: NVPTX.h:71
BasicBlockPass class - This class is used to implement most local optimizations.
Definition: Pass.h:319
BasicBlockPass * createNVPTXLowerAllocaPass()
Module.h This file contains the declarations for the Module class.
Target - Wrapper for Target specific information.
NVPTXTargetMachine.
MachineFunctionPass * createNVPTXPeephole()
FunctionPass * createNVPTXISelDag(NVPTXTargetMachine &TM, llvm::CodeGenOpt::Level OptLevel)
createNVPTXISelDag - This pass converts a legalized DAG into a NVPTX-specific DAG, ready for instruction scheduling.
FunctionPass * createNVVMIntrRangePass(unsigned int SmVersion)
FunctionPass * createNVPTXLowerArgsPass(const NVPTXTargetMachine *TM)
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
Definition: Pass.h:225