24 UsedResources.
clear();
27 for (
const std::pair<uint64_t, ResourceUsage> &Resource :
30 if (!Resource.second.size())
32 unsigned Cycles = Resource.second.size();
33 unsigned Index = std::distance(Masks.
begin(),
find(Masks, Resource.first));
35 unsigned NumUnits = ProcResource.
NumUnits;
38 for (
unsigned I = 0,
E = NumUnits;
I <
E; ++
I) {
49 for (
unsigned I1 = 0; I1 < NumUnits; ++I1) {
53 for (
unsigned I2 = 0, E2 = SubUnit.
NumUnits; I2 < E2; ++I2) {
54 ResourceRef ResourceUnit = std::make_pair(SubUnitIdx, 1U << I2);
64 notifyEvent<HWInstructionIssuedEvent>(Event);
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file implements a custom stage to generate instruction tables.
Legalize the Machine IR a function s Machine IR
Subclass of Error for the sole purpose of identifying the success path in the type system.
Lightweight error class with error context and mandatory checking.
reference emplace_back(ArgTypes &&... Args)
An InstRef contains both a SourceMgr index and Instruction pair.
Error execute(InstRef &IR) override
The primary action that this stage performs on instruction IR.
This class represents the number of cycles per resource (fractions of cycles).
std::pair< uint64_t, uint64_t > ResourceRef
A resource unit identifier.
This is an optimization pass for GlobalISel generic memory operations.
auto find(R &&Range, const T &Val)
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly.
Description of the encoding of one expression Op.
Define a kind of processor resource that will be modeled by the scheduler.
const unsigned * SubUnitsIdxBegin
const MCProcResourceDesc * getProcResource(unsigned ProcResourceIdx) const
An instruction descriptor.