LLVM 23.0.0git
llvm::AMDGPU::Waitcnt Class Reference

Represents the counter values to wait for in an s_waitcnt instruction. More...

#include "Target/AMDGPU/AMDGPUWaitcntUtils.h"

Public Member Functions

unsigned get (InstCounterType T) const
void set (InstCounterType T, unsigned Val)
 Waitcnt ()
 Waitcnt (unsigned VmCnt, unsigned ExpCnt, unsigned LgkmCnt, unsigned VsCnt)
 Waitcnt (unsigned LoadCnt, unsigned ExpCnt, unsigned DsCnt, unsigned StoreCnt, unsigned SampleCnt, unsigned BvhCnt, unsigned KmCnt, unsigned XCnt, unsigned AsyncCnt, unsigned TensorCnt, unsigned VaVdst, unsigned VmVsrc)
bool hasWait () const
bool hasWaitExceptStoreCnt () const
bool hasWaitStoreCnt () const
bool hasWaitDepctr () const
Waitcnt combined (const Waitcnt &Other) const
void print (raw_ostream &OS) const
LLVM_DUMP_METHOD void dump () const

Friends

raw_ostreamoperator<< (raw_ostream &OS, const AMDGPU::Waitcnt &Wait)

Detailed Description

Represents the counter values to wait for in an s_waitcnt instruction.

Large values (including the maximum possible integer) can be used to represent "don't care" waits.

Definition at line 61 of file AMDGPUWaitcntUtils.h.

Constructor & Destructor Documentation

◆ Waitcnt() [1/3]

llvm::AMDGPU::Waitcnt::Waitcnt ( )
inline

Definition at line 68 of file AMDGPUWaitcntUtils.h.

References llvm::fill().

Referenced by combined(), Waitcnt(), and Waitcnt().

◆ Waitcnt() [2/3]

llvm::AMDGPU::Waitcnt::Waitcnt ( unsigned VmCnt,
unsigned ExpCnt,
unsigned LgkmCnt,
unsigned VsCnt )
inline

◆ Waitcnt() [3/3]

Member Function Documentation

◆ combined()

Waitcnt llvm::AMDGPU::Waitcnt::combined ( const Waitcnt & Other) const
inline

◆ dump()

void llvm::AMDGPU::Waitcnt::dump ( ) const

Definition at line 51 of file AMDGPUWaitcntUtils.cpp.

References llvm::dbgs().

◆ get()

unsigned llvm::AMDGPU::Waitcnt::get ( InstCounterType T) const
inline

◆ hasWait()

bool llvm::AMDGPU::Waitcnt::hasWait ( ) const
inline

Definition at line 98 of file AMDGPUWaitcntUtils.h.

References llvm::any_of().

◆ hasWaitDepctr()

bool llvm::AMDGPU::Waitcnt::hasWaitDepctr ( ) const
inline

Definition at line 114 of file AMDGPUWaitcntUtils.h.

References llvm::AMDGPU::VA_VDST, and llvm::AMDGPU::VM_VSRC.

◆ hasWaitExceptStoreCnt()

bool llvm::AMDGPU::Waitcnt::hasWaitExceptStoreCnt ( ) const
inline

◆ hasWaitStoreCnt()

bool llvm::AMDGPU::Waitcnt::hasWaitStoreCnt ( ) const
inline

Definition at line 112 of file AMDGPUWaitcntUtils.h.

References llvm::AMDGPU::STORE_CNT.

◆ print()

void llvm::AMDGPU::Waitcnt::print ( raw_ostream & OS) const
inline

◆ set()

void llvm::AMDGPU::Waitcnt::set ( InstCounterType T,
unsigned Val )
inline

◆ operator<<

raw_ostream & operator<< ( raw_ostream & OS,
const AMDGPU::Waitcnt & Wait )
friend

Definition at line 140 of file AMDGPUWaitcntUtils.h.

References llvm::Wait.


The documentation for this class was generated from the following files: