Skip to content

Commit a207f60

Browse files
[TableGen] Avoid repeated hash lookups (NFC) (#125635)
1 parent 7fb8285 commit a207f60

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/utils/TableGen/Common/CodeGenTarget.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,9 @@ void CodeGenTarget::ReadInstructions() const {
262262

263263
// Parse the instructions defined in the .td file.
264264
for (const Record *R : Insts) {
265-
Instructions[R] = std::make_unique<CodeGenInstruction>(R);
266-
if (Instructions[R]->isVariableLengthEncoding())
265+
auto &Inst = Instructions[R];
266+
Inst = std::make_unique<CodeGenInstruction>(R);
267+
if (Inst->isVariableLengthEncoding())
267268
HasVariableLengthEncodings = true;
268269
}
269270
}

0 commit comments

Comments
 (0)