[TableGen] Remove unnecessary map lookup and shadowing of a variable. NFCI
authorCraig Topper <craig.topper@intel.com>
Wed, 21 Mar 2018 19:30:33 +0000 (19:30 +0000)
committerCraig Topper <craig.topper@intel.com>
Wed, 21 Mar 2018 19:30:33 +0000 (19:30 +0000)
We already have an OldSCIdx variable in the outer loop here. And we already did the map lookup in the loop that populated ClassInstrs. And the outer OldSCIdx got it from ClassInstrs.

llvm-svn: 328139

llvm/utils/TableGen/CodeGenSchedule.cpp

index 1d02f138ae2ef3f846e990a65ba56a510f0ec36c..446a641abec7e76f8c8d8755bf2e8db11cc6e866 100644 (file)
@@ -805,7 +805,6 @@ void CodeGenSchedModels::createInstRWClass(Record *InstRWDef) {
     Record *RWModelDef = InstRWDef->getValueAsDef("SchedModel");
     SmallSet<unsigned, 4> RemappedClassIDs;
     for (Record *InstDef : InstDefs) {
-      unsigned OldSCIdx = InstrClassMap[InstDef];
       if (OldSCIdx && RemappedClassIDs.insert(OldSCIdx).second) {
         for (Record *OldRWDef : SchedClasses[OldSCIdx].InstRWs) {
           if (OldRWDef->getValueAsDef("SchedModel") == RWModelDef) {