22#define DEBUG_TYPE "llvm-mca"
25 if (Denominator ==
RHS.Denominator)
26 Numerator +=
RHS.Numerator;
30 unsigned GCD = std::gcd(Denominator,
RHS.Denominator);
31 unsigned LCM = (Denominator *
RHS.Denominator) / GCD;
32 unsigned LHSNumerator = Numerator * (LCM / Denominator);
33 unsigned RHSNumerator =
RHS.Numerator * (LCM /
RHS.Denominator);
34 Numerator = LHSNumerator + RHSNumerator;
42 unsigned ProcResourceID = 0;
45 "Invalid number of elements");
52 if (
Desc.SubUnitsIdxBegin)
54 Masks[
I] = 1ULL << ProcResourceID;
61 if (!
Desc.SubUnitsIdxBegin)
63 Masks[
I] = 1ULL << ProcResourceID;
64 for (
unsigned U = 0; U <
Desc.NumUnits; ++U) {
66 Masks[
I] |= OtherMask;
78 <<
Desc.Name <<
'\n');
89 double Max =
static_cast<double>(NumMicroOps) / DispatchWidth;
101 Max = std::max(Max, Throughput);
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_t size() const
size - Get the array size.
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
This class represents the number of cycles per resource (fractions of cycles).
ReleaseAtCycles & operator+=(const ReleaseAtCycles &RHS)
Helper functions used by various pipeline components.
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.
This is an optimization pass for GlobalISel generic memory operations.
FormattedNumber format_decimal(int64_t N, unsigned Width)
format_decimal - Output N as a right justified, fixed-width decimal.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
FormattedNumber format_hex(uint64_t N, unsigned Width, bool Upper=false)
format_hex - Output N as a fixed width hexadecimal.
Description of the encoding of one expression Op.
Define a kind of processor resource that will be modeled by the scheduler.
Machine model for scheduling, bundling, and heuristics.
unsigned getNumProcResourceKinds() const
const MCProcResourceDesc * getProcResource(unsigned ProcResourceIdx) const