mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-09 12:04:02 +00:00
[TableGen] Move calls to getValueAsInt out of a loop since they aren't simple functions. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257579 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8bb7acb4c1
commit
ced4b139cd
@ -1090,10 +1090,11 @@ void AsmWriterEmitter::EmitPrintAliasInstruction(raw_ostream &O) {
|
||||
|
||||
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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user