[llvm] r328139 - [TableGen] Remove unnecessary map lookup and shadowing of a variable. NFCI
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 21 12:30:33 PDT 2018
Author: ctopper
Date: Wed Mar 21 12:30:33 2018
New Revision: 328139
URL: http://llvm.org/viewvc/llvm-project?rev=328139&view=rev
Log:
[TableGen] Remove unnecessary map lookup and shadowing of a variable. NFCI
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.
Modified:
llvm/trunk/utils/TableGen/CodeGenSchedule.cpp
Modified: llvm/trunk/utils/TableGen/CodeGenSchedule.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenSchedule.cpp?rev=328139&r1=328138&r2=328139&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenSchedule.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenSchedule.cpp Wed Mar 21 12:30:33 2018
@@ -805,7 +805,6 @@ void CodeGenSchedModels::createInstRWCla
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) {
More information about the llvm-commits
mailing list