Set REQUIRES shell on the test cases for r186044
[oota-llvm.git] / lib / Target / R600 / AMDGPU.h
1 //===-- AMDGPU.h - MachineFunction passes hw codegen --------------*- 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 /// \file
9 //===----------------------------------------------------------------------===//
10
11 #ifndef AMDGPU_H
12 #define AMDGPU_H
13
14 #include "llvm/Support/TargetRegistry.h"
15 #include "llvm/Target/TargetMachine.h"
16
17 namespace llvm {
18
19 class AMDGPUInstrPrinter;
20 class AMDGPUTargetMachine;
21 class FunctionPass;
22 class MCAsmInfo;
23 class raw_ostream;
24 class Target;
25 class TargetMachine;
26
27 // R600 Passes
28 FunctionPass *createR600VectorRegMerger(TargetMachine &tm);
29 FunctionPass *createR600TextureIntrinsicsReplacer();
30 FunctionPass *createR600ExpandSpecialInstrsPass(TargetMachine &tm);
31 FunctionPass *createR600EmitClauseMarkers(TargetMachine &tm);
32 FunctionPass *createR600Packetizer(TargetMachine &tm);
33 FunctionPass *createR600ControlFlowFinalizer(TargetMachine &tm);
34 FunctionPass *createAMDGPUCFGPreparationPass(TargetMachine &tm);
35 FunctionPass *createAMDGPUCFGStructurizerPass(TargetMachine &tm);
36
37 // SI Passes
38 FunctionPass *createSIAnnotateControlFlowPass();
39 FunctionPass *createSILowerControlFlowPass(TargetMachine &tm);
40 FunctionPass *createSICodeEmitterPass(formatted_raw_ostream &OS);
41 FunctionPass *createSIInsertWaits(TargetMachine &tm);
42
43 // Passes common to R600 and SI
44 Pass *createAMDGPUStructurizeCFGPass();
45 FunctionPass *createAMDGPUConvertToISAPass(TargetMachine &tm);
46 FunctionPass *createAMDGPUIndirectAddressingPass(TargetMachine &tm);
47 FunctionPass *createAMDGPUISelDag(TargetMachine &tm);
48
49 extern Target TheAMDGPUTarget;
50
51 } // End namespace llvm
52
53 namespace ShaderType {
54   enum Type {
55     PIXEL = 0,
56     VERTEX = 1,
57     GEOMETRY = 2,
58     COMPUTE = 3
59   };
60 }
61
62 /// OpenCL uses address spaces to differentiate between
63 /// various memory regions on the hardware. On the CPU
64 /// all of the address spaces point to the same memory,
65 /// however on the GPU, each address space points to
66 /// a seperate piece of memory that is unique from other
67 /// memory locations.
68 namespace AMDGPUAS {
69 enum AddressSpaces {
70   PRIVATE_ADDRESS  = 0, ///< Address space for private memory.
71   GLOBAL_ADDRESS   = 1, ///< Address space for global memory (RAT0, VTX0).
72   CONSTANT_ADDRESS = 2, ///< Address space for constant memory
73   LOCAL_ADDRESS    = 3, ///< Address space for local memory.
74   REGION_ADDRESS   = 4, ///< Address space for region memory.
75   ADDRESS_NONE     = 5, ///< Address space for unknown memory.
76   PARAM_D_ADDRESS  = 6, ///< Address space for direct addressible parameter memory (CONST0)
77   PARAM_I_ADDRESS  = 7, ///< Address space for indirect addressible parameter memory (VTX1)
78   CONSTANT_BUFFER_0 = 8,
79   CONSTANT_BUFFER_1 = 9,
80   CONSTANT_BUFFER_2 = 10,
81   CONSTANT_BUFFER_3 = 11,
82   CONSTANT_BUFFER_4 = 12,
83   CONSTANT_BUFFER_5 = 13,
84   CONSTANT_BUFFER_6 = 14,
85   CONSTANT_BUFFER_7 = 15,
86   CONSTANT_BUFFER_8 = 16,
87   CONSTANT_BUFFER_9 = 17,
88   CONSTANT_BUFFER_10 = 18,
89   CONSTANT_BUFFER_11 = 19,
90   CONSTANT_BUFFER_12 = 20,
91   CONSTANT_BUFFER_13 = 21,
92   CONSTANT_BUFFER_14 = 22,
93   CONSTANT_BUFFER_15 = 23,
94   LAST_ADDRESS     = 24
95 };
96
97 } // namespace AMDGPUAS
98
99 #endif // AMDGPU_H