]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.h
Merge clang 7.0.1 and several follow-up changes
[FreeBSD/FreeBSD.git] / contrib / llvm / lib / Target / AMDGPU / AMDGPUInstrInfo.h
1 //===-- AMDGPUInstrInfo.h - AMDGPU Instruction Information ------*- 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 /// \file
11 /// Contains the definition of a TargetInstrInfo class that is common
12 /// to all AMD GPUs.
13 //
14 //===----------------------------------------------------------------------===//
15
16 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUINSTRINFO_H
17 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUINSTRINFO_H
18
19 #include "AMDGPU.h"
20 #include "Utils/AMDGPUBaseInfo.h"
21 #include "llvm/CodeGen/TargetInstrInfo.h"
22
23 namespace llvm {
24
25 class GCNSubtarget;
26 class MachineFunction;
27 class MachineInstr;
28 class MachineInstrBuilder;
29
30 class AMDGPUInstrInfo {
31 public:
32   explicit AMDGPUInstrInfo(const GCNSubtarget &st);
33
34   static bool isUniformMMO(const MachineMemOperand *MMO);
35 };
36
37 namespace AMDGPU {
38
39 struct RsrcIntrinsic {
40   unsigned Intr;
41   uint8_t RsrcArg;
42   bool IsImage;
43 };
44 const RsrcIntrinsic *lookupRsrcIntrinsic(unsigned Intr);
45
46 struct D16ImageDimIntrinsic {
47   unsigned Intr;
48   unsigned D16HelperIntr;
49 };
50 const D16ImageDimIntrinsic *lookupD16ImageDimIntrinsic(unsigned Intr);
51
52 struct ImageDimIntrinsicInfo {
53   unsigned Intr;
54   unsigned BaseOpcode;
55   MIMGDim Dim;
56 };
57 const ImageDimIntrinsicInfo *getImageDimIntrinsicInfo(unsigned Intr);
58
59 } // end AMDGPU namespace
60 } // End llvm namespace
61
62 #endif