OSDN Git Service

radeonsi: initial WIP SI code
[android-x86/external-mesa.git] / src / gallium / drivers / radeon / AMDGPUUtil.h
1 //===-- AMDGPUUtil.h - TODO: Add brief description -------===//
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 // TODO: Add full description
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef AMDGPU_UTIL_H
15 #define AMDGPU_UTIL_H
16
17 #include "AMDGPURegisterInfo.h"
18 #include "llvm/Support/DataTypes.h"
19
20 namespace llvm {
21
22 class AMDILMachineFunctionInfo;
23
24 class TargetMachine;
25 class TargetRegisterInfo;
26
27 bool isPlaceHolderOpcode(unsigned opcode);
28
29 bool isTransOp(unsigned opcode);
30 bool isTexOp(unsigned opcode);
31 bool isReductionOp(unsigned opcode);
32 bool isFCOp(unsigned opcode);
33
34 /* XXX: Move these to AMDGPUInstrInfo.h */
35 #define MO_FLAG_CLAMP (1 << 0)
36 #define MO_FLAG_NEG   (1 << 1)
37 #define MO_FLAG_ABS   (1 << 2)
38 #define MO_FLAG_MASK  (1 << 3)
39
40 } /* End namespace llvm */
41
42 namespace AMDGPU {
43
44 void utilAddLiveIn(llvm::MachineFunction * MF, llvm::MachineRegisterInfo & MRI,
45     const struct llvm::TargetInstrInfo * TII, unsigned physReg, unsigned virtReg);
46
47 } // End namespace AMDGPU
48
49 #endif /* AMDGPU_UTIL_H */