1 //===- CodeGenSchedule.h - Scheduling Machine Models ------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines structures to encapsulate the machine model as described in
11 // the target description.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_UTILS_TABLEGEN_CODEGENSCHEDULE_H
16 #define LLVM_UTILS_TABLEGEN_CODEGENSCHEDULE_H
18 #include "llvm/ADT/APInt.h"
19 #include "llvm/ADT/DenseMap.h"
20 #include "llvm/ADT/StringMap.h"
21 #include "llvm/Support/ErrorHandling.h"
22 #include "llvm/TableGen/Record.h"
23 #include "llvm/TableGen/SetTheory.h"
28 class CodeGenSchedModels
;
29 class CodeGenInstruction
;
30 class CodeGenRegisterClass
;
32 using RecVec
= std::vector
<Record
*>;
33 using RecIter
= std::vector
<Record
*>::const_iterator
;
35 using IdxVec
= std::vector
<unsigned>;
36 using IdxIter
= std::vector
<unsigned>::const_iterator
;
38 /// We have two kinds of SchedReadWrites. Explicitly defined and inferred
39 /// sequences. TheDef is nonnull for explicit SchedWrites, but Sequence may or
40 /// may not be empty. TheDef is null for inferred sequences, and Sequence must
43 /// IsVariadic controls whether the variants are expanded into multiple operands
44 /// or a sequence of writes on one operand.
45 struct CodeGenSchedRW
{
58 : Index(0), TheDef(nullptr), IsRead(false), IsAlias(false),
59 HasVariants(false), IsVariadic(false), IsSequence(false) {}
60 CodeGenSchedRW(unsigned Idx
, Record
*Def
)
61 : Index(Idx
), TheDef(Def
), IsAlias(false), IsVariadic(false) {
62 Name
= Def
->getName();
63 IsRead
= Def
->isSubClassOf("SchedRead");
64 HasVariants
= Def
->isSubClassOf("SchedVariant");
66 IsVariadic
= Def
->getValueAsBit("Variadic");
68 // Read records don't currently have sequences, but it can be easily
69 // added. Note that implicit Reads (from ReadVariant) may have a Sequence
71 IsSequence
= Def
->isSubClassOf("WriteSequence");
74 CodeGenSchedRW(unsigned Idx
, bool Read
, ArrayRef
<unsigned> Seq
,
75 const std::string
&Name
)
76 : Index(Idx
), Name(Name
), TheDef(nullptr), IsRead(Read
), IsAlias(false),
77 HasVariants(false), IsVariadic(false), IsSequence(true), Sequence(Seq
) {
78 assert(Sequence
.size() > 1 && "implied sequence needs >1 RWs");
81 bool isValid() const {
82 assert((!HasVariants
|| TheDef
) && "Variant write needs record def");
83 assert((!IsVariadic
|| HasVariants
) && "Variadic write needs variants");
84 assert((!IsSequence
|| !HasVariants
) && "Sequence can't have variant");
85 assert((!IsSequence
|| !Sequence
.empty()) && "Sequence should be nonempty");
86 assert((!IsAlias
|| Aliases
.empty()) && "Alias cannot have aliases");
87 return TheDef
|| !Sequence
.empty();
95 /// Represent a transition between SchedClasses induced by SchedVariant.
96 struct CodeGenSchedTransition
{
102 /// Scheduling class.
104 /// Each instruction description will be mapped to a scheduling class. There are
105 /// four types of classes:
107 /// 1) An explicitly defined itinerary class with ItinClassDef set.
108 /// Writes and ReadDefs are empty. ProcIndices contains 0 for any processor.
110 /// 2) An implied class with a list of SchedWrites and SchedReads that are
111 /// defined in an instruction definition and which are common across all
112 /// subtargets. ProcIndices contains 0 for any processor.
114 /// 3) An implied class with a list of InstRW records that map instructions to
115 /// SchedWrites and SchedReads per-processor. InstrClassMap should map the same
116 /// instructions to this class. ProcIndices contains all the processors that
117 /// provided InstrRW records for this class. ItinClassDef or Writes/Reads may
118 /// still be defined for processors with no InstRW entry.
120 /// 4) An inferred class represents a variant of another class that may be
121 /// resolved at runtime. ProcIndices contains the set of processors that may
122 /// require the class. ProcIndices are propagated through SchedClasses as
123 /// variants are expanded. Multiple SchedClasses may be inferred from an
124 /// itinerary class. Each inherits the processor index from the ItinRW record
125 /// that mapped the itinerary class to the variant Writes or Reads.
126 struct CodeGenSchedClass
{
129 Record
*ItinClassDef
;
133 // Sorted list of ProcIdx, where ProcIdx==0 implies any processor.
136 std::vector
<CodeGenSchedTransition
> Transitions
;
138 // InstRW records associated with this class. These records may refer to an
139 // Instruction no longer mapped to this class by InstrClassMap. These
140 // Instructions should be ignored by this class because they have been split
141 // off to join another inferred class.
144 CodeGenSchedClass(unsigned Index
, std::string Name
, Record
*ItinClassDef
)
145 : Index(Index
), Name(std::move(Name
)), ItinClassDef(ItinClassDef
) {}
147 bool isKeyEqual(Record
*IC
, ArrayRef
<unsigned> W
,
148 ArrayRef
<unsigned> R
) const {
149 return ItinClassDef
== IC
&& makeArrayRef(Writes
) == W
&&
150 makeArrayRef(Reads
) == R
;
153 // Is this class generated from a variants if existing classes? Instructions
154 // are never mapped directly to inferred scheduling classes.
155 bool isInferred() const { return !ItinClassDef
; }
158 void dump(const CodeGenSchedModels
*SchedModels
) const;
162 /// Represent the cost of allocating a register of register class RCDef.
164 /// The cost of allocating a register is equivalent to the number of physical
165 /// registers used by the register renamer. Register costs are defined at
166 /// register class granularity.
167 struct CodeGenRegisterCost
{
170 bool AllowMoveElimination
;
171 CodeGenRegisterCost(Record
*RC
, unsigned RegisterCost
, bool AllowMoveElim
= false)
172 : RCDef(RC
), Cost(RegisterCost
), AllowMoveElimination(AllowMoveElim
) {}
173 CodeGenRegisterCost(const CodeGenRegisterCost
&) = default;
174 CodeGenRegisterCost
&operator=(const CodeGenRegisterCost
&) = delete;
177 /// A processor register file.
179 /// This class describes a processor register file. Register file information is
180 /// currently consumed by external tools like llvm-mca to predict dispatch
181 /// stalls due to register pressure.
182 struct CodeGenRegisterFile
{
184 Record
*RegisterFileDef
;
185 unsigned MaxMovesEliminatedPerCycle
;
186 bool AllowZeroMoveEliminationOnly
;
188 unsigned NumPhysRegs
;
189 std::vector
<CodeGenRegisterCost
> Costs
;
191 CodeGenRegisterFile(StringRef name
, Record
*def
, unsigned MaxMoveElimPerCy
= 0,
192 bool AllowZeroMoveElimOnly
= false)
193 : Name(name
), RegisterFileDef(def
),
194 MaxMovesEliminatedPerCycle(MaxMoveElimPerCy
),
195 AllowZeroMoveEliminationOnly(AllowZeroMoveElimOnly
),
198 bool hasDefaultCosts() const { return Costs
.empty(); }
203 // ModelName is a unique name used to name an instantiation of MCSchedModel.
205 // ModelDef is NULL for inferred Models. This happens when a processor defines
206 // an itinerary but no machine model. If the processor defines neither a machine
207 // model nor itinerary, then ModelDef remains pointing to NoModel. NoModel has
208 // the special "NoModel" field set to true.
210 // ItinsDef always points to a valid record definition, but may point to the
211 // default NoItineraries. NoItineraries has an empty list of InstrItinData
214 // ItinDefList orders this processor's InstrItinData records by SchedClass idx.
215 struct CodeGenProcModel
{
217 std::string ModelName
;
221 // Derived members...
223 // Array of InstrItinData records indexed by a CodeGenSchedClass index.
224 // This list is empty if the Processor has no value for Itineraries.
225 // Initialized by collectProcItins().
228 // Map itinerary classes to per-operand resources.
229 // This list is empty if no ItinRW refers to this Processor.
232 // List of unsupported feature.
233 // This list is empty if the Processor has no UnsupportedFeatures.
234 RecVec UnsupportedFeaturesDefs
;
236 // All read/write resources associated with this processor.
238 RecVec ReadAdvanceDefs
;
240 // Per-operand machine model resources associated with this processor.
241 RecVec ProcResourceDefs
;
243 // List of Register Files.
244 std::vector
<CodeGenRegisterFile
> RegisterFiles
;
246 // Optional Retire Control Unit definition.
247 Record
*RetireControlUnit
;
249 CodeGenProcModel(unsigned Idx
, std::string Name
, Record
*MDef
,
251 Index(Idx
), ModelName(std::move(Name
)), ModelDef(MDef
), ItinsDef(IDef
),
252 RetireControlUnit(nullptr) {}
254 bool hasItineraries() const {
255 return !ItinsDef
->getValueAsListOfDefs("IID").empty();
258 bool hasInstrSchedModel() const {
259 return !WriteResDefs
.empty() || !ItinRWDefs
.empty();
262 bool hasExtraProcessorInfo() const {
263 return RetireControlUnit
|| !RegisterFiles
.empty();
266 unsigned getProcResourceIdx(Record
*PRDef
) const;
268 bool isUnsupported(const CodeGenInstruction
&Inst
) const;
275 /// Used to correlate instructions to MCInstPredicates specified by
276 /// InstructionEquivalentClass tablegen definitions.
278 /// Example: a XOR of a register with self, is a known zero-idiom for most
281 /// Each processor can use a (potentially different) InstructionEquivalenceClass
282 /// definition to classify zero-idioms. That means, XORrr is likely to appear
283 /// in more than one equivalence class (where each class definition is
284 /// contributed by a different processor).
286 /// There is no guarantee that the same MCInstPredicate will be used to describe
287 /// equivalence classes that identify XORrr as a zero-idiom.
289 /// To be more specific, the requirements for being a zero-idiom XORrr may be
290 /// different for different processors.
292 /// Class PredicateInfo identifies a subset of processors that specify the same
293 /// requirements (i.e. same MCInstPredicate and OperandMask) for an instruction
296 /// Back to the example. Field `ProcModelMask` will have one bit set for every
297 /// processor model that sees XORrr as a zero-idiom, and that specifies the same
298 /// set of constraints.
300 /// By construction, there can be multiple instances of PredicateInfo associated
301 /// with a same instruction opcode. For example, different processors may define
302 /// different constraints on the same opcode.
304 /// Field OperandMask can be used as an extra constraint.
305 /// It may be used to describe conditions that appy only to a subset of the
306 /// operands of a machine instruction, and the operands subset may not be the
307 /// same for all processor models.
308 struct PredicateInfo
{
309 llvm::APInt ProcModelMask
; // A set of processor model indices.
310 llvm::APInt OperandMask
; // An operand mask.
311 const Record
*Predicate
; // MCInstrPredicate definition.
312 PredicateInfo(llvm::APInt CpuMask
, llvm::APInt Operands
, const Record
*Pred
)
313 : ProcModelMask(CpuMask
), OperandMask(Operands
), Predicate(Pred
) {}
315 bool operator==(const PredicateInfo
&Other
) const {
316 return ProcModelMask
== Other
.ProcModelMask
&&
317 OperandMask
== Other
.OperandMask
&& Predicate
== Other
.Predicate
;
321 /// A collection of PredicateInfo objects.
323 /// There is at least one OpcodeInfo object for every opcode specified by a
324 /// TIPredicate definition.
326 std::vector
<PredicateInfo
> Predicates
;
328 OpcodeInfo(const OpcodeInfo
&Other
) = delete;
329 OpcodeInfo
&operator=(const OpcodeInfo
&Other
) = delete;
332 OpcodeInfo() = default;
333 OpcodeInfo
&operator=(OpcodeInfo
&&Other
) = default;
334 OpcodeInfo(OpcodeInfo
&&Other
) = default;
336 ArrayRef
<PredicateInfo
> getPredicates() const { return Predicates
; }
338 void addPredicateForProcModel(const llvm::APInt
&CpuMask
,
339 const llvm::APInt
&OperandMask
,
340 const Record
*Predicate
);
343 /// Used to group together tablegen instruction definitions that are subject
344 /// to a same set of constraints (identified by an instance of OpcodeInfo).
347 std::vector
<const Record
*> Opcodes
;
349 OpcodeGroup(const OpcodeGroup
&Other
) = delete;
350 OpcodeGroup
&operator=(const OpcodeGroup
&Other
) = delete;
353 OpcodeGroup(OpcodeInfo
&&OpInfo
) : Info(std::move(OpInfo
)) {}
354 OpcodeGroup(OpcodeGroup
&&Other
) = default;
356 void addOpcode(const Record
*Opcode
) {
357 assert(std::find(Opcodes
.begin(), Opcodes
.end(), Opcode
) == Opcodes
.end() &&
358 "Opcode already in set!");
359 Opcodes
.push_back(Opcode
);
362 ArrayRef
<const Record
*> getOpcodes() const { return Opcodes
; }
363 const OpcodeInfo
&getOpcodeInfo() const { return Info
; }
366 /// An STIPredicateFunction descriptor used by tablegen backends to
367 /// auto-generate the body of a predicate function as a member of tablegen'd
368 /// class XXXGenSubtargetInfo.
369 class STIPredicateFunction
{
370 const Record
*FunctionDeclaration
;
372 std::vector
<const Record
*> Definitions
;
373 std::vector
<OpcodeGroup
> Groups
;
375 STIPredicateFunction(const STIPredicateFunction
&Other
) = delete;
376 STIPredicateFunction
&operator=(const STIPredicateFunction
&Other
) = delete;
379 STIPredicateFunction(const Record
*Rec
) : FunctionDeclaration(Rec
) {}
380 STIPredicateFunction(STIPredicateFunction
&&Other
) = default;
382 bool isCompatibleWith(const STIPredicateFunction
&Other
) const {
383 return FunctionDeclaration
== Other
.FunctionDeclaration
;
386 void addDefinition(const Record
*Def
) { Definitions
.push_back(Def
); }
387 void addOpcode(const Record
*OpcodeRec
, OpcodeInfo
&&Info
) {
388 if (Groups
.empty() ||
389 Groups
.back().getOpcodeInfo().getPredicates() != Info
.getPredicates())
390 Groups
.emplace_back(std::move(Info
));
391 Groups
.back().addOpcode(OpcodeRec
);
394 StringRef
getName() const {
395 return FunctionDeclaration
->getValueAsString("Name");
397 const Record
*getDefaultReturnPredicate() const {
398 return FunctionDeclaration
->getValueAsDef("DefaultReturnValue");
401 const Record
*getDeclaration() const { return FunctionDeclaration
; }
402 ArrayRef
<const Record
*> getDefinitions() const { return Definitions
; }
403 ArrayRef
<OpcodeGroup
> getGroups() const { return Groups
; }
406 /// Top level container for machine model data.
407 class CodeGenSchedModels
{
408 RecordKeeper
&Records
;
409 const CodeGenTarget
&Target
;
411 // Map dag expressions to Instruction lists.
414 // List of unique processor models.
415 std::vector
<CodeGenProcModel
> ProcModels
;
417 // Map Processor's MachineModel or ProcItin to a CodeGenProcModel index.
418 using ProcModelMapTy
= DenseMap
<Record
*, unsigned>;
419 ProcModelMapTy ProcModelMap
;
421 // Per-operand SchedReadWrite types.
422 std::vector
<CodeGenSchedRW
> SchedWrites
;
423 std::vector
<CodeGenSchedRW
> SchedReads
;
425 // List of unique SchedClasses.
426 std::vector
<CodeGenSchedClass
> SchedClasses
;
428 // Any inferred SchedClass has an index greater than NumInstrSchedClassses.
429 unsigned NumInstrSchedClasses
;
431 RecVec ProcResourceDefs
;
432 RecVec ProcResGroups
;
434 // Map each instruction to its unique SchedClass index considering the
435 // combination of it's itinerary class, SchedRW list, and InstRW records.
436 using InstClassMapTy
= DenseMap
<Record
*, unsigned>;
437 InstClassMapTy InstrClassMap
;
439 std::vector
<STIPredicateFunction
> STIPredicates
;
442 CodeGenSchedModels(RecordKeeper
& RK
, const CodeGenTarget
&TGT
);
444 // iterator access to the scheduling classes.
445 using class_iterator
= std::vector
<CodeGenSchedClass
>::iterator
;
446 using const_class_iterator
= std::vector
<CodeGenSchedClass
>::const_iterator
;
447 class_iterator
classes_begin() { return SchedClasses
.begin(); }
448 const_class_iterator
classes_begin() const { return SchedClasses
.begin(); }
449 class_iterator
classes_end() { return SchedClasses
.end(); }
450 const_class_iterator
classes_end() const { return SchedClasses
.end(); }
451 iterator_range
<class_iterator
> classes() {
452 return make_range(classes_begin(), classes_end());
454 iterator_range
<const_class_iterator
> classes() const {
455 return make_range(classes_begin(), classes_end());
457 iterator_range
<class_iterator
> explicit_classes() {
458 return make_range(classes_begin(), classes_begin() + NumInstrSchedClasses
);
460 iterator_range
<const_class_iterator
> explicit_classes() const {
461 return make_range(classes_begin(), classes_begin() + NumInstrSchedClasses
);
464 Record
*getModelOrItinDef(Record
*ProcDef
) const {
465 Record
*ModelDef
= ProcDef
->getValueAsDef("SchedModel");
466 Record
*ItinsDef
= ProcDef
->getValueAsDef("ProcItin");
467 if (!ItinsDef
->getValueAsListOfDefs("IID").empty()) {
468 assert(ModelDef
->getValueAsBit("NoModel")
469 && "Itineraries must be defined within SchedMachineModel");
475 const CodeGenProcModel
&getModelForProc(Record
*ProcDef
) const {
476 Record
*ModelDef
= getModelOrItinDef(ProcDef
);
477 ProcModelMapTy::const_iterator I
= ProcModelMap
.find(ModelDef
);
478 assert(I
!= ProcModelMap
.end() && "missing machine model");
479 return ProcModels
[I
->second
];
482 CodeGenProcModel
&getProcModel(Record
*ModelDef
) {
483 ProcModelMapTy::const_iterator I
= ProcModelMap
.find(ModelDef
);
484 assert(I
!= ProcModelMap
.end() && "missing machine model");
485 return ProcModels
[I
->second
];
487 const CodeGenProcModel
&getProcModel(Record
*ModelDef
) const {
488 return const_cast<CodeGenSchedModels
*>(this)->getProcModel(ModelDef
);
491 // Iterate over the unique processor models.
492 using ProcIter
= std::vector
<CodeGenProcModel
>::const_iterator
;
493 ProcIter
procModelBegin() const { return ProcModels
.begin(); }
494 ProcIter
procModelEnd() const { return ProcModels
.end(); }
495 ArrayRef
<CodeGenProcModel
> procModels() const { return ProcModels
; }
497 // Return true if any processors have itineraries.
498 bool hasItineraries() const;
500 // Get a SchedWrite from its index.
501 const CodeGenSchedRW
&getSchedWrite(unsigned Idx
) const {
502 assert(Idx
< SchedWrites
.size() && "bad SchedWrite index");
503 assert(SchedWrites
[Idx
].isValid() && "invalid SchedWrite");
504 return SchedWrites
[Idx
];
506 // Get a SchedWrite from its index.
507 const CodeGenSchedRW
&getSchedRead(unsigned Idx
) const {
508 assert(Idx
< SchedReads
.size() && "bad SchedRead index");
509 assert(SchedReads
[Idx
].isValid() && "invalid SchedRead");
510 return SchedReads
[Idx
];
513 const CodeGenSchedRW
&getSchedRW(unsigned Idx
, bool IsRead
) const {
514 return IsRead
? getSchedRead(Idx
) : getSchedWrite(Idx
);
516 CodeGenSchedRW
&getSchedRW(Record
*Def
) {
517 bool IsRead
= Def
->isSubClassOf("SchedRead");
518 unsigned Idx
= getSchedRWIdx(Def
, IsRead
);
519 return const_cast<CodeGenSchedRW
&>(
520 IsRead
? getSchedRead(Idx
) : getSchedWrite(Idx
));
522 const CodeGenSchedRW
&getSchedRW(Record
*Def
) const {
523 return const_cast<CodeGenSchedModels
&>(*this).getSchedRW(Def
);
526 unsigned getSchedRWIdx(const Record
*Def
, bool IsRead
) const;
528 // Return true if the given write record is referenced by a ReadAdvance.
529 bool hasReadOfWrite(Record
*WriteDef
) const;
531 // Get a SchedClass from its index.
532 CodeGenSchedClass
&getSchedClass(unsigned Idx
) {
533 assert(Idx
< SchedClasses
.size() && "bad SchedClass index");
534 return SchedClasses
[Idx
];
536 const CodeGenSchedClass
&getSchedClass(unsigned Idx
) const {
537 assert(Idx
< SchedClasses
.size() && "bad SchedClass index");
538 return SchedClasses
[Idx
];
541 // Get the SchedClass index for an instruction. Instructions with no
542 // itinerary, no SchedReadWrites, and no InstrReadWrites references return 0
544 unsigned getSchedClassIdx(const CodeGenInstruction
&Inst
) const;
546 using SchedClassIter
= std::vector
<CodeGenSchedClass
>::const_iterator
;
547 SchedClassIter
schedClassBegin() const { return SchedClasses
.begin(); }
548 SchedClassIter
schedClassEnd() const { return SchedClasses
.end(); }
549 ArrayRef
<CodeGenSchedClass
> schedClasses() const { return SchedClasses
; }
551 unsigned numInstrSchedClasses() const { return NumInstrSchedClasses
; }
553 void findRWs(const RecVec
&RWDefs
, IdxVec
&Writes
, IdxVec
&Reads
) const;
554 void findRWs(const RecVec
&RWDefs
, IdxVec
&RWs
, bool IsRead
) const;
555 void expandRWSequence(unsigned RWIdx
, IdxVec
&RWSeq
, bool IsRead
) const;
556 void expandRWSeqForProc(unsigned RWIdx
, IdxVec
&RWSeq
, bool IsRead
,
557 const CodeGenProcModel
&ProcModel
) const;
559 unsigned addSchedClass(Record
*ItinDef
, ArrayRef
<unsigned> OperWrites
,
560 ArrayRef
<unsigned> OperReads
,
561 ArrayRef
<unsigned> ProcIndices
);
563 unsigned findOrInsertRW(ArrayRef
<unsigned> Seq
, bool IsRead
);
565 Record
*findProcResUnits(Record
*ProcResKind
, const CodeGenProcModel
&PM
,
566 ArrayRef
<SMLoc
> Loc
) const;
568 ArrayRef
<STIPredicateFunction
> getSTIPredicates() const {
569 return STIPredicates
;
572 void collectProcModels();
574 // Initialize a new processor model if it is unique.
575 void addProcModel(Record
*ProcDef
);
577 void collectSchedRW();
579 std::string
genRWName(ArrayRef
<unsigned> Seq
, bool IsRead
);
580 unsigned findRWForSequence(ArrayRef
<unsigned> Seq
, bool IsRead
);
582 void collectSchedClasses();
584 void collectRetireControlUnits();
586 void collectRegisterFiles();
588 void collectOptionalProcessorInfo();
590 std::string
createSchedClassName(Record
*ItinClassDef
,
591 ArrayRef
<unsigned> OperWrites
,
592 ArrayRef
<unsigned> OperReads
);
593 std::string
createSchedClassName(const RecVec
&InstDefs
);
594 void createInstRWClass(Record
*InstRWDef
);
596 void collectProcItins();
598 void collectProcItinRW();
600 void collectProcUnsupportedFeatures();
602 void inferSchedClasses();
604 void checkMCInstPredicates() const;
606 void checkSTIPredicates() const;
608 void collectSTIPredicates();
610 void checkCompleteness();
612 void inferFromRW(ArrayRef
<unsigned> OperWrites
, ArrayRef
<unsigned> OperReads
,
613 unsigned FromClassIdx
, ArrayRef
<unsigned> ProcIndices
);
614 void inferFromItinClass(Record
*ItinClassDef
, unsigned FromClassIdx
);
615 void inferFromInstRWs(unsigned SCIdx
);
617 bool hasSuperGroup(RecVec
&SubUnits
, CodeGenProcModel
&PM
);
618 void verifyProcResourceGroups(CodeGenProcModel
&PM
);
620 void collectProcResources();
622 void collectItinProcResources(Record
*ItinClassDef
);
624 void collectRWResources(unsigned RWIdx
, bool IsRead
,
625 ArrayRef
<unsigned> ProcIndices
);
627 void collectRWResources(ArrayRef
<unsigned> Writes
, ArrayRef
<unsigned> Reads
,
628 ArrayRef
<unsigned> ProcIndices
);
630 void addProcResource(Record
*ProcResourceKind
, CodeGenProcModel
&PM
,
631 ArrayRef
<SMLoc
> Loc
);
633 void addWriteRes(Record
*ProcWriteResDef
, unsigned PIdx
);
635 void addReadAdvance(Record
*ProcReadAdvanceDef
, unsigned PIdx
);