1 //===-- NVPTX.h - Top-level interface for NVPTX representation --*- C++ -*-===//
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 // This file contains the entry points for global functions defined in
10 // the LLVM NVPTX back-end.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_NVPTX_NVPTX_H
15 #define LLVM_LIB_TARGET_NVPTX_NVPTX_H
17 #include "llvm/Pass.h"
18 #include "llvm/Support/CodeGen.h"
21 class NVPTXTargetMachine
;
23 class MachineFunctionPass
;
24 class formatted_raw_ostream
;
37 FunctionPass
*createNVPTXISelDag(NVPTXTargetMachine
&TM
,
38 llvm::CodeGenOpt::Level OptLevel
);
39 ModulePass
*createNVPTXAssignValidGlobalNamesPass();
40 ModulePass
*createGenericToNVVMPass();
41 FunctionPass
*createNVVMIntrRangePass(unsigned int SmVersion
);
42 FunctionPass
*createNVVMReflectPass(unsigned int SmVersion
);
43 MachineFunctionPass
*createNVPTXPrologEpilogPass();
44 MachineFunctionPass
*createNVPTXReplaceImageHandlesPass();
45 FunctionPass
*createNVPTXImageOptimizerPass();
46 FunctionPass
*createNVPTXLowerArgsPass(const NVPTXTargetMachine
*TM
);
47 FunctionPass
*createNVPTXLowerAllocaPass();
48 MachineFunctionPass
*createNVPTXPeephole();
49 MachineFunctionPass
*createNVPTXProxyRegErasurePass();
57 // A field inside TSFlags needs a shift and a mask. The usage is
58 // always as follows :
59 // ((TSFlags & fieldMask) >> fieldShift)
60 // The enum keeps the mask, the shift, and all valid values of the
61 // field in one place.
64 VecInstTypeMask
= 0xF,
78 SimpleMoveMask
= 0x10,
88 namespace PTXLdStInstCode
{
110 /// PTXCvtMode - Conversion code enumeration
111 namespace PTXCvtMode
{
129 /// PTXCmpMode - Comparison mode enumeration
130 namespace PTXCmpMode
{
157 } // end namespace llvm;
159 // Defines symbolic names for NVPTX registers. This defines a mapping from
160 // register name to register number.
161 #define GET_REGINFO_ENUM
162 #include "NVPTXGenRegisterInfo.inc"
164 // Defines symbolic names for the NVPTX instructions.
165 #define GET_INSTRINFO_ENUM
166 #include "NVPTXGenInstrInfo.inc"