LLVM  9.0.0svn
AMDGPUInstrInfo.h
Go to the documentation of this file.
1 //===-- AMDGPUInstrInfo.h - AMDGPU Instruction Information ------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 /// \file
10 /// Contains the definition of a TargetInstrInfo class that is common
11 /// to all AMD GPUs.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUINSTRINFO_H
16 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUINSTRINFO_H
17 
18 #include "AMDGPU.h"
19 #include "Utils/AMDGPUBaseInfo.h"
21 
22 namespace llvm {
23 
24 class GCNSubtarget;
25 class MachineFunction;
26 class MachineInstr;
27 class MachineInstrBuilder;
28 
30 public:
31  explicit AMDGPUInstrInfo(const GCNSubtarget &st);
32 
33  static bool isUniformMMO(const MachineMemOperand *MMO);
34 };
35 
36 namespace AMDGPU {
37 
38 struct RsrcIntrinsic {
39  unsigned Intr;
40  uint8_t RsrcArg;
41  bool IsImage;
42 };
43 const RsrcIntrinsic *lookupRsrcIntrinsic(unsigned Intr);
44 
46  unsigned Intr;
47  unsigned D16HelperIntr;
48 };
50 
52  unsigned Intr;
53  unsigned BaseOpcode;
54  MIMGDim Dim;
55 };
57 
58 } // end AMDGPU namespace
59 } // End llvm namespace
60 
61 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:23
A description of a memory reference used in the backend.
unsigned Intr
const ImageDimIntrinsicInfo * getImageDimIntrinsicInfo(unsigned Intr)
const RsrcIntrinsic * lookupRsrcIntrinsic(unsigned Intr)
static bool isUniformMMO(const MachineMemOperand *MMO)
const D16ImageDimIntrinsic * lookupD16ImageDimIntrinsic(unsigned Intr)
AMDGPUInstrInfo(const GCNSubtarget &st)