9#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUWAITCNTUTILS_H
10#define LLVM_LIB_TARGET_AMDGPU_AMDGPUWAITCNTUTILS_H
61 std::array<unsigned, NUM_INST_CNTS> Cnt;
69 Waitcnt(
unsigned VmCnt,
unsigned ExpCnt,
unsigned LgkmCnt,
unsigned VsCnt)
78 Waitcnt(
unsigned LoadCnt,
unsigned ExpCnt,
unsigned DsCnt,
unsigned StoreCnt,
79 unsigned SampleCnt,
unsigned BvhCnt,
unsigned KmCnt,
unsigned XCnt,
80 unsigned AsyncCnt,
unsigned VaVdst,
unsigned VmVsrc)
96 return any_of(Cnt, [](
unsigned Val) {
return Val != ~0u; });
133#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
Provides some synthesis utilities to produce sequences of values.
Represents the counter values to wait for in an s_waitcnt instruction.
void print(raw_ostream &OS) const
bool hasWaitDepctr() const
LLVM_DUMP_METHOD void dump() const
bool hasWaitExceptStoreCnt() const
Waitcnt(unsigned LoadCnt, unsigned ExpCnt, unsigned DsCnt, unsigned StoreCnt, unsigned SampleCnt, unsigned BvhCnt, unsigned KmCnt, unsigned XCnt, unsigned AsyncCnt, unsigned VaVdst, unsigned VmVsrc)
bool hasWaitStoreCnt() const
Waitcnt(unsigned VmCnt, unsigned ExpCnt, unsigned LgkmCnt, unsigned VsCnt)
Waitcnt combined(const Waitcnt &Other) const
unsigned get(InstCounterType T) const
friend raw_ostream & operator<<(raw_ostream &OS, const AMDGPU::Waitcnt &Wait)
void set(InstCounterType T, unsigned Val)
A helper class to return the specified delimiter string after the first invocation of operator String...
A wrapper around a string literal that serves as a proxy for constructing global tables of StringRefs...
This class implements an extremely fast bulk output stream that can only output to a stream.
iota_range< InstCounterType > inst_counter_types(InstCounterType MaxCounter)
unsigned encodeLoadcntDscnt(const IsaVersion &Version, const Waitcnt &Decoded)
Waitcnt decodeWaitcnt(const IsaVersion &Version, unsigned Encoded)
unsigned encodeWaitcnt(const IsaVersion &Version, const Waitcnt &Decoded)
Waitcnt decodeStorecntDscnt(const IsaVersion &Version, unsigned StorecntDscnt)
StringLiteral getInstCounterName(InstCounterType T)
Waitcnt decodeLoadcntDscnt(const IsaVersion &Version, unsigned LoadcntDscnt)
unsigned encodeStorecntDscnt(const IsaVersion &Version, const Waitcnt &Decoded)
This is an optimization pass for GlobalISel generic memory operations.
void fill(R &&Range, T &&Value)
Provide wrappers to std::fill which take ranges instead of having to pass begin/end explicitly.
bool any_of(R &&range, UnaryPredicate P)
Provide wrappers to std::any_of which take ranges instead of having to pass begin/end explicitly.
FunctionAddr VTableAddr uintptr_t uintptr_t Version
static constexpr bool is_iterable