blob: cbcfa5144b10110181c7d90836a2d1fc4b5226a9 [file] [log] [blame]
Nick Lewyckyf7a3c502010-09-07 18:14:24 +00001//===-- 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 Chengc60f9b72011-07-14 20:59:42 +000018#include "MCTargetDesc/PTXMCTargetDesc.h"
Nick Lewyckyf7a3c502010-09-07 18:14:24 +000019#include "llvm/Target/TargetMachine.h"
20
21namespace llvm {
Justin Holewinskid8e4ed22011-09-28 14:32:04 +000022 class MachineInstr;
23 class MCInst;
24 class PTXAsmPrinter;
Eric Christopher50880d02010-09-18 18:52:28 +000025 class PTXTargetMachine;
26 class FunctionPass;
27
Che-Liang Chioud34f19f2010-12-30 10:41:27 +000028 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 Chiouc2ec0f92011-03-13 17:26:00 +000036
37 enum Predicate {
Che-Liang Chiouf78847e2011-03-14 11:26:01 +000038 PRED_NORMAL = 0,
Justin Holewinskid8e4ed22011-09-28 14:32:04 +000039 PRED_NEGATE = 1,
40 PRED_NONE = 2
Che-Liang Chiouc2ec0f92011-03-13 17:26:00 +000041 };
Che-Liang Chioud34f19f2010-12-30 10:41:27 +000042 } // namespace PTX
43
Eric Christopher50880d02010-09-18 18:52:28 +000044 FunctionPass *createPTXISelDag(PTXTargetMachine &TM,
45 CodeGenOpt::Level OptLevel);
46
Che-Liang Chiou3278c422010-11-08 03:00:52 +000047 FunctionPass *createPTXMFInfoExtract(PTXTargetMachine &TM,
48 CodeGenOpt::Level OptLevel);
49
Justin Holewinski247ee002011-09-22 16:45:33 +000050 FunctionPass *createPTXRegisterAllocator();
51
Justin Holewinskid8e4ed22011-09-28 14:32:04 +000052 void LowerPTXMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI,
53 PTXAsmPrinter &AP);
54
Nick Lewyckyf7a3c502010-09-07 18:14:24 +000055} // namespace llvm;
56
Nick Lewyckyf7a3c502010-09-07 18:14:24 +000057#endif // PTX_H