@@ -280,15 +280,15 @@ class SVEEmitter {
280
280
281
281
static const std::array<ReinterpretTypeInfo, 12 > Reinterprets;
282
282
283
- RecordKeeper &Records;
283
+ const RecordKeeper &Records;
284
284
llvm::StringMap<uint64_t > EltTypes;
285
285
llvm::StringMap<uint64_t > MemEltTypes;
286
286
llvm::StringMap<uint64_t > FlagTypes;
287
287
llvm::StringMap<uint64_t > MergeTypes;
288
288
llvm::StringMap<uint64_t > ImmCheckTypes;
289
289
290
290
public:
291
- SVEEmitter (RecordKeeper &R) : Records(R) {
291
+ SVEEmitter (const RecordKeeper &R) : Records(R) {
292
292
for (auto *RV : Records.getAllDerivedDefinitions (" EltType" ))
293
293
EltTypes[RV->getNameInitAsString ()] = RV->getValueAsInt (" Value" );
294
294
for (auto *RV : Records.getAllDerivedDefinitions (" MemEltType" ))
@@ -397,7 +397,7 @@ class SVEEmitter {
397
397
void createBuiltinZAState (raw_ostream &OS);
398
398
399
399
// / Create intrinsic and add it to \p Out
400
- void createIntrinsic (Record *R,
400
+ void createIntrinsic (const Record *R,
401
401
SmallVectorImpl<std::unique_ptr<Intrinsic>> &Out);
402
402
};
403
403
@@ -1151,7 +1151,7 @@ uint64_t SVEEmitter::encodeTypeFlags(const SVEType &T) {
1151
1151
}
1152
1152
1153
1153
void SVEEmitter::createIntrinsic (
1154
- Record *R, SmallVectorImpl<std::unique_ptr<Intrinsic>> &Out) {
1154
+ const Record *R, SmallVectorImpl<std::unique_ptr<Intrinsic>> &Out) {
1155
1155
StringRef Name = R->getValueAsString (" Name" );
1156
1156
StringRef Proto = R->getValueAsString (" Prototype" );
1157
1157
StringRef Types = R->getValueAsString (" Types" );
@@ -1225,7 +1225,7 @@ void SVEEmitter::createCoreHeaderIntrinsics(raw_ostream &OS,
1225
1225
SVEEmitter &Emitter,
1226
1226
ACLEKind Kind) {
1227
1227
SmallVector<std::unique_ptr<Intrinsic>, 128 > Defs;
1228
- std::vector<Record *> RV = Records.getAllDerivedDefinitions (" Inst" );
1228
+ std::vector<const Record *> RV = Records.getAllDerivedDefinitions (" Inst" );
1229
1229
for (auto *R : RV)
1230
1230
createIntrinsic (R, Defs);
1231
1231
@@ -1427,7 +1427,7 @@ void SVEEmitter::createHeader(raw_ostream &OS) {
1427
1427
}
1428
1428
1429
1429
void SVEEmitter::createBuiltins (raw_ostream &OS) {
1430
- std::vector<Record *> RV = Records.getAllDerivedDefinitions (" Inst" );
1430
+ std::vector<const Record *> RV = Records.getAllDerivedDefinitions (" Inst" );
1431
1431
SmallVector<std::unique_ptr<Intrinsic>, 128 > Defs;
1432
1432
for (auto *R : RV)
1433
1433
createIntrinsic (R, Defs);
@@ -1469,7 +1469,7 @@ void SVEEmitter::createBuiltins(raw_ostream &OS) {
1469
1469
}
1470
1470
1471
1471
void SVEEmitter::createCodeGenMap (raw_ostream &OS) {
1472
- std::vector<Record *> RV = Records.getAllDerivedDefinitions (" Inst" );
1472
+ std::vector<const Record *> RV = Records.getAllDerivedDefinitions (" Inst" );
1473
1473
SmallVector<std::unique_ptr<Intrinsic>, 128 > Defs;
1474
1474
for (auto *R : RV)
1475
1475
createIntrinsic (R, Defs);
@@ -1502,7 +1502,7 @@ void SVEEmitter::createCodeGenMap(raw_ostream &OS) {
1502
1502
}
1503
1503
1504
1504
void SVEEmitter::createRangeChecks (raw_ostream &OS) {
1505
- std::vector<Record *> RV = Records.getAllDerivedDefinitions (" Inst" );
1505
+ std::vector<const Record *> RV = Records.getAllDerivedDefinitions (" Inst" );
1506
1506
SmallVector<std::unique_ptr<Intrinsic>, 128 > Defs;
1507
1507
for (auto *R : RV)
1508
1508
createIntrinsic (R, Defs);
@@ -1634,7 +1634,7 @@ void SVEEmitter::createSMEHeader(raw_ostream &OS) {
1634
1634
}
1635
1635
1636
1636
void SVEEmitter::createSMEBuiltins (raw_ostream &OS) {
1637
- std::vector<Record *> RV = Records.getAllDerivedDefinitions (" Inst" );
1637
+ std::vector<const Record *> RV = Records.getAllDerivedDefinitions (" Inst" );
1638
1638
SmallVector<std::unique_ptr<Intrinsic>, 128 > Defs;
1639
1639
for (auto *R : RV) {
1640
1640
createIntrinsic (R, Defs);
@@ -1662,7 +1662,7 @@ void SVEEmitter::createSMEBuiltins(raw_ostream &OS) {
1662
1662
}
1663
1663
1664
1664
void SVEEmitter::createSMECodeGenMap (raw_ostream &OS) {
1665
- std::vector<Record *> RV = Records.getAllDerivedDefinitions (" Inst" );
1665
+ std::vector<const Record *> RV = Records.getAllDerivedDefinitions (" Inst" );
1666
1666
SmallVector<std::unique_ptr<Intrinsic>, 128 > Defs;
1667
1667
for (auto *R : RV) {
1668
1668
createIntrinsic (R, Defs);
@@ -1696,7 +1696,7 @@ void SVEEmitter::createSMECodeGenMap(raw_ostream &OS) {
1696
1696
}
1697
1697
1698
1698
void SVEEmitter::createSMERangeChecks (raw_ostream &OS) {
1699
- std::vector<Record *> RV = Records.getAllDerivedDefinitions (" Inst" );
1699
+ std::vector<const Record *> RV = Records.getAllDerivedDefinitions (" Inst" );
1700
1700
SmallVector<std::unique_ptr<Intrinsic>, 128 > Defs;
1701
1701
for (auto *R : RV) {
1702
1702
createIntrinsic (R, Defs);
@@ -1733,7 +1733,7 @@ void SVEEmitter::createSMERangeChecks(raw_ostream &OS) {
1733
1733
}
1734
1734
1735
1735
void SVEEmitter::createBuiltinZAState (raw_ostream &OS) {
1736
- std::vector<Record *> RV = Records.getAllDerivedDefinitions (" Inst" );
1736
+ std::vector<const Record *> RV = Records.getAllDerivedDefinitions (" Inst" );
1737
1737
SmallVector<std::unique_ptr<Intrinsic>, 128 > Defs;
1738
1738
for (auto *R : RV)
1739
1739
createIntrinsic (R, Defs);
@@ -1773,7 +1773,7 @@ void SVEEmitter::createBuiltinZAState(raw_ostream &OS) {
1773
1773
}
1774
1774
1775
1775
void SVEEmitter::createStreamingAttrs (raw_ostream &OS, ACLEKind Kind) {
1776
- std::vector<Record *> RV = Records.getAllDerivedDefinitions (" Inst" );
1776
+ std::vector<const Record *> RV = Records.getAllDerivedDefinitions (" Inst" );
1777
1777
SmallVector<std::unique_ptr<Intrinsic>, 128 > Defs;
1778
1778
for (auto *R : RV)
1779
1779
createIntrinsic (R, Defs);
@@ -1826,55 +1826,55 @@ void SVEEmitter::createStreamingAttrs(raw_ostream &OS, ACLEKind Kind) {
1826
1826
}
1827
1827
1828
1828
namespace clang {
1829
- void EmitSveHeader (RecordKeeper &Records, raw_ostream &OS) {
1829
+ void EmitSveHeader (const RecordKeeper &Records, raw_ostream &OS) {
1830
1830
SVEEmitter (Records).createHeader (OS);
1831
1831
}
1832
1832
1833
- void EmitSveBuiltins (RecordKeeper &Records, raw_ostream &OS) {
1833
+ void EmitSveBuiltins (const RecordKeeper &Records, raw_ostream &OS) {
1834
1834
SVEEmitter (Records).createBuiltins (OS);
1835
1835
}
1836
1836
1837
- void EmitSveBuiltinCG (RecordKeeper &Records, raw_ostream &OS) {
1837
+ void EmitSveBuiltinCG (const RecordKeeper &Records, raw_ostream &OS) {
1838
1838
SVEEmitter (Records).createCodeGenMap (OS);
1839
1839
}
1840
1840
1841
- void EmitSveRangeChecks (RecordKeeper &Records, raw_ostream &OS) {
1841
+ void EmitSveRangeChecks (const RecordKeeper &Records, raw_ostream &OS) {
1842
1842
SVEEmitter (Records).createRangeChecks (OS);
1843
1843
}
1844
1844
1845
- void EmitSveTypeFlags (RecordKeeper &Records, raw_ostream &OS) {
1845
+ void EmitSveTypeFlags (const RecordKeeper &Records, raw_ostream &OS) {
1846
1846
SVEEmitter (Records).createTypeFlags (OS);
1847
1847
}
1848
1848
1849
- void EmitImmCheckTypes (RecordKeeper &Records, raw_ostream &OS) {
1849
+ void EmitImmCheckTypes (const RecordKeeper &Records, raw_ostream &OS) {
1850
1850
SVEEmitter (Records).createImmCheckTypes (OS);
1851
1851
}
1852
1852
1853
- void EmitSveStreamingAttrs (RecordKeeper &Records, raw_ostream &OS) {
1853
+ void EmitSveStreamingAttrs (const RecordKeeper &Records, raw_ostream &OS) {
1854
1854
SVEEmitter (Records).createStreamingAttrs (OS, ACLEKind::SVE);
1855
1855
}
1856
1856
1857
- void EmitSmeHeader (RecordKeeper &Records, raw_ostream &OS) {
1857
+ void EmitSmeHeader (const RecordKeeper &Records, raw_ostream &OS) {
1858
1858
SVEEmitter (Records).createSMEHeader (OS);
1859
1859
}
1860
1860
1861
- void EmitSmeBuiltins (RecordKeeper &Records, raw_ostream &OS) {
1861
+ void EmitSmeBuiltins (const RecordKeeper &Records, raw_ostream &OS) {
1862
1862
SVEEmitter (Records).createSMEBuiltins (OS);
1863
1863
}
1864
1864
1865
- void EmitSmeBuiltinCG (RecordKeeper &Records, raw_ostream &OS) {
1865
+ void EmitSmeBuiltinCG (const RecordKeeper &Records, raw_ostream &OS) {
1866
1866
SVEEmitter (Records).createSMECodeGenMap (OS);
1867
1867
}
1868
1868
1869
- void EmitSmeRangeChecks (RecordKeeper &Records, raw_ostream &OS) {
1869
+ void EmitSmeRangeChecks (const RecordKeeper &Records, raw_ostream &OS) {
1870
1870
SVEEmitter (Records).createSMERangeChecks (OS);
1871
1871
}
1872
1872
1873
- void EmitSmeStreamingAttrs (RecordKeeper &Records, raw_ostream &OS) {
1873
+ void EmitSmeStreamingAttrs (const RecordKeeper &Records, raw_ostream &OS) {
1874
1874
SVEEmitter (Records).createStreamingAttrs (OS, ACLEKind::SME);
1875
1875
}
1876
1876
1877
- void EmitSmeBuiltinZAState (RecordKeeper &Records, raw_ostream &OS) {
1877
+ void EmitSmeBuiltinZAState (const RecordKeeper &Records, raw_ostream &OS) {
1878
1878
SVEEmitter (Records).createBuiltinZAState (OS);
1879
1879
}
1880
1880
} // End namespace clang
0 commit comments