LLVM 23.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
23class MachineInstr;
24
25namespace AMDGPU {
26
27bool isUniformMMO(const MachineMemOperand *MMO);
28
29/// Return the intrinsic ID for opcodes with the G_AMDGPU_INTRIN_ prefix.
30///
31/// These opcodes have an Intrinsic::ID operand similar to a GIntrinsic. But
32/// they are not actual instances of GIntrinsics, so we cannot use
33/// GIntrinsic::getIntrinsicID() on them.
34Intrinsic::ID getIntrinsicID(const MachineInstr &I);
35
37 unsigned Intr;
39 bool IsImage;
40};
41const RsrcIntrinsic *lookupRsrcIntrinsic(unsigned Intr);
42
44 unsigned Intr;
45 unsigned D16HelperIntr;
46};
48
85
87getImageDimIntrinsicByBaseOpcode(unsigned BaseOpcode, unsigned Dim);
88
89} // end AMDGPU namespace
90} // End llvm namespace
91
92#endif
#define I(x, y, z)
Definition MD5.cpp:57
Representation of each machine instruction.
A description of a memory reference used in the backend.
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 Types.h:26