LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AMDGPU.h
Go to the documentation of this file.
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 
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);
30 FunctionPass *createR600ExpandSpecialInstrsPass(TargetMachine &tm);
31 FunctionPass *createR600EmitClauseMarkers(TargetMachine &tm);
32 FunctionPass *createR600ClauseMergePass(TargetMachine &tm);
33 FunctionPass *createR600Packetizer(TargetMachine &tm);
34 FunctionPass *createR600ControlFlowFinalizer(TargetMachine &tm);
35 FunctionPass *createAMDGPUCFGStructurizerPass(TargetMachine &tm);
36 
37 // SI Passes
38 FunctionPass *createSITypeRewriter();
39 FunctionPass *createSIAnnotateControlFlowPass();
40 FunctionPass *createSILowerControlFlowPass(TargetMachine &tm);
41 FunctionPass *createSIFixSGPRCopiesPass(TargetMachine &tm);
42 FunctionPass *createSICodeEmitterPass(formatted_raw_ostream &OS);
43 FunctionPass *createSIInsertWaits(TargetMachine &tm);
44 
45 // Passes common to R600 and SI
47 FunctionPass *createAMDGPUConvertToISAPass(TargetMachine &tm);
48 FunctionPass *createAMDGPUISelDag(TargetMachine &tm);
49 
50 /// \brief Creates an AMDGPU-specific Target Transformation Info pass.
51 ImmutablePass *
52 createAMDGPUTargetTransformInfoPass(const AMDGPUTargetMachine *TM);
53 
54 extern Target TheAMDGPUTarget;
55 
56 } // End namespace llvm
57 
58 namespace ShaderType {
59  enum Type {
60  PIXEL = 0,
61  VERTEX = 1,
62  GEOMETRY = 2,
63  COMPUTE = 3
64  };
65 }
66 
67 /// OpenCL uses address spaces to differentiate between
68 /// various memory regions on the hardware. On the CPU
69 /// all of the address spaces point to the same memory,
70 /// however on the GPU, each address space points to
71 /// a seperate piece of memory that is unique from other
72 /// memory locations.
73 namespace AMDGPUAS {
75  PRIVATE_ADDRESS = 0, ///< Address space for private memory.
76  GLOBAL_ADDRESS = 1, ///< Address space for global memory (RAT0, VTX0).
77  CONSTANT_ADDRESS = 2, ///< Address space for constant memory
78  LOCAL_ADDRESS = 3, ///< Address space for local memory.
79  REGION_ADDRESS = 4, ///< Address space for region memory.
80  ADDRESS_NONE = 5, ///< Address space for unknown memory.
81  PARAM_D_ADDRESS = 6, ///< Address space for direct addressible parameter memory (CONST0)
82  PARAM_I_ADDRESS = 7, ///< Address space for indirect addressible parameter memory (VTX1)
83 
84  // Do not re-order the CONSTANT_BUFFER_* enums. Several places depend on this
85  // order to be able to dynamically index a constant buffer, for example:
86  //
87  // ConstantBufferAS = CONSTANT_BUFFER_0 + CBIdx
88 
106 };
107 
108 } // namespace AMDGPUAS
109 
110 #endif // AMDGPU_H
Pass * createAMDGPUStructurizeCFGPass()
FunctionPass * createSIAnnotateControlFlowPass()
Create the annotation pass.
Address space for local memory.
Definition: AMDGPU.h:78
AddressSpaces
Definition: AMDGPU.h:74
ImmutablePass * createAMDGPUTargetTransformInfoPass(const AMDGPUTargetMachine *TM)
Creates an AMDGPU-specific Target Transformation Info pass.
FunctionPass * createAMDGPUCFGStructurizerPass(TargetMachine &tm)
Address space for unknown memory.
Definition: AMDGPU.h:80
FunctionPass * createSIInsertWaits(TargetMachine &tm)
Target TheAMDGPUTarget
The target for the AMDGPU backend.
FunctionPass * createR600TextureIntrinsicsReplacer()
Address space for global memory (RAT0, VTX0).
Definition: AMDGPU.h:76
FunctionPass * createR600ExpandSpecialInstrsPass(TargetMachine &tm)
Address space for indirect addressible parameter memory (VTX1)
Definition: AMDGPU.h:82
FunctionPass * createR600VectorRegMerger(TargetMachine &tm)
FunctionPass * createSITypeRewriter()
FunctionPass * createR600ClauseMergePass(TargetMachine &tm)
FunctionPass * createSILowerControlFlowPass(TargetMachine &tm)
Address space for direct addressible parameter memory (CONST0)
Definition: AMDGPU.h:81
FunctionPass * createR600ControlFlowFinalizer(TargetMachine &tm)
FunctionPass * createSIFixSGPRCopiesPass(TargetMachine &tm)
FunctionPass * createAMDGPUISelDag(TargetMachine &tm)
This pass converts a legalized DAG into a AMDGPU-specific.
FunctionPass * createR600EmitClauseMarkers(TargetMachine &tm)
FunctionPass * createR600Packetizer(TargetMachine &tm)
Address space for region memory.
Definition: AMDGPU.h:79
Address space for private memory.
Definition: AMDGPU.h:75
FunctionPass * createSICodeEmitterPass(formatted_raw_ostream &OS)
Address space for constant memory.
Definition: AMDGPU.h:77
FunctionPass * createAMDGPUConvertToISAPass(TargetMachine &tm)