@@ -63,8 +63,8 @@ static bool isExplicitUnalign(const CodeGenInstruction *Inst) {
63
63
}
64
64
65
65
class X86FoldTablesEmitter {
66
- RecordKeeper &Records;
67
- CodeGenTarget Target;
66
+ const RecordKeeper &Records;
67
+ const CodeGenTarget Target;
68
68
69
69
// Represents an entry in the folding table
70
70
class X86FoldTableEntry {
@@ -196,7 +196,7 @@ class X86FoldTablesEmitter {
196
196
FoldTable BroadcastTable4;
197
197
198
198
public:
199
- X86FoldTablesEmitter (RecordKeeper &R) : Records(R), Target(R) {}
199
+ X86FoldTablesEmitter (const RecordKeeper &R) : Records(R), Target(R) {}
200
200
201
201
// run - Generate the 6 X86 memory fold tables.
202
202
void run (raw_ostream &OS);
@@ -670,7 +670,7 @@ void X86FoldTablesEmitter::run(raw_ostream &OS) {
670
670
// added into memory fold tables.
671
671
auto RegInstsForBroadcast = RegInsts;
672
672
673
- Record *AsmWriter = Target.getAsmWriter ();
673
+ const Record *AsmWriter = Target.getAsmWriter ();
674
674
unsigned Variant = AsmWriter->getValueAsInt (" Variant" );
675
675
auto FixUp = [&](const CodeGenInstruction *RegInst) {
676
676
StringRef RegInstName = RegInst->TheDef ->getName ();
@@ -721,8 +721,8 @@ void X86FoldTablesEmitter::run(raw_ostream &OS) {
721
721
722
722
// Add the manually mapped instructions listed above.
723
723
for (const ManualMapEntry &Entry : ManualMapSet) {
724
- Record *RegInstIter = Records.getDef (Entry.RegInstStr );
725
- Record *MemInstIter = Records.getDef (Entry.MemInstStr );
724
+ const Record *RegInstIter = Records.getDef (Entry.RegInstStr );
725
+ const Record *MemInstIter = Records.getDef (Entry.MemInstStr );
726
726
727
727
updateTables (&(Target.getInstruction (RegInstIter)),
728
728
&(Target.getInstruction (MemInstIter)), Entry.Strategy , true );
0 commit comments