LLVM 22.0.0git
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
19
20namespace llvm {
21
22class GCNSubtarget;
23class MachineMemOperand;
24class MachineInstr;
25
26namespace AMDGPU {
27
28bool isUniformMMO(const MachineMemOperand *MMO);
29
30/// Return the intrinsic ID for opcodes with the G_AMDGPU_INTRIN_ prefix.
31///
32/// These opcodes have an Intrinsic::ID operand similar to a GIntrinsic. But
33/// they are not actual instances of GIntrinsics, so we cannot use
34/// GIntrinsic::getIntrinsicID() on them.
35Intrinsic::ID getIntrinsicID(const MachineInstr &I);
36
38 unsigned Intr;
40 bool IsImage;
41};
43
45 unsigned Intr;
46 unsigned D16HelperIntr;
47};
49
51 unsigned Intr;
52 unsigned BaseOpcode;
53 MIMGDim Dim;
54
63
79
83};
85
87getImageDimIntrinsicByBaseOpcode(unsigned BaseOpcode, unsigned Dim);
88
89} // end AMDGPU namespace
90} // End llvm namespace
91
92#endif
unsigned Intr
#define I(x, y, z)
Definition: MD5.cpp:58
const ImageDimIntrinsicInfo * getImageDimIntrinsicByBaseOpcode(unsigned BaseOpcode, unsigned Dim)
const D16ImageDimIntrinsic * lookupD16ImageDimIntrinsic(unsigned Intr)
bool isUniformMMO(const MachineMemOperand *MMO)
Intrinsic::ID getIntrinsicID(const MachineInstr &I)
Return the intrinsic ID for opcodes with the G_AMDGPU_INTRIN_ prefix.
const ImageDimIntrinsicInfo * getImageDimIntrinsicInfo(unsigned Intr)
const RsrcIntrinsic * lookupRsrcIntrinsic(unsigned Intr)
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18