[llvm] r257579 - [TableGen] Move calls to getValueAsInt out of a loop since they aren't simple functions. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 12 23:20:05 PST 2016
Author: ctopper
Date: Wed Jan 13 01:20:05 2016
New Revision: 257579
URL: http://llvm.org/viewvc/llvm-project?rev=257579&view=rev
Log:
[TableGen] Move calls to getValueAsInt out of a loop since they aren't simple functions. NFC
Modified:
llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
Modified: llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp?rev=257579&r1=257578&r2=257579&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Wed Jan 13 01:20:05 2016
@@ -1090,10 +1090,11 @@ void AsmWriterEmitter::EmitPrintAliasIns
AsmWriterEmitter::AsmWriterEmitter(RecordKeeper &R) : Records(R), Target(R) {
Record *AsmWriter = Target.getAsmWriter();
+ unsigned Variant = AsmWriter->getValueAsInt("Variant");
+ unsigned PassSubtarget = AsmWriter->getValueAsInt("PassSubtarget");
for (const CodeGenInstruction *I : Target.instructions())
if (!I->AsmString.empty() && I->TheDef->getName() != "PHI")
- Instructions.emplace_back(*I, AsmWriter->getValueAsInt("Variant"),
- AsmWriter->getValueAsInt("PassSubtarget"));
+ Instructions.emplace_back(*I, Variant, PassSubtarget);
// Get the instruction numbering.
NumberedInstructions = &Target.getInstructionsByEnumValue();
More information about the llvm-commits
mailing list