Skip to content

Commit 0afbefa

Browse files
[TableGen] Avoid repeated hash lookups (NFC) (llvm#126190)
1 parent 80a4718 commit 0afbefa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/utils/TableGen/AsmWriterEmitter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -967,12 +967,11 @@ void AsmWriterEmitter::EmitPrintAliasInstruction(raw_ostream &O) {
967967
IAP.addOperand(ROName, MIOpNum, PrintMethodIdx);
968968

969969
// There might be an additional predicate on the MCOperand
970-
unsigned Entry = MCOpPredicateMap[Rec];
970+
unsigned &Entry = MCOpPredicateMap[Rec];
971971
if (!Entry) {
972972
if (!Rec->isValueUnset("MCOperandPredicate")) {
973973
MCOpPredicates.push_back(Rec);
974974
Entry = MCOpPredicates.size();
975-
MCOpPredicateMap[Rec] = Entry;
976975
} else
977976
break; // No conditions on this operand at all
978977
}

0 commit comments

Comments
 (0)