14#ifndef LLVM_MCA_SUPPORT_H
15#define LLVM_MCA_SUPPORT_H
52 unsigned Numerator, Denominator;
57 : Numerator(Cycles), Denominator(ResourceUnits) {}
59 operator double()
const {
60 assert(Denominator &&
"Invalid denominator (must be non-zero).");
61 return (Denominator == 1) ? Numerator : (double)Numerator / Denominator;
101 assert(Mask &&
"Processor Resource Mask cannot be zero!");
110 unsigned NumMicroOps,
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallVector class.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Base class for user error types.
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
std::error_code convertToErrorCode() const override
Convert this error to a std::error_code.
void log(raw_ostream &OS) const override
Print an error message to an output stream.
InstructionError(std::string M, const T &MCI)
This class represents the number of cycles per resource (fractions of cycles).
unsigned getNumerator() const
ReleaseAtCycles & operator+=(const ReleaseAtCycles &RHS)
unsigned getDenominator() const
ReleaseAtCycles(unsigned Cycles, unsigned ResourceUnits=1)
This class implements an extremely fast bulk output stream that can only output to a stream.
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.
unsigned getResourceStateIndex(uint64_t Mask)
This is an optimization pass for GlobalISel generic memory operations.
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
unsigned Log2_64(uint64_t Value)
Return the floor log base 2 of the specified value, -1 if the value is zero.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
Machine model for scheduling, bundling, and heuristics.