14#ifndef LLVM_MCA_SUPPORT_H
15#define LLVM_MCA_SUPPORT_H
53 unsigned Numerator, Denominator;
58 : Numerator(Cycles), Denominator(ResourceUnits) {}
60 operator double()
const {
61 assert(Denominator &&
"Invalid denominator (must be non-zero).");
62 return (Denominator == 1) ? Numerator : (double)Numerator / Denominator;
102 assert(Mask &&
"Processor Resource Mask cannot be zero!");
111 unsigned DispatchWidth,
112 unsigned NumMicroOps,
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
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
LLVM_ABI 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.
LLVM_ABI double computeBlockRThroughput(const MCSchedModel &SM, unsigned DispatchWidth, unsigned NumMicroOps, ArrayRef< unsigned > ProcResourceUsage)
Compute the reciprocal block throughput from a set of processor resource cycles.
LLVM_ABI 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.
LLVM_ABI 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.