9#ifndef LLVM_LIB_TARGET_AMDGPU_UTILS_AMDGPUHWEVENTS_H
10#define LLVM_LIB_TARGET_AMDGPU_UTILS_AMDGPUHWEVENTS_H
56#define AMDGPU_HW_EVENT(X, V) X = (1 << V),
57#define AMDGPU_LAST_HW_EVENT(X) HWEVENT_LAST_EVENT = X,
58#include "AMDGPUHWEvents.def"
60 ALL = ((HWEVENT_LAST_EVENT << 1) - 1)
71 HWEvents::value_type Cur = 0;
78 return Cur ==
Other.Cur;
95 assert((V &
ALL) == V &&
"Bits set out of bounds!");
99 constexpr bool any()
const {
return Data != 0; }
100 constexpr bool none()
const {
return Data == 0; }
103 explicit constexpr operator bool()
const {
return any(); }
106 return (~Data &
Other.Data) == 0;
113 return Data |
Other.Data;
116 return Data &
Other.Data;
119 return Data ^
Other.Data;
123 return Data &
~Other.Data;
160#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
184raw_ostream &
operator<<(raw_ostream &OS, AMDGPU::HWEvents
E);
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
const HexagonInstrInfo * TII
AMDGPU::HWEvents HWEvents
This file implements the C++20 <bit> header.
Iterates over the set bits of an HWEvent.
bool operator==(const const_iterator &Other) const
const_iterator(HWEvents H)
HWEvents operator*() const
const_iterator & operator++()
constexpr bool operator==(HWEvents Other) const
constexpr HWEvents operator-=(HWEvents Other)
constexpr HWEvents()=default
constexpr HWEvents & operator&=(value_type Other)
constexpr unsigned size() const
const_iterator begin() const
constexpr HWEvents & operator&=(HWEvents Other)
LLVM_DUMP_METHOD void dump() const
constexpr value_type value() const
constexpr HWEvents operator-(HWEvents Other) const
constexpr HWEvents & operator^=(HWEvents Other)
constexpr bool operator!=(HWEvents Other) const
constexpr HWEvents & operator|=(HWEvents Other)
constexpr HWEvents operator|(HWEvents Other) const
const_iterator end() const
constexpr bool contains(HWEvents Other) const
constexpr bool any() const
constexpr bool none() const
constexpr HWEvents(value_type V)
constexpr HWEvents operator^(HWEvents Other) const
constexpr HWEvents operator&(value_type Other) const
Overload both bitwise AND operators w/ the value_type to avoid an implicit conversion to HWEvent in t...
constexpr HWEvents operator&(HWEvents Other) const
constexpr HWEvents operator~() const
Representation of each machine instruction.
CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of ...
This class implements an extremely fast bulk output stream that can only output to a stream.
HWEvents getSimplifiedVMEMEventsFor(const MachineInstr &Inst, const SIInstrInfo &TII)
HWEvents getEventsFor(const MachineInstr &Inst, const GCNSubtarget &ST, bool IsExpertMode)
This is an optimization pass for GlobalISel generic memory operations.
constexpr int popcount(T Value) noexcept
Count the number of set bits in a value.
int countr_zero(T Val)
Count number of 0's from the least significant bit to the most stopping at the first 1.
constexpr T maskTrailingZeros(unsigned N)
Create a bitmask with the N right-most bits set to 0, and all other bits set to 1.
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)