LLVM 24.0.0git
MCSchedule.h
Go to the documentation of this file.
1//===-- llvm/MC/MCSchedule.h - Scheduling -----------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines the classes used to describe a subtarget's machine model
10// for scheduling and other instruction cost heuristics.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_MC_MCSCHEDULE_H
15#define LLVM_MC_MCSCHEDULE_H
16
17#include "llvm/ADT/StringRef.h"
19#include "llvm/MC/MCInstrDesc.h"
22#include <cassert>
23#include <optional>
24
25namespace llvm {
26
27template <typename T> class ArrayRef;
28struct InstrItinerary;
29class MCSubtargetInfo;
30class MCInstrInfo;
31class MCInst;
32class MCInstrDesc;
33class MCTargetOptions;
35
36namespace cl {
37class OptionCategory;
38}
39
41
42/// Define a kind of processor resource that will be modeled by the scheduler.
44 const char *Name;
45 unsigned NumUnits; // Number of resource of this kind
46 unsigned SuperIdx; // Index of the resources kind that contains this kind.
47
48 // Number of resources that may be buffered.
49 //
50 // Buffered resources (BufferSize != 0) may be consumed at some indeterminate
51 // cycle after dispatch. This should be used for out-of-order cpus when
52 // instructions that use this resource can be buffered in a reservaton
53 // station.
54 //
55 // Unbuffered resources (BufferSize == 0) always consume their resource some
56 // fixed number of cycles after dispatch. If a resource is unbuffered, then
57 // the scheduler will avoid scheduling instructions with conflicting resources
58 // in the same cycle. This is for in-order cpus, or the in-order portion of
59 // an out-of-order cpus.
61
62 // If the resource has sub-units, a pointer to the first element of an array
63 // of `NumUnits` elements containing the ProcResourceIdx of the sub units.
64 // nullptr if the resource does not have sub-units.
65 const unsigned *SubUnitsIdxBegin;
66
67 bool operator==(const MCProcResourceDesc &Other) const {
68 return NumUnits == Other.NumUnits && SuperIdx == Other.SuperIdx
69 && BufferSize == Other.BufferSize;
70 }
71};
72
73/// Identify one of the processor resource kinds consumed by a
74/// particular scheduling class for the specified number of cycles.
77 /// Cycle at which the resource will be released by an instruction,
78 /// relatively to the cycle in which the instruction is issued
79 /// (assuming no stalls inbetween).
81 /// Cycle at which the resource will be aquired by an instruction,
82 /// relatively to the cycle in which the instruction is issued
83 /// (assuming no stalls inbetween).
85
87 return ProcResourceIdx == Other.ProcResourceIdx &&
88 ReleaseAtCycle == Other.ReleaseAtCycle &&
89 AcquireAtCycle == Other.AcquireAtCycle;
90 }
91};
92
93/// Specify the latency in cpu cycles for a particular scheduling class and def
94/// index. -1 indicates an invalid latency. Heuristics would typically consider
95/// an instruction with invalid latency to have infinite latency. Also identify
96/// the WriteResources of this def. When the operand expands to a sequence of
97/// writes, this ID is the last write in the sequence.
99 int16_t Cycles;
101
103 return Cycles == Other.Cycles && WriteResourceID == Other.WriteResourceID;
104 }
105};
106
107/// Specify the number of cycles allowed after instruction issue before a
108/// particular use operand reads its registers. This effectively reduces the
109/// write's latency. Here we allow negative cycles for corner cases where
110/// latency increases. This rule only applies when the entry's WriteResource
111/// matches the write's WriteResource.
112///
113/// MCReadAdvanceEntries are sorted first by operand index (UseIdx), then by
114/// WriteResourceIdx.
116 unsigned UseIdx;
119
121 return UseIdx == Other.UseIdx && WriteResourceID == Other.WriteResourceID
122 && Cycles == Other.Cycles;
123 }
124};
125
126/// Summarize the scheduling resources required for an instruction of a
127/// particular scheduling class.
128///
129/// Defined as an aggregate struct for creating tables with initializer lists.
131 static const unsigned short InvalidNumMicroOps = (1U << 13) - 1;
132 static const unsigned short VariantNumMicroOps = InvalidNumMicroOps - 1;
133
134#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
136#endif
141 uint16_t ReadAdvanceIdx; // First index into ReadAdvanceTable.
142 uint16_t WriteProcResIdx; // First index into WriteProcResTable.
143 uint16_t WriteLatencyIdx; // First index into WriteLatencyTable.
147
148 bool isValid() const {
150 }
151 bool isVariant() const {
153 }
154};
155
156// Guard against accidental growth. If either assertion fails, try to repack
157// MCSchedClassDesc to preserve the compact layout; remove the assertion if the
158// layout can no longer be kept.
159#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
160static_assert(sizeof(MCSchedClassDesc) == 16);
161#else
162static_assert(sizeof(MCSchedClassDesc) == 12);
163#endif
164
165/// Specify the cost of a register definition in terms of number of physical
166/// register allocated at register renaming stage. For example, AMD Jaguar.
167/// natively supports 128-bit data types, and operations on 256-bit registers
168/// (i.e. YMM registers) are internally split into two COPs (complex operations)
169/// and each COP updates a physical register. Basically, on Jaguar, a YMM
170/// register write effectively consumes two physical registers. That means,
171/// the cost of a YMM write in the BtVer2 model is 2.
177
178/// A register file descriptor.
179///
180/// This struct allows to describe processor register files. In particular, it
181/// helps describing the size of the register file, as well as the cost of
182/// allocating a register file at register renaming stage.
183/// FIXME: this struct can be extended to provide information about the number
184/// of read/write ports to the register file. A value of zero for field
185/// 'NumPhysRegs' means: this register file has an unbounded number of physical
186/// registers.
188 const char *Name;
191 // Index of the first cost entry in MCExtraProcessorInfo::RegisterCostTable.
193 // A value of zero means: there is no limit in the number of moves that can be
194 // eliminated every cycle.
196 // Ture if this register file only knows how to optimize register moves from
197 // known zero registers.
199};
200
201/// Provide extra details about the machine processor.
202///
203/// This is a collection of "optional" processor information that is not
204/// normally used by the LLVM machine schedulers, but that can be consumed by
205/// external tools like llvm-mca to improve the quality of the peformance
206/// analysis.
208 // Actual size of the reorder buffer in hardware.
210 // Number of instructions retired per cycle.
216 unsigned LoadQueueID;
217 unsigned StoreQueueID;
218};
219
220/// Machine model for scheduling, bundling, and heuristics.
221///
222/// The machine model directly provides basic information about the
223/// microarchitecture to the scheduler in the form of properties. It also
224/// optionally refers to scheduler resource tables and itinerary
225/// tables. Scheduler resource tables model the latency and cost for each
226/// instruction type. Itinerary tables are an independent mechanism that
227/// provides a detailed reservation table describing each cycle of instruction
228/// execution. Subtargets may define any or all of the above categories of data
229/// depending on the type of CPU and selected scheduler.
230///
231/// The machine independent properties defined here are used by the scheduler as
232/// an abstract machine model. A real micro-architecture has a number of
233/// buffers, queues, and stages. Declaring that a given machine-independent
234/// abstract property corresponds to a specific physical property across all
235/// subtargets can't be done. Nonetheless, the abstract model is
236/// useful. Futhermore, subtargets typically extend this model with processor
237/// specific resources to model any hardware features that can be exploited by
238/// scheduling heuristics and aren't sufficiently represented in the abstract.
239///
240/// The abstract pipeline is built around the notion of an "issue point". This
241/// is merely a reference point for counting machine cycles. The physical
242/// machine will have pipeline stages that delay execution. The scheduler does
243/// not model those delays because they are irrelevant as long as they are
244/// consistent. Inaccuracies arise when instructions have different execution
245/// delays relative to each other, in addition to their intrinsic latency. Those
246/// special cases can be handled by TableGen constructs such as, ReadAdvance,
247/// which reduces latency when reading data, and ReleaseAtCycles, which consumes
248/// a processor resource when writing data for a number of abstract
249/// cycles.
250///
251/// TODO: One tool currently missing is the ability to add a delay to
252/// ReleaseAtCycles. That would be easy to add and would likely cover all cases
253/// currently handled by the legacy itinerary tables.
254///
255/// A note on out-of-order execution and, more generally, instruction
256/// buffers. Part of the CPU pipeline is always in-order. The issue point, which
257/// is the point of reference for counting cycles, only makes sense as an
258/// in-order part of the pipeline. Other parts of the pipeline are sometimes
259/// falling behind and sometimes catching up. It's only interesting to model
260/// those other, decoupled parts of the pipeline if they may be predictably
261/// resource constrained in a way that the scheduler can exploit.
262///
263/// The LLVM machine model distinguishes between in-order constraints and
264/// out-of-order constraints so that the target's scheduling strategy can apply
265/// appropriate heuristics. For a well-balanced CPU pipeline, out-of-order
266/// resources would not typically be treated as a hard scheduling
267/// constraint. For example, in the GenericScheduler, a delay caused by limited
268/// out-of-order resources is not directly reflected in the number of cycles
269/// that the scheduler sees between issuing an instruction and its dependent
270/// instructions. In other words, out-of-order resources don't directly increase
271/// the latency between pairs of instructions. However, they can still be used
272/// to detect potential bottlenecks across a sequence of instructions and bias
273/// the scheduling heuristics appropriately.
275 // IssueWidth is the maximum number of instructions that may be scheduled in
276 // the same per-cycle group. This is meant to be a hard in-order constraint
277 // (a.k.a. "hazard"). In the GenericScheduler strategy, no more than
278 // IssueWidth micro-ops can ever be scheduled in a particular cycle.
279 //
280 // In practice, IssueWidth is useful to model any bottleneck between the
281 // decoder (after micro-op expansion) and the out-of-order reservation
282 // stations or the decoder bandwidth itself. If the total number of
283 // reservation stations is also a bottleneck, or if any other pipeline stage
284 // has a bandwidth limitation, then that can be naturally modeled by adding an
285 // out-of-order processor resource.
286 unsigned IssueWidth;
287 static constexpr unsigned DefaultIssueWidth = 1;
288
289 // MicroOpBufferSize is the number of micro-ops that the processor may buffer
290 // for out-of-order execution.
291 //
292 // "0" means operations that are not ready in this cycle are not considered
293 // for scheduling (they go in the pending queue). Latency is paramount. This
294 // may be more efficient if many instructions are pending in a schedule.
295 //
296 // "1" means all instructions are considered for scheduling regardless of
297 // whether they are ready in this cycle. Latency still causes issue stalls,
298 // but we balance those stalls against other heuristics.
299 //
300 // "> 1" means the processor is out-of-order. This is a machine independent
301 // estimate of highly machine specific characteristics such as the register
302 // renaming pool and reorder buffer.
304 static constexpr unsigned DefaultMicroOpBufferSize = 0;
305
306 // LoopMicroOpBufferSize is the number of micro-ops that the processor may
307 // buffer for optimized loop execution. More generally, this represents the
308 // optimal number of micro-ops in a loop body. A loop may be partially
309 // unrolled to bring the count of micro-ops in the loop body closer to this
310 // number.
312 static constexpr unsigned DefaultLoopMicroOpBufferSize = 0;
313
314 // LoadLatency is the expected latency of load instructions.
315 unsigned LoadLatency;
316 static constexpr unsigned DefaultLoadLatency = 4;
317
318 // HighLatency is the expected latency of "very high latency" operations.
319 // See TargetInstrInfo::isHighLatencyDef().
320 // By default, this is set to an arbitrarily high number of cycles
321 // likely to have some impact on scheduling heuristics.
322 unsigned HighLatency;
323 static constexpr unsigned DefaultHighLatency = 10;
324
325 // MispredictPenalty is the typical number of extra cycles the processor
326 // takes to recover from a branch misprediction.
328 static constexpr unsigned DefaultMispredictPenalty = 10;
329
330 bool PostRAScheduler; // default value is false
331
333
334 // Tells the MachineScheduler whether or not to track resource usage
335 // using intervals via ResourceSegments (see
336 // llvm/include/llvm/CodeGen/MachineScheduler.h).
338
339 unsigned ProcID;
345 // Instruction itinerary tables used by InstrItineraryData.
346 friend class InstrItineraryData;
348
350
352
353 unsigned getProcessorID() const { return ProcID; }
354
355 /// Does this machine model include instruction-level scheduling.
356 bool hasInstrSchedModel() const { return SchedClassTable; }
357
360 "No extra information available for this model");
361 return *ExtraProcessorInfo;
362 }
363
364 /// Return true if this machine model data for all instructions with a
365 /// scheduling class (itinerary class or SchedRW list).
366 bool isComplete() const { return CompleteModel; }
367
368 /// Return true if machine supports out of order execution.
369 bool isOutOfOrder() const { return MicroOpBufferSize > 1; }
370
371 unsigned getNumProcResourceKinds() const {
373 }
374
375 const MCProcResourceDesc *getProcResource(unsigned ProcResourceIdx) const {
376 assert(hasInstrSchedModel() && "No scheduling machine model");
377
378 assert(ProcResourceIdx < NumProcResourceKinds && "bad proc resource idx");
379 return &ProcResourceTable[ProcResourceIdx];
380 }
381
382 const MCSchedClassDesc *getSchedClassDesc(unsigned SchedClassIdx) const {
383 assert(hasInstrSchedModel() && "No scheduling machine model");
384
385 assert(SchedClassIdx < NumSchedClasses && "bad scheduling class idx");
386 return &SchedClassTable[SchedClassIdx];
387 }
388
389 StringRef getSchedClassName(unsigned SchedClassIdx) const {
390#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
391 return (*SchedClassNames)[SchedClassTable[SchedClassIdx].NameOff];
392#else
393 return "<unknown>";
394#endif
395 }
396
397 /// Returns the latency value for the scheduling class.
398 LLVM_ABI static int computeInstrLatency(const MCSubtargetInfo &STI,
399 const MCSchedClassDesc &SCDesc);
400
402 unsigned SClass) const;
403
405 const MCInstrInfo &MCII,
406 const MCInst &Inst) const;
407
408 template <typename MCSubtargetInfo, typename MCInstrInfo,
409 typename InstrItineraryData, typename MCInstOrMachineInstr>
411 const MCSubtargetInfo &STI, const MCInstrInfo &MCII,
412 const MCInstOrMachineInstr &Inst,
414 ResolveVariantSchedClass =
415 [](const MCSchedClassDesc *SCDesc) { return SCDesc; }) const;
416
417 // Returns the reciprocal throughput information from a MCSchedClassDesc.
418 LLVM_ABI static double
419 getReciprocalThroughput(const MCSubtargetInfo &STI,
420 const MCSchedClassDesc &SCDesc);
421
422 LLVM_ABI static double getReciprocalThroughput(unsigned SchedClass,
423 const InstrItineraryData &IID);
424
425 LLVM_ABI double getReciprocalThroughput(const MCSubtargetInfo &STI,
426 const MCInstrInfo &MCII,
427 const MCInst &Inst) const;
428
429 /// Returns the maximum forwarding delay for register reads dependent on
430 /// writes of scheduling class WriteResourceIdx.
431 LLVM_ABI static unsigned
433 unsigned WriteResourceIdx = 0);
434
435 /// Returns the bypass delay cycle for the maximum latency write cycle
436 LLVM_ABI static unsigned getBypassDelayCycles(const MCSubtargetInfo &STI,
437 const MCSchedClassDesc &SCDesc);
438
439 /// Return the buffer size of the resource. If a positive scale factor
440 /// is provided and the original buffer size is > 1, the size is scaled
441 /// accordingly.
442 LLVM_ABI int getResourceBufferSize(unsigned ProcResourceIdx,
443 float ReservationStationScaleFactor) const;
444
445 /// Returns the -sched-model-reservation-station-scale-factor value.
446 LLVM_ABI static float
447 getReservationStationScaleFactor(const MCTargetOptions &Options);
448
449 /// Returns the default initialized model.
451};
452
453// The first three are only template'd arguments so we can get away with leaving
454// them as incomplete types below. The third is a template over
455// MCInst/MachineInstr so as to avoid a layering violation here that would make
456// the MC layer depend on CodeGen.
457template <typename MCSubtargetInfo, typename MCInstrInfo,
458 typename InstrItineraryData, typename MCInstOrMachineInstr>
460 const MCSubtargetInfo &STI, const MCInstrInfo &MCII,
461 const MCInstOrMachineInstr &Inst,
463 ResolveVariantSchedClass) const {
464 static const int NoInformationAvailable = -1;
465 // Check if we have a scheduling model for instructions.
466 if (!hasInstrSchedModel()) {
467 // Try to fall back to the itinerary model if the scheduling model doesn't
468 // have a scheduling table. Note the default does not have a table.
469
470 llvm::StringRef CPU = STI.getCPU();
471
472 // Check if we have a CPU to get the itinerary information.
473 if (CPU.empty())
474 return NoInformationAvailable;
475
476 // Get itinerary information.
478 // Get the scheduling class of the requested instruction.
479 const MCInstrDesc &Desc = MCII.get(Inst.getOpcode());
480 unsigned SCClass = Desc.getSchedClass();
481
482 unsigned Latency = 0;
483
484 for (unsigned Idx = 0, IdxEnd = Inst.getNumOperands(); Idx != IdxEnd; ++Idx)
485 if (std::optional<unsigned> OperCycle = IID.getOperandCycle(SCClass, Idx))
486 Latency = std::max(Latency, *OperCycle);
487
488 return int(Latency);
489 }
490
491 unsigned SchedClass = MCII.get(Inst.getOpcode()).getSchedClass();
492 const MCSchedClassDesc *SCDesc = getSchedClassDesc(SchedClass);
493 SCDesc = ResolveVariantSchedClass(SCDesc);
494
495 if (!SCDesc || !SCDesc->isValid())
496 return NoInformationAvailable;
497
498 return MCSchedModel::computeInstrLatency(STI, *SCDesc);
499}
500
501} // namespace llvm
502
503#endif
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
#define LLVM_ABI
Definition Compiler.h:215
static LVOptions Options
Definition LVOptions.cpp:25
Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition ArrayRef.h:40
Itinerary data supplied by a subtarget to be used by a target.
std::optional< unsigned > getOperandCycle(unsigned ItinClassIndx, unsigned OperandIdx) const
Return the cycle for the given class and operand.
Instances of this class represent a single low-level machine instruction.
Definition MCInst.h:188
Describe properties that are true of each instruction in the target description file.
unsigned getSchedClass() const
Return the scheduling class for this instruction.
Interface to description of machine instruction set.
Definition MCInstrInfo.h:27
const MCInstrDesc & get(unsigned Opcode) const
Return the machine instruction descriptor that corresponds to the specified instruction opcode.
Definition MCInstrInfo.h:89
Generic base class for all target subtargets.
StringRef getCPU() const
InstrItineraryData getInstrItineraryForCPU(StringRef CPU) const
Get scheduling itinerary of a CPU.
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
A table of densely packed, null-terminated strings indexed by offset.
Definition StringTable.h:34
An efficient, type-erasing, non-owning reference to a callable.
This namespace contains all of the command line option processing machinery.
Definition LLVMContext.h:35
This is an optimization pass for GlobalISel generic memory operations.
Op::Description Desc
LLVM_ABI cl::OptionCategory MCScheduleOptions
@ Other
Any other memory.
Definition ModRef.h:68
ArrayRef(const T &OneElt) -> ArrayRef< T >
An itinerary represents the scheduling information for an instruction.
Provide extra details about the machine processor.
Definition MCSchedule.h:207
const MCRegisterFileDesc * RegisterFiles
Definition MCSchedule.h:212
const MCRegisterCostEntry * RegisterCostTable
Definition MCSchedule.h:214
Define a kind of processor resource that will be modeled by the scheduler.
Definition MCSchedule.h:43
bool operator==(const MCProcResourceDesc &Other) const
Definition MCSchedule.h:67
const unsigned * SubUnitsIdxBegin
Definition MCSchedule.h:65
Specify the number of cycles allowed after instruction issue before a particular use operand reads it...
Definition MCSchedule.h:115
bool operator==(const MCReadAdvanceEntry &Other) const
Definition MCSchedule.h:120
Specify the cost of a register definition in terms of number of physical register allocated at regist...
Definition MCSchedule.h:172
A register file descriptor.
Definition MCSchedule.h:187
uint16_t MaxMovesEliminatedPerCycle
Definition MCSchedule.h:195
Summarize the scheduling resources required for an instruction of a particular scheduling class.
Definition MCSchedule.h:130
bool isVariant() const
Definition MCSchedule.h:151
static const unsigned short InvalidNumMicroOps
Definition MCSchedule.h:131
uint16_t NumReadAdvanceEntries
Definition MCSchedule.h:144
static const unsigned short VariantNumMicroOps
Definition MCSchedule.h:132
Machine model for scheduling, bundling, and heuristics.
Definition MCSchedule.h:274
static LLVM_ABI const MCSchedModel Default
Returns the default initialized model.
Definition MCSchedule.h:450
static constexpr unsigned DefaultMicroOpBufferSize
Definition MCSchedule.h:304
bool isOutOfOrder() const
Return true if machine supports out of order execution.
Definition MCSchedule.h:369
bool hasExtraProcessorInfo() const
Definition MCSchedule.h:351
static LLVM_ABI unsigned getForwardingDelayCycles(ArrayRef< MCReadAdvanceEntry > Entries, unsigned WriteResourceIdx=0)
Returns the maximum forwarding delay for register reads dependent on writes of scheduling class Write...
const InstrItinerary * InstrItineraries
Definition MCSchedule.h:347
const MCSchedClassDesc * getSchedClassDesc(unsigned SchedClassIdx) const
Definition MCSchedule.h:382
unsigned getProcessorID() const
Definition MCSchedule.h:353
const MCExtraProcessorInfo & getExtraProcessorInfo() const
Definition MCSchedule.h:358
unsigned getNumProcResourceKinds() const
Definition MCSchedule.h:371
static constexpr unsigned DefaultIssueWidth
Definition MCSchedule.h:287
bool hasInstrSchedModel() const
Does this machine model include instruction-level scheduling.
Definition MCSchedule.h:356
unsigned LoopMicroOpBufferSize
Definition MCSchedule.h:311
static constexpr unsigned DefaultHighLatency
Definition MCSchedule.h:323
static LLVM_ABI int computeInstrLatency(const MCSubtargetInfo &STI, const MCSchedClassDesc &SCDesc)
Returns the latency value for the scheduling class.
static constexpr unsigned DefaultLoadLatency
Definition MCSchedule.h:316
friend class InstrItineraryData
Definition MCSchedule.h:346
const StringTable * SchedClassNames
Definition MCSchedule.h:344
const MCSchedClassDesc * SchedClassTable
Definition MCSchedule.h:341
const MCProcResourceDesc * ProcResourceTable
Definition MCSchedule.h:340
static LLVM_ABI float getReservationStationScaleFactor(const MCTargetOptions &Options)
Returns the -sched-model-reservation-station-scale-factor value.
unsigned MicroOpBufferSize
Definition MCSchedule.h:303
unsigned NumSchedClasses
Definition MCSchedule.h:343
const MCExtraProcessorInfo * ExtraProcessorInfo
Definition MCSchedule.h:349
const MCProcResourceDesc * getProcResource(unsigned ProcResourceIdx) const
Definition MCSchedule.h:375
static LLVM_ABI unsigned getBypassDelayCycles(const MCSubtargetInfo &STI, const MCSchedClassDesc &SCDesc)
Returns the bypass delay cycle for the maximum latency write cycle.
LLVM_ABI int getResourceBufferSize(unsigned ProcResourceIdx, float ReservationStationScaleFactor) const
Return the buffer size of the resource.
static constexpr unsigned DefaultLoopMicroOpBufferSize
Definition MCSchedule.h:312
static LLVM_ABI double getReciprocalThroughput(const MCSubtargetInfo &STI, const MCSchedClassDesc &SCDesc)
StringRef getSchedClassName(unsigned SchedClassIdx) const
Definition MCSchedule.h:389
unsigned NumProcResourceKinds
Definition MCSchedule.h:342
static constexpr unsigned DefaultMispredictPenalty
Definition MCSchedule.h:328
bool isComplete() const
Return true if this machine model data for all instructions with a scheduling class (itinerary class ...
Definition MCSchedule.h:366
unsigned MispredictPenalty
Definition MCSchedule.h:327
Specify the latency in cpu cycles for a particular scheduling class and def index.
Definition MCSchedule.h:98
bool operator==(const MCWriteLatencyEntry &Other) const
Definition MCSchedule.h:102
Identify one of the processor resource kinds consumed by a particular scheduling class for the specif...
Definition MCSchedule.h:75
bool operator==(const MCWriteProcResEntry &Other) const
Definition MCSchedule.h:86
uint16_t AcquireAtCycle
Cycle at which the resource will be aquired by an instruction, relatively to the cycle in which the i...
Definition MCSchedule.h:84
uint16_t ReleaseAtCycle
Cycle at which the resource will be released by an instruction, relatively to the cycle in which the ...
Definition MCSchedule.h:80