25 UsedResources.clear();
28 for (
const std::pair<uint64_t, ResourceUsage> Resource : Desc.
Resources) {
30 if (!Resource.second.size())
32 unsigned Cycles = Resource.second.size();
33 unsigned Index = std::distance(
36 unsigned NumUnits = ProcResource.
NumUnits;
39 for (
unsigned I = 0,
E = NumUnits;
I <
E; ++
I) {
40 ResourceRef ResourceUnit = std::make_pair(Index, 1U <<
I);
41 UsedResources.emplace_back(
50 for (
unsigned I1 = 0; I1 < NumUnits; ++I1) {
54 for (
unsigned I2 = 0, E2 = SubUnit.
NumUnits; I2 < E2; ++I2) {
55 ResourceRef ResourceUnit = std::make_pair(SubUnitIdx, 1U << I2);
56 UsedResources.emplace_back(std::make_pair(
64 notifyEvent<HWInstructionIssuedEvent>(Event);
Instruction * getInstruction()
This class represents lattice values for constants.
This file implements a custom stage to generate instruction tables.
Subclass of Error for the sole purpose of identifying the success path in the type system...
const MCProcResourceDesc * getProcResource(unsigned ProcResourceIdx) const
An InstRef contains both a SourceMgr index and Instruction pair.
const InstrDesc & getDesc() const
const unsigned * SubUnitsIdxBegin
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
Error execute(InstRef &IR) override
The primary action that this stage performs on instruction IR.
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator begin()
std::pair< uint64_t, uint64_t > ResourceRef
A resource unit identifier.
SmallVector< std::pair< uint64_t, ResourceUsage >, 4 > Resources
auto find(R &&Range, const T &Val) -> decltype(adl_begin(Range))
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly...
Define a kind of processor resource that will be modeled by the scheduler.
This class represents the number of cycles per resource (fractions of cycles).
An instruction descriptor.
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator end()
Lightweight error class with error context and mandatory checking.
Statically lint checks LLVM IR