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/Utils/AMDGPUBaseInfo.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 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 1132 of file AMDGPUBaseInfo.h.

Constructor & Destructor Documentation

◆ Waitcnt() [1/3]

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

Definition at line 1139 of file AMDGPUBaseInfo.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 234 of file AMDGPUBaseInfo.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 1167 of file AMDGPUBaseInfo.h.

References llvm::any_of().

◆ hasWaitDepctr()

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

Definition at line 1183 of file AMDGPUBaseInfo.h.

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

◆ hasWaitExceptStoreCnt()

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

Definition at line 1171 of file AMDGPUBaseInfo.h.

References llvm::AMDGPU::inst_counter_types(), llvm::AMDGPU::STORE_CNT, and T.

◆ hasWaitStoreCnt()

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

Definition at line 1181 of file AMDGPUBaseInfo.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 1209 of file AMDGPUBaseInfo.h.

References llvm::Wait.


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