@@ -271,8 +271,7 @@ void CodeGenSchedModels::checkSTIPredicates() const {
271
271
// Disallow InstructionEquivalenceClasses with an empty instruction list.
272
272
for (const Record *R :
273
273
Records.getAllDerivedDefinitions (" InstructionEquivalenceClass" )) {
274
- RecVec Opcodes = R->getValueAsListOfDefs (" Opcodes" );
275
- if (Opcodes.empty ()) {
274
+ if (R->getValueAsListOfDefs (" Opcodes" ).empty ()) {
276
275
PrintFatalError (R->getLoc (), " Invalid InstructionEquivalenceClass "
277
276
" defined with an empty opcode list." );
278
277
}
@@ -311,13 +310,13 @@ static void processSTIPredicate(STIPredicateFunction &Fn,
311
310
// definitions. Each unique opcode will be associated with an OpcodeInfo
312
311
// object.
313
312
for (const Record *Def : Fn.getDefinitions ()) {
314
- RecVec Classes = Def->getValueAsListOfDefs (" Classes" );
313
+ ConstRecVec Classes = Def->getValueAsListOfConstDefs (" Classes" );
315
314
for (const Record *EC : Classes) {
316
315
const Record *Pred = EC->getValueAsDef (" Predicate" );
317
316
if (!Predicate2Index.contains (Pred))
318
317
Predicate2Index[Pred] = NumUniquePredicates++;
319
318
320
- RecVec Opcodes = EC->getValueAsListOfDefs (" Opcodes" );
319
+ ConstRecVec Opcodes = EC->getValueAsListOfConstDefs (" Opcodes" );
321
320
for (const Record *Opcode : Opcodes) {
322
321
if (!Opcode2Index.contains (Opcode)) {
323
322
Opcode2Index[Opcode] = OpcodeMappings.size ();
@@ -342,14 +341,14 @@ static void processSTIPredicate(STIPredicateFunction &Fn,
342
341
// Construct a OpcodeInfo object for every unique opcode declared by an
343
342
// InstructionEquivalenceClass definition.
344
343
for (const Record *Def : Fn.getDefinitions ()) {
345
- RecVec Classes = Def->getValueAsListOfDefs (" Classes" );
344
+ ConstRecVec Classes = Def->getValueAsListOfConstDefs (" Classes" );
346
345
const Record *SchedModel = Def->getValueAsDef (" SchedModel" );
347
346
unsigned ProcIndex = ProcModelMap.find (SchedModel)->second ;
348
347
APInt ProcMask (ProcModelMap.size (), 0 );
349
348
ProcMask.setBit (ProcIndex);
350
349
351
350
for (const Record *EC : Classes) {
352
- RecVec Opcodes = EC->getValueAsListOfDefs (" Opcodes" );
351
+ ConstRecVec Opcodes = EC->getValueAsListOfConstDefs (" Opcodes" );
353
352
354
353
std::vector<int64_t > OpIndices =
355
354
EC->getValueAsListOfInts (" OperandIndices" );
@@ -579,8 +578,7 @@ static void scanSchedRW(const Record *RWDef, ConstRecVec &RWDefs,
579
578
// Visit each variant (guarded by a different predicate).
580
579
for (const Record *Variant : RWDef->getValueAsListOfDefs (" Variants" )) {
581
580
// Visit each RW in the sequence selected by the current variant.
582
- RecVec Selected = Variant->getValueAsListOfDefs (" Selected" );
583
- for (Record *SelDef : Selected)
581
+ for (const Record *SelDef : Variant->getValueAsListOfDefs (" Selected" ))
584
582
scanSchedRW (SelDef, RWDefs, RWSet);
585
583
}
586
584
}
@@ -601,8 +599,7 @@ void CodeGenSchedModels::collectSchedRW() {
601
599
const Record *SchedDef = Inst->TheDef ;
602
600
if (SchedDef->isValueUnset (" SchedRW" ))
603
601
continue ;
604
- RecVec RWs = SchedDef->getValueAsListOfDefs (" SchedRW" );
605
- for (Record *RW : RWs) {
602
+ for (const Record *RW : SchedDef->getValueAsListOfDefs (" SchedRW" )) {
606
603
if (RW->isSubClassOf (" SchedWrite" ))
607
604
scanSchedRW (RW, SWDefs, RWSet);
608
605
else {
@@ -614,8 +611,8 @@ void CodeGenSchedModels::collectSchedRW() {
614
611
// Find all ReadWrites referenced by InstRW.
615
612
for (const Record *InstRWDef : Records.getAllDerivedDefinitions (" InstRW" )) {
616
613
// For all OperandReadWrites.
617
- RecVec RWDefs = InstRWDef-> getValueAsListOfDefs ( " OperandReadWrites " );
618
- for (Record *RWDef : RWDefs ) {
614
+ for ( const Record *RWDef :
615
+ InstRWDef-> getValueAsListOfDefs ( " OperandReadWrites " ) ) {
619
616
if (RWDef->isSubClassOf (" SchedWrite" ))
620
617
scanSchedRW (RWDef, SWDefs, RWSet);
621
618
else {
@@ -627,8 +624,8 @@ void CodeGenSchedModels::collectSchedRW() {
627
624
// Find all ReadWrites referenced by ItinRW.
628
625
for (const Record *ItinRWDef : Records.getAllDerivedDefinitions (" ItinRW" )) {
629
626
// For all OperandReadWrites.
630
- RecVec RWDefs = ItinRWDef-> getValueAsListOfDefs ( " OperandReadWrites " );
631
- for (Record *RWDef : RWDefs ) {
627
+ for ( const Record *RWDef :
628
+ ItinRWDef-> getValueAsListOfDefs ( " OperandReadWrites " ) ) {
632
629
if (RWDef->isSubClassOf (" SchedWrite" ))
633
630
scanSchedRW (RWDef, SWDefs, RWSet);
634
631
else {
@@ -672,7 +669,7 @@ void CodeGenSchedModels::collectSchedRW() {
672
669
for (CodeGenSchedRW &CGRW : SchedWrites) {
673
670
if (!CGRW.IsSequence )
674
671
continue ;
675
- findRWs (CGRW.TheDef ->getValueAsListOfDefs (" Writes" ), CGRW.Sequence ,
672
+ findRWs (CGRW.TheDef ->getValueAsListOfConstDefs (" Writes" ), CGRW.Sequence ,
676
673
/* IsRead=*/ false );
677
674
}
678
675
// Initialize Aliases vectors.
@@ -726,9 +723,10 @@ unsigned CodeGenSchedModels::getSchedRWIdx(const Record *Def,
726
723
return I == RWVec.end () ? 0 : std::distance (RWVec.begin (), I);
727
724
}
728
725
729
- static void splitSchedReadWrites (const RecVec &RWDefs, RecVec &WriteDefs,
730
- RecVec &ReadDefs) {
731
- for (Record *RWDef : RWDefs) {
726
+ static void splitSchedReadWrites (const ConstRecVec &RWDefs,
727
+ ConstRecVec &WriteDefs,
728
+ ConstRecVec &ReadDefs) {
729
+ for (const Record *RWDef : RWDefs) {
732
730
if (RWDef->isSubClassOf (" SchedWrite" ))
733
731
WriteDefs.push_back (RWDef);
734
732
else {
@@ -739,19 +737,19 @@ static void splitSchedReadWrites(const RecVec &RWDefs, RecVec &WriteDefs,
739
737
}
740
738
741
739
// Split the SchedReadWrites defs and call findRWs for each list.
742
- void CodeGenSchedModels::findRWs (const RecVec &RWDefs, IdxVec &Writes,
740
+ void CodeGenSchedModels::findRWs (const ConstRecVec &RWDefs, IdxVec &Writes,
743
741
IdxVec &Reads) const {
744
- RecVec WriteDefs;
745
- RecVec ReadDefs;
742
+ ConstRecVec WriteDefs;
743
+ ConstRecVec ReadDefs;
746
744
splitSchedReadWrites (RWDefs, WriteDefs, ReadDefs);
747
745
findRWs (WriteDefs, Writes, false );
748
746
findRWs (ReadDefs, Reads, true );
749
747
}
750
748
751
749
// Call getSchedRWIdx for all elements in a sequence of SchedRW defs.
752
- void CodeGenSchedModels::findRWs (const RecVec &RWDefs, IdxVec &RWs,
750
+ void CodeGenSchedModels::findRWs (const ConstRecVec &RWDefs, IdxVec &RWs,
753
751
bool IsRead) const {
754
- for (Record *RWDef : RWDefs) {
752
+ for (const Record *RWDef : RWDefs) {
755
753
unsigned Idx = getSchedRWIdx (RWDef, IsRead);
756
754
assert (Idx && " failed to collect SchedReadWrite" );
757
755
RWs.push_back (Idx);
@@ -859,7 +857,8 @@ void CodeGenSchedModels::collectSchedClasses() {
859
857
Record *ItinDef = Inst->TheDef ->getValueAsDef (" Itinerary" );
860
858
IdxVec Writes, Reads;
861
859
if (!Inst->TheDef ->isValueUnset (" SchedRW" ))
862
- findRWs (Inst->TheDef ->getValueAsListOfDefs (" SchedRW" ), Writes, Reads);
860
+ findRWs (Inst->TheDef ->getValueAsListOfConstDefs (" SchedRW" ), Writes,
861
+ Reads);
863
862
864
863
// ProcIdx == 0 indicates the class applies to all processors.
865
864
unsigned SCIdx = addSchedClass (ItinDef, Writes, Reads, /* ProcIndices*/ {0 });
@@ -921,7 +920,8 @@ void CodeGenSchedModels::collectSchedClasses() {
921
920
<< InstName);
922
921
IdxVec Writes;
923
922
IdxVec Reads;
924
- findRWs (RWDef->getValueAsListOfDefs (" OperandReadWrites" ), Writes, Reads);
923
+ findRWs (RWDef->getValueAsListOfConstDefs (" OperandReadWrites" ), Writes,
924
+ Reads);
925
925
LLVM_DEBUG ({
926
926
for (unsigned WIdx : Writes)
927
927
dbgs () << " " << SchedWrites[WIdx].Name ;
@@ -950,10 +950,9 @@ CodeGenSchedModels::getSchedClassIdx(const CodeGenInstruction &Inst) const {
950
950
}
951
951
952
952
std::string
953
- CodeGenSchedModels::createSchedClassName (Record *ItinClassDef,
953
+ CodeGenSchedModels::createSchedClassName (const Record *ItinClassDef,
954
954
ArrayRef<unsigned > OperWrites,
955
955
ArrayRef<unsigned > OperReads) {
956
-
957
956
std::string Name;
958
957
if (ItinClassDef && ItinClassDef->getName () != " NoItinerary" )
959
958
Name = std::string (ItinClassDef->getName ());
@@ -983,7 +982,7 @@ CodeGenSchedModels::createSchedClassName(const ConstRecVec &InstDefs) {
983
982
// / Add an inferred sched class from an itinerary class and per-operand list of
984
983
// / SchedWrites and SchedReads. ProcIndices contains the set of IDs of
985
984
// / processors that may utilize this class.
986
- unsigned CodeGenSchedModels::addSchedClass (Record *ItinClassDef,
985
+ unsigned CodeGenSchedModels::addSchedClass (const Record *ItinClassDef,
987
986
ArrayRef<unsigned > OperWrites,
988
987
ArrayRef<unsigned > OperReads,
989
988
ArrayRef<unsigned > ProcIndices) {
@@ -1131,15 +1130,16 @@ void CodeGenSchedModels::collectProcItins() {
1131
1130
if (!ProcModel.hasItineraries ())
1132
1131
continue ;
1133
1132
1134
- RecVec ItinRecords = ProcModel.ItinsDef ->getValueAsListOfDefs (" IID" );
1133
+ ConstRecVec ItinRecords =
1134
+ ProcModel.ItinsDef ->getValueAsListOfConstDefs (" IID" );
1135
1135
assert (!ItinRecords.empty () && " ProcModel.hasItineraries is incorrect" );
1136
1136
1137
1137
// Populate ItinDefList with Itinerary records.
1138
1138
ProcModel.ItinDefList .resize (NumInstrSchedClasses);
1139
1139
1140
1140
// Insert each itinerary data record in the correct position within
1141
1141
// the processor model's ItinDefList.
1142
- for (Record *ItinData : ItinRecords) {
1142
+ for (const Record *ItinData : ItinRecords) {
1143
1143
const Record *ItinDef = ItinData->getValueAsDef (" TheClass" );
1144
1144
bool FoundClass = false ;
1145
1145
@@ -1217,14 +1217,15 @@ void CodeGenSchedModels::inferSchedClasses() {
1217
1217
}
1218
1218
1219
1219
// / Infer classes from per-processor itinerary resources.
1220
- void CodeGenSchedModels::inferFromItinClass (Record *ItinClassDef,
1220
+ void CodeGenSchedModels::inferFromItinClass (const Record *ItinClassDef,
1221
1221
unsigned FromClassIdx) {
1222
1222
for (unsigned PIdx = 0 , PEnd = ProcModels.size (); PIdx != PEnd; ++PIdx) {
1223
1223
const CodeGenProcModel &PM = ProcModels[PIdx];
1224
1224
// For all ItinRW entries.
1225
1225
bool HasMatch = false ;
1226
1226
for (const Record *Rec : PM.ItinRWDefs ) {
1227
- RecVec Matched = Rec->getValueAsListOfDefs (" MatchedItinClasses" );
1227
+ ConstRecVec Matched =
1228
+ Rec->getValueAsListOfConstDefs (" MatchedItinClasses" );
1228
1229
if (!llvm::is_contained (Matched, ItinClassDef))
1229
1230
continue ;
1230
1231
if (HasMatch)
@@ -1233,7 +1234,8 @@ void CodeGenSchedModels::inferFromItinClass(Record *ItinClassDef,
1233
1234
" in ItinResources for " + PM.ModelName );
1234
1235
HasMatch = true ;
1235
1236
IdxVec Writes, Reads;
1236
- findRWs (Rec->getValueAsListOfDefs (" OperandReadWrites" ), Writes, Reads);
1237
+ findRWs (Rec->getValueAsListOfConstDefs (" OperandReadWrites" ), Writes,
1238
+ Reads);
1237
1239
inferFromRW (Writes, Reads, FromClassIdx, PIdx);
1238
1240
}
1239
1241
}
@@ -1255,7 +1257,7 @@ void CodeGenSchedModels::inferFromInstRWs(unsigned SCIdx) {
1255
1257
if (II == IE)
1256
1258
continue ;
1257
1259
IdxVec Writes, Reads;
1258
- findRWs (Rec->getValueAsListOfDefs (" OperandReadWrites" ), Writes, Reads);
1260
+ findRWs (Rec->getValueAsListOfConstDefs (" OperandReadWrites" ), Writes, Reads);
1259
1261
unsigned PIdx = getProcModel (Rec->getValueAsDef (" SchedModel" )).Index ;
1260
1262
inferFromRW (Writes, Reads, SCIdx, PIdx); // May mutate SchedClasses.
1261
1263
SchedClasses[SCIdx].InstRWProcIndices .insert (PIdx);
@@ -1348,7 +1350,8 @@ bool PredTransitions::mutuallyExclusive(Record *PredDef,
1348
1350
1349
1351
const CodeGenSchedRW &SchedRW = SchedModels.getSchedRW (PC.RWIdx , PC.IsRead );
1350
1352
assert (SchedRW.HasVariants && " PredCheck must refer to a SchedVariant" );
1351
- RecVec Variants = SchedRW.TheDef ->getValueAsListOfDefs (" Variants" );
1353
+ ConstRecVec Variants =
1354
+ SchedRW.TheDef ->getValueAsListOfConstDefs (" Variants" );
1352
1355
if (any_of (Variants, [PredDef](const Record *R) {
1353
1356
return R->getValueAsDef (" Predicate" ) == PredDef;
1354
1357
})) {
@@ -1414,8 +1417,8 @@ void PredTransitions::getIntersectingVariants(
1414
1417
}
1415
1418
if (VarProcIdx == 0 || VarProcIdx == TransVec[TransIdx].ProcIndex ) {
1416
1419
// Push each variant. Assign TransVecIdx later.
1417
- const RecVec VarDefs = SchedRW. TheDef -> getValueAsListOfDefs ( " Variants " );
1418
- for (Record *VarDef : VarDefs )
1420
+ for ( const Record *VarDef :
1421
+ SchedRW. TheDef -> getValueAsListOfDefs ( " Variants " ) )
1419
1422
Variants.emplace_back (VarDef, SchedRW.Index , VarProcIdx, 0 );
1420
1423
if (VarProcIdx == 0 )
1421
1424
GenericRW = true ;
@@ -1446,8 +1449,7 @@ void PredTransitions::getIntersectingVariants(
1446
1449
SchedModels.getSchedRW ((*AI)->getValueAsDef (" AliasRW" ));
1447
1450
1448
1451
if (AliasRW.HasVariants ) {
1449
- const RecVec VarDefs = AliasRW.TheDef ->getValueAsListOfDefs (" Variants" );
1450
- for (Record *VD : VarDefs)
1452
+ for (const Record *VD : AliasRW.TheDef ->getValueAsListOfDefs (" Variants" ))
1451
1453
Variants.emplace_back (VD, AliasRW.Index , AliasProcIdx, 0 );
1452
1454
}
1453
1455
if (AliasRW.IsSequence )
@@ -1495,7 +1497,8 @@ void PredTransitions::pushVariant(const TransVariant &VInfo, bool IsRead) {
1495
1497
if (VInfo.VarOrSeqDef ->isSubClassOf (" SchedVar" )) {
1496
1498
Record *PredDef = VInfo.VarOrSeqDef ->getValueAsDef (" Predicate" );
1497
1499
Trans.PredTerm .emplace_back (IsRead, VInfo.RWIdx , PredDef);
1498
- RecVec SelectedDefs = VInfo.VarOrSeqDef ->getValueAsListOfDefs (" Selected" );
1500
+ ConstRecVec SelectedDefs =
1501
+ VInfo.VarOrSeqDef ->getValueAsListOfConstDefs (" Selected" );
1499
1502
SchedModels.findRWs (SelectedDefs, SelectedRWs, IsRead);
1500
1503
} else {
1501
1504
assert (VInfo.VarOrSeqDef ->isSubClassOf (" WriteSequence" ) &&
@@ -1761,12 +1764,14 @@ void CodeGenSchedModels::inferFromRW(ArrayRef<unsigned> OperWrites,
1761
1764
1762
1765
// Check if any processor resource group contains all resource records in
1763
1766
// SubUnits.
1764
- bool CodeGenSchedModels::hasSuperGroup (RecVec &SubUnits, CodeGenProcModel &PM) {
1767
+ bool CodeGenSchedModels::hasSuperGroup (ConstRecVec &SubUnits,
1768
+ CodeGenProcModel &PM) {
1765
1769
for (const Record *ProcResourceDef : PM.ProcResourceDefs ) {
1766
1770
if (!ProcResourceDef->isSubClassOf (" ProcResGroup" ))
1767
1771
continue ;
1768
- RecVec SuperUnits = ProcResourceDef->getValueAsListOfDefs (" Resources" );
1769
- RecIter RI = SubUnits.begin (), RE = SubUnits.end ();
1772
+ ConstRecVec SuperUnits =
1773
+ ProcResourceDef->getValueAsListOfConstDefs (" Resources" );
1774
+ auto RI = SubUnits.begin (), RE = SubUnits.end ();
1770
1775
for (; RI != RE; ++RI) {
1771
1776
if (!is_contained (SuperUnits, *RI)) {
1772
1777
break ;
@@ -1783,13 +1788,13 @@ void CodeGenSchedModels::verifyProcResourceGroups(CodeGenProcModel &PM) {
1783
1788
for (unsigned i = 0 , e = PM.ProcResourceDefs .size (); i < e; ++i) {
1784
1789
if (!PM.ProcResourceDefs [i]->isSubClassOf (" ProcResGroup" ))
1785
1790
continue ;
1786
- RecVec CheckUnits =
1787
- PM.ProcResourceDefs [i]->getValueAsListOfDefs (" Resources" );
1791
+ ConstRecVec CheckUnits =
1792
+ PM.ProcResourceDefs [i]->getValueAsListOfConstDefs (" Resources" );
1788
1793
for (unsigned j = i + 1 ; j < e; ++j) {
1789
1794
if (!PM.ProcResourceDefs [j]->isSubClassOf (" ProcResGroup" ))
1790
1795
continue ;
1791
- RecVec OtherUnits =
1792
- PM.ProcResourceDefs [j]->getValueAsListOfDefs (" Resources" );
1796
+ ConstRecVec OtherUnits =
1797
+ PM.ProcResourceDefs [j]->getValueAsListOfConstDefs (" Resources" );
1793
1798
if (std::find_first_of (CheckUnits.begin (), CheckUnits.end (),
1794
1799
OtherUnits.begin (),
1795
1800
OtherUnits.end ()) != CheckUnits.end ()) {
@@ -1828,7 +1833,7 @@ void CodeGenSchedModels::collectRegisterFiles() {
1828
1833
" Invalid RegisterFile with zero physical registers" );
1829
1834
}
1830
1835
1831
- RecVec RegisterClasses = RF->getValueAsListOfDefs (" RegClasses" );
1836
+ ConstRecVec RegisterClasses = RF->getValueAsListOfConstDefs (" RegClasses" );
1832
1837
std::vector<int64_t > RegisterCosts = RF->getValueAsListOfInts (" RegCosts" );
1833
1838
ListInit *MoveElimInfo = RF->getValueAsListInit (" AllowMoveElimination" );
1834
1839
for (unsigned I = 0 , E = RegisterClasses.size (); I < E; ++I) {
@@ -1866,7 +1871,8 @@ void CodeGenSchedModels::collectProcResources() {
1866
1871
Record *RWModelDef = RW->getValueAsDef (" SchedModel" );
1867
1872
unsigned PIdx = getProcModel (RWModelDef).Index ;
1868
1873
IdxVec Writes, Reads;
1869
- findRWs (RW->getValueAsListOfDefs (" OperandReadWrites" ), Writes, Reads);
1874
+ findRWs (RW->getValueAsListOfConstDefs (" OperandReadWrites" ), Writes,
1875
+ Reads);
1870
1876
collectRWResources (Writes, Reads, PIdx);
1871
1877
}
1872
1878
@@ -2004,13 +2010,13 @@ void CodeGenSchedModels::checkCompleteness() {
2004
2010
}
2005
2011
2006
2012
// Collect itinerary class resources for each processor.
2007
- void CodeGenSchedModels::collectItinProcResources (Record *ItinClassDef) {
2013
+ void CodeGenSchedModels::collectItinProcResources (const Record *ItinClassDef) {
2008
2014
for (unsigned PIdx = 0 , PEnd = ProcModels.size (); PIdx != PEnd; ++PIdx) {
2009
2015
const CodeGenProcModel &PM = ProcModels[PIdx];
2010
2016
// For all ItinRW entries.
2011
2017
bool HasMatch = false ;
2012
2018
for (const Record *R : PM.ItinRWDefs ) {
2013
- RecVec Matched = R->getValueAsListOfDefs (" MatchedItinClasses" );
2019
+ ConstRecVec Matched = R->getValueAsListOfConstDefs (" MatchedItinClasses" );
2014
2020
if (!llvm::is_contained (Matched, ItinClassDef))
2015
2021
continue ;
2016
2022
if (HasMatch)
@@ -2019,7 +2025,7 @@ void CodeGenSchedModels::collectItinProcResources(Record *ItinClassDef) {
2019
2025
" in ItinResources for " + PM.ModelName );
2020
2026
HasMatch = true ;
2021
2027
IdxVec Writes, Reads;
2022
- findRWs (R->getValueAsListOfDefs (" OperandReadWrites" ), Writes, Reads);
2028
+ findRWs (R->getValueAsListOfConstDefs (" OperandReadWrites" ), Writes, Reads);
2023
2029
collectRWResources (Writes, Reads, PIdx);
2024
2030
}
2025
2031
}
@@ -2139,8 +2145,8 @@ void CodeGenSchedModels::addWriteRes(const Record *ProcWriteResDef,
2139
2145
WRDefs.push_back (ProcWriteResDef);
2140
2146
2141
2147
// Visit ProcResourceKinds referenced by the newly discovered WriteRes.
2142
- RecVec ProcResDefs = ProcWriteResDef-> getValueAsListOfDefs ( " ProcResources " );
2143
- for ( const Record *ProcResDef : ProcResDefs ) {
2148
+ for ( const Record *ProcResDef :
2149
+ ProcWriteResDef-> getValueAsListOfDefs ( " ProcResources " ) ) {
2144
2150
addProcResource (ProcResDef, ProcModels[PIdx], ProcWriteResDef->getLoc ());
2145
2151
}
2146
2152
}
@@ -2186,7 +2192,7 @@ bool CodeGenProcModel::isUnsupported(const CodeGenInstruction &Inst) const {
2186
2192
2187
2193
bool CodeGenProcModel::hasReadOfWrite (const Record *WriteDef) const {
2188
2194
for (auto &RADef : ReadAdvanceDefs) {
2189
- RecVec ValidWrites = RADef->getValueAsListOfDefs (" ValidWrites" );
2195
+ ConstRecVec ValidWrites = RADef->getValueAsListOfConstDefs (" ValidWrites" );
2190
2196
if (is_contained (ValidWrites, WriteDef))
2191
2197
return true ;
2192
2198
}
0 commit comments