@@ -134,7 +134,7 @@ struct InstRegexOp : public SetTheory::Operator {
134134
135135 // The generic opcodes are unsorted, handle them manually.
136136 for (auto *Inst : Generics) {
137- StringRef InstName = Inst->TheDef -> getName ();
137+ StringRef InstName = Inst->getName ();
138138 if (InstName.starts_with (Prefix) &&
139139 (!Regexpr || Regexpr->match (InstName.substr (Prefix.size ())))) {
140140 Elts.insert (Inst->TheDef );
@@ -147,11 +147,10 @@ struct InstRegexOp : public SetTheory::Operator {
147147 // sorted by name. Find the sub-ranges that start with our prefix.
148148 struct Comp {
149149 bool operator ()(const CodeGenInstruction *LHS, StringRef RHS) {
150- return LHS->TheDef -> getName () < RHS;
150+ return LHS->getName () < RHS;
151151 }
152152 bool operator ()(StringRef LHS, const CodeGenInstruction *RHS) {
153- return LHS < RHS->TheDef ->getName () &&
154- !RHS->TheDef ->getName ().starts_with (LHS);
153+ return LHS < RHS->getName () && !RHS->getName ().starts_with (LHS);
155154 }
156155 };
157156 auto Range1 =
@@ -162,7 +161,7 @@ struct InstRegexOp : public SetTheory::Operator {
162161 // For these ranges we know that instruction names start with the prefix.
163162 // Check if there's a regex that needs to be checked.
164163 const auto HandleNonGeneric = [&](const CodeGenInstruction *Inst) {
165- StringRef InstName = Inst->TheDef -> getName ();
164+ StringRef InstName = Inst->getName ();
166165 if (!Regexpr || Regexpr->match (InstName.substr (Prefix.size ()))) {
167166 Elts.insert (Inst->TheDef );
168167 NumMatches++;
@@ -862,12 +861,12 @@ void CodeGenSchedModels::collectSchedClasses() {
862861 dbgs ()
863862 << " \n +++ ITINERARIES and/or MACHINE MODELS (collectSchedClasses) +++\n " );
864863 for (const CodeGenInstruction *Inst : Target.getInstructions ()) {
865- StringRef InstName = Inst->TheDef -> getName ();
864+ StringRef InstName = Inst->getName ();
866865 unsigned SCIdx = getSchedClassIdx (*Inst);
867866 if (!SCIdx) {
868867 LLVM_DEBUG ({
869868 if (!Inst->hasNoSchedulingInfo )
870- dbgs () << " No machine model for " << Inst->TheDef -> getName () << ' \n ' ;
869+ dbgs () << " No machine model for " << Inst->getName () << ' \n ' ;
871870 });
872871 continue ;
873872 }
@@ -916,7 +915,7 @@ void CodeGenSchedModels::collectSchedClasses() {
916915 if (!llvm::is_contained (ProcIndices, 0 )) {
917916 for (const CodeGenProcModel &PM : ProcModels) {
918917 if (!llvm::is_contained (ProcIndices, PM.Index ))
919- dbgs () << " No machine model for " << Inst->TheDef -> getName ()
918+ dbgs () << " No machine model for " << Inst->getName ()
920919 << " on processor " << PM.ModelName << ' \n ' ;
921920 }
922921 }
@@ -1932,7 +1931,7 @@ void CodeGenSchedModels::checkCompleteness() {
19321931 if (Inst->TheDef ->isValueUnset (" SchedRW" )) {
19331932 PrintError (Inst->TheDef ->getLoc (),
19341933 " No schedule information for instruction '" +
1935- Inst->TheDef -> getName () + " ' in SchedMachineModel '" +
1934+ Inst->getName () + " ' in SchedMachineModel '" +
19361935 ProcModel.ModelDef ->getName () + " '" );
19371936 Complete = false ;
19381937 }
@@ -1953,7 +1952,7 @@ void CodeGenSchedModels::checkCompleteness() {
19531952 if (I == InstRWs.end ()) {
19541953 PrintError (Inst->TheDef ->getLoc (), " '" + ProcModel.ModelName +
19551954 " ' lacks information for '" +
1956- Inst->TheDef -> getName () + " '" );
1955+ Inst->getName () + " '" );
19571956 Complete = false ;
19581957 }
19591958 }
0 commit comments