[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 1d02f13..446a641 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) {