LLVM 24.0.0git
llvm::AMDGPU::BufferIntrinsicInfo Struct Reference

The argument layout of a buffer intrinsic. More...

#include "Target/AMDGPU/AMDGPUInstrInfo.h"

Public Member Functions

bool isStruct () const
bool isTyped () const
bool isFormatFromRsrc () const
 Whether the data is converted according to the format in the resource.
bool isFormat () const
 Whether the data is converted according to a format, drawn either from the resource descriptor (untyped/MUBUF _format instructions) or from an explicit argument (tbuffer/MFBUF instructions).
std::optional< unsigned > getVDataArg () const
 The stored value for stores and atomics.
std::optional< unsigned > getCmpArg () const
 The comparison value for compare-and-swap atomics.
std::optional< unsigned > getLDSPtrArg () const
 The LDS destination of loads to LDS.
std::optional< unsigned > getSizeArg () const
 The access size of loads to LDS and prefetches.
std::optional< unsigned > getVIndexArg () const
std::optional< unsigned > getVOffsetArg () const
 The voffset, which scalar loads and prefetches don't have.
std::optional< unsigned > getSOffsetArg () const
 The soffset, which is the only offset of scalar loads and prefetches.
unsigned getOffsetArg () const
 The main offset: the voffset if there is one, and the soffset otherwise.
std::optional< unsigned > getImmOffsetArg () const
 The immediate offset of loads to LDS.
std::optional< unsigned > getFormatArg () const
std::optional< unsigned > getAuxArg () const
 The auxiliary (cache policy) argument.

Public Attributes

unsigned Intr
BufferIntrinsicKind Kind
uint8_t RsrcArg
uint8_t VDataArg
uint8_t SizeArg
uint8_t VIndexArg
uint8_t VOffsetArg
uint8_t SOffsetArg
uint8_t ImmOffsetArg
uint8_t FormatArg
uint8_t AuxArg
bool IsFormatFromRsrc
 The data is converted according to the format in the resource (the *_format intrinsics).
bool IsAsync
 Loads to LDS that are asynchronous.

Static Public Attributes

static constexpr uint8_t NoArg = 255
 The position of absent arguments, (uint8_t)-1.

Detailed Description

The argument layout of a buffer intrinsic.

Argument positions are indices into the IR call's argument list, with NoArg for arguments the intrinsic doesn't have. Use getMIROperandIdx() / getSDOperandIdx() to convert them to operand indices. See AMDGPUBufferIntrinsic in IntrinsicsAMDGPU.td.

Definition at line 50 of file AMDGPUInstrInfo.h.

Member Function Documentation

◆ getAuxArg()

std::optional< unsigned > llvm::AMDGPU::BufferIntrinsicInfo::getAuxArg ( ) const
inline

The auxiliary (cache policy) argument.

Definition at line 121 of file AMDGPUInstrInfo.h.

References AuxArg.

Referenced by llvm::SITargetLowering::getTgtMemIntrinsic().

◆ getCmpArg()

std::optional< unsigned > llvm::AMDGPU::BufferIntrinsicInfo::getCmpArg ( ) const
inline

The comparison value for compare-and-swap atomics.

Definition at line 91 of file AMDGPUInstrInfo.h.

References Kind, and VDataArg.

◆ getFormatArg()

std::optional< unsigned > llvm::AMDGPU::BufferIntrinsicInfo::getFormatArg ( ) const
inline

Definition at line 119 of file AMDGPUInstrInfo.h.

References FormatArg.

Referenced by llvm::GCNTTIImpl::simplifyAMDGCNMemoryIntrinsicDemanded().

◆ getImmOffsetArg()

std::optional< unsigned > llvm::AMDGPU::BufferIntrinsicInfo::getImmOffsetArg ( ) const
inline

The immediate offset of loads to LDS.

Definition at line 116 of file AMDGPUInstrInfo.h.

References ImmOffsetArg.

Referenced by llvm::SITargetLowering::getTgtMemIntrinsic().

◆ getLDSPtrArg()

std::optional< unsigned > llvm::AMDGPU::BufferIntrinsicInfo::getLDSPtrArg ( ) const
inline

The LDS destination of loads to LDS.

Definition at line 97 of file AMDGPUInstrInfo.h.

References Kind, and RsrcArg.

Referenced by llvm::SITargetLowering::getTgtMemIntrinsic().

◆ getOffsetArg()

unsigned llvm::AMDGPU::BufferIntrinsicInfo::getOffsetArg ( ) const
inline

The main offset: the voffset if there is one, and the soffset otherwise.

Definition at line 110 of file AMDGPUInstrInfo.h.

References assert(), NoArg, SOffsetArg, and VOffsetArg.

Referenced by llvm::GCNTTIImpl::simplifyAMDGCNMemoryIntrinsicDemanded().

◆ getSizeArg()

std::optional< unsigned > llvm::AMDGPU::BufferIntrinsicInfo::getSizeArg ( ) const
inline

The access size of loads to LDS and prefetches.

Definition at line 103 of file AMDGPUInstrInfo.h.

References SizeArg.

Referenced by llvm::SITargetLowering::getTgtMemIntrinsic().

◆ getSOffsetArg()

std::optional< unsigned > llvm::AMDGPU::BufferIntrinsicInfo::getSOffsetArg ( ) const
inline

The soffset, which is the only offset of scalar loads and prefetches.

Definition at line 108 of file AMDGPUInstrInfo.h.

References SOffsetArg.

◆ getVDataArg()

std::optional< unsigned > llvm::AMDGPU::BufferIntrinsicInfo::getVDataArg ( ) const
inline

The stored value for stores and atomics.

Definition at line 89 of file AMDGPUInstrInfo.h.

References VDataArg.

◆ getVIndexArg()

std::optional< unsigned > llvm::AMDGPU::BufferIntrinsicInfo::getVIndexArg ( ) const
inline

Definition at line 104 of file AMDGPUInstrInfo.h.

References VIndexArg.

◆ getVOffsetArg()

std::optional< unsigned > llvm::AMDGPU::BufferIntrinsicInfo::getVOffsetArg ( ) const
inline

The voffset, which scalar loads and prefetches don't have.

Definition at line 106 of file AMDGPUInstrInfo.h.

References VOffsetArg.

◆ isFormat()

bool llvm::AMDGPU::BufferIntrinsicInfo::isFormat ( ) const
inline

Whether the data is converted according to a format, drawn either from the resource descriptor (untyped/MUBUF _format instructions) or from an explicit argument (tbuffer/MFBUF instructions).

Definition at line 86 of file AMDGPUInstrInfo.h.

References IsFormatFromRsrc, and isTyped().

◆ isFormatFromRsrc()

bool llvm::AMDGPU::BufferIntrinsicInfo::isFormatFromRsrc ( ) const
inline

Whether the data is converted according to the format in the resource.

Definition at line 82 of file AMDGPUInstrInfo.h.

References IsFormatFromRsrc.

Referenced by llvm::GCNTTIImpl::simplifyAMDGCNMemoryIntrinsicDemanded().

◆ isStruct()

bool llvm::AMDGPU::BufferIntrinsicInfo::isStruct ( ) const
inline

Definition at line 79 of file AMDGPUInstrInfo.h.

References NoArg, and VIndexArg.

◆ isTyped()

bool llvm::AMDGPU::BufferIntrinsicInfo::isTyped ( ) const
inline

Definition at line 80 of file AMDGPUInstrInfo.h.

References FormatArg, and NoArg.

Referenced by isFormat(), and llvm::GCNTTIImpl::simplifyAMDGCNMemoryIntrinsicDemanded().

Member Data Documentation

◆ AuxArg

uint8_t llvm::AMDGPU::BufferIntrinsicInfo::AuxArg

Definition at line 64 of file AMDGPUInstrInfo.h.

Referenced by getAuxArg().

◆ FormatArg

uint8_t llvm::AMDGPU::BufferIntrinsicInfo::FormatArg

Definition at line 63 of file AMDGPUInstrInfo.h.

Referenced by getFormatArg(), and isTyped().

◆ ImmOffsetArg

uint8_t llvm::AMDGPU::BufferIntrinsicInfo::ImmOffsetArg

Definition at line 62 of file AMDGPUInstrInfo.h.

Referenced by getImmOffsetArg().

◆ Intr

unsigned llvm::AMDGPU::BufferIntrinsicInfo::Intr

Definition at line 54 of file AMDGPUInstrInfo.h.

◆ IsAsync

bool llvm::AMDGPU::BufferIntrinsicInfo::IsAsync

Loads to LDS that are asynchronous.

Definition at line 69 of file AMDGPUInstrInfo.h.

◆ IsFormatFromRsrc

bool llvm::AMDGPU::BufferIntrinsicInfo::IsFormatFromRsrc

The data is converted according to the format in the resource (the *_format intrinsics).

Definition at line 67 of file AMDGPUInstrInfo.h.

Referenced by isFormat(), and isFormatFromRsrc().

◆ Kind

BufferIntrinsicKind llvm::AMDGPU::BufferIntrinsicInfo::Kind

◆ NoArg

uint8_t llvm::AMDGPU::BufferIntrinsicInfo::NoArg = 255
staticconstexpr

The position of absent arguments, (uint8_t)-1.

Definition at line 52 of file AMDGPUInstrInfo.h.

Referenced by getOffsetArg(), isStruct(), and isTyped().

◆ RsrcArg

uint8_t llvm::AMDGPU::BufferIntrinsicInfo::RsrcArg

Definition at line 56 of file AMDGPUInstrInfo.h.

Referenced by getLDSPtrArg().

◆ SizeArg

uint8_t llvm::AMDGPU::BufferIntrinsicInfo::SizeArg

Definition at line 58 of file AMDGPUInstrInfo.h.

Referenced by getSizeArg().

◆ SOffsetArg

uint8_t llvm::AMDGPU::BufferIntrinsicInfo::SOffsetArg

Definition at line 61 of file AMDGPUInstrInfo.h.

Referenced by getOffsetArg(), and getSOffsetArg().

◆ VDataArg

uint8_t llvm::AMDGPU::BufferIntrinsicInfo::VDataArg

Definition at line 57 of file AMDGPUInstrInfo.h.

Referenced by getCmpArg(), and getVDataArg().

◆ VIndexArg

uint8_t llvm::AMDGPU::BufferIntrinsicInfo::VIndexArg

Definition at line 59 of file AMDGPUInstrInfo.h.

Referenced by getVIndexArg(), and isStruct().

◆ VOffsetArg

uint8_t llvm::AMDGPU::BufferIntrinsicInfo::VOffsetArg

Definition at line 60 of file AMDGPUInstrInfo.h.

Referenced by getOffsetArg(), and getVOffsetArg().


The documentation for this struct was generated from the following file: