Nick Lewycky | f7a3c50 | 2010-09-07 18:14:24 +0000 | [diff] [blame] | 1 | //===-- PTX.h - Top-level interface for PTX 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 the LLVM |
| 11 | // PTX back-end. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #ifndef PTX_H |
| 16 | #define PTX_H |
| 17 | |
Evan Cheng | c60f9b7 | 2011-07-14 20:59:42 +0000 | [diff] [blame] | 18 | #include "MCTargetDesc/PTXMCTargetDesc.h" |
Nick Lewycky | f7a3c50 | 2010-09-07 18:14:24 +0000 | [diff] [blame] | 19 | #include "llvm/Target/TargetMachine.h" |
| 20 | |
| 21 | namespace llvm { |
Justin Holewinski | d8e4ed2 | 2011-09-28 14:32:04 +0000 | [diff] [blame^] | 22 | class MachineInstr; |
| 23 | class MCInst; |
| 24 | class PTXAsmPrinter; |
Eric Christopher | 50880d0 | 2010-09-18 18:52:28 +0000 | [diff] [blame] | 25 | class PTXTargetMachine; |
| 26 | class FunctionPass; |
| 27 | |
Che-Liang Chiou | d34f19f | 2010-12-30 10:41:27 +0000 | [diff] [blame] | 28 | namespace PTX { |
| 29 | enum StateSpace { |
| 30 | GLOBAL = 0, // default to global state space |
| 31 | CONSTANT = 1, |
| 32 | LOCAL = 2, |
| 33 | PARAMETER = 3, |
| 34 | SHARED = 4 |
| 35 | }; |
Che-Liang Chiou | c2ec0f9 | 2011-03-13 17:26:00 +0000 | [diff] [blame] | 36 | |
| 37 | enum Predicate { |
Che-Liang Chiou | f78847e | 2011-03-14 11:26:01 +0000 | [diff] [blame] | 38 | PRED_NORMAL = 0, |
Justin Holewinski | d8e4ed2 | 2011-09-28 14:32:04 +0000 | [diff] [blame^] | 39 | PRED_NEGATE = 1, |
| 40 | PRED_NONE = 2 |
Che-Liang Chiou | c2ec0f9 | 2011-03-13 17:26:00 +0000 | [diff] [blame] | 41 | }; |
Che-Liang Chiou | d34f19f | 2010-12-30 10:41:27 +0000 | [diff] [blame] | 42 | } // namespace PTX |
| 43 | |
Eric Christopher | 50880d0 | 2010-09-18 18:52:28 +0000 | [diff] [blame] | 44 | FunctionPass *createPTXISelDag(PTXTargetMachine &TM, |
| 45 | CodeGenOpt::Level OptLevel); |
| 46 | |
Che-Liang Chiou | 3278c42 | 2010-11-08 03:00:52 +0000 | [diff] [blame] | 47 | FunctionPass *createPTXMFInfoExtract(PTXTargetMachine &TM, |
| 48 | CodeGenOpt::Level OptLevel); |
| 49 | |
Justin Holewinski | 247ee00 | 2011-09-22 16:45:33 +0000 | [diff] [blame] | 50 | FunctionPass *createPTXRegisterAllocator(); |
| 51 | |
Justin Holewinski | d8e4ed2 | 2011-09-28 14:32:04 +0000 | [diff] [blame^] | 52 | void LowerPTXMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI, |
| 53 | PTXAsmPrinter &AP); |
| 54 | |
Nick Lewycky | f7a3c50 | 2010-09-07 18:14:24 +0000 | [diff] [blame] | 55 | } // namespace llvm; |
| 56 | |
Nick Lewycky | f7a3c50 | 2010-09-07 18:14:24 +0000 | [diff] [blame] | 57 | #endif // PTX_H |