14 #ifndef LLVM_MCA_SUPPORT_H 15 #define LLVM_MCA_SUPPORT_H 33 : Message(
std::move(M)), Inst(MCI) {}
51 unsigned Numerator, Denominator;
56 : Numerator(Cycles), Denominator(ResourceUnits) {}
58 operator double()
const {
59 assert(Denominator &&
"Invalid denominator (must be non-zero).");
60 return (Denominator == 1) ? Numerator : (double)Numerator / Denominator;
100 assert(Mask &&
"Processor Resource Mask cannot be zero!");
109 unsigned NumMicroOps,
114 #endif // LLVM_MCA_SUPPORT_H std::string & operator+=(std::string &buffer, StringRef string)
unsigned getNumerator() const
This class represents lattice values for constants.
std::error_code convertToErrorCode() const override
Convert this error to a std::error_code.
InstructionError(std::string M, const T &MCI)
unsigned getDenominator() const
double computeBlockRThroughput(const MCSchedModel &SM, unsigned DispatchWidth, unsigned NumMicroOps, ArrayRef< unsigned > ProcResourceUsage)
Compute the reciprocal block throughput from a set of processor resource cycles.
void computeProcResourceMasks(const MCSchedModel &SM, MutableArrayRef< uint64_t > Masks)
Populates vector Masks with processor resource masks.
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
void log(raw_ostream &OS) const override
Print an error message to an output stream.
unsigned countLeadingZeros(T Val, ZeroBehavior ZB=ZB_Width)
Count number of 0's from the most significant bit to the least stopping at the first 1...
This class represents the number of cycles per resource (fractions of cycles).
Base class for user error types.
ResourceCycles(unsigned Cycles, unsigned ResourceUnits=1)
unsigned getResourceStateIndex(uint64_t Mask)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
std::underlying_type< E >::type Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
This class implements an extremely fast bulk output stream that can only output to a stream...
Machine model for scheduling, bundling, and heuristics.
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...