[MI] Reduce MachineInstr size (NFC)

Move CapOperands next to AsmPrinterFlags, to reduce size of
MachineInstr by 8 bytes.
This commit is contained in:
Nikita Popov 2020-04-15 22:40:08 +02:00
parent 0f1678cd08
commit 24cae17c28
1 changed files with 5 additions and 2 deletions

View File

@ -115,8 +115,6 @@ private:
// Operands are allocated by an ArrayRecycler.
MachineOperand *Operands = nullptr; // Pointer to the first operand.
unsigned NumOperands = 0; // Number of operands on instruction.
using OperandCapacity = ArrayRecycler<MachineOperand>::Capacity;
OperandCapacity CapOperands; // Capacity of the Operands array.
uint16_t Flags = 0; // Various bits of additional
// information about machine
@ -129,6 +127,11 @@ private:
// anything other than to convey comment
// information to AsmPrinter.
// OperandCapacity has uint8_t size, so it should be next to AsmPrinterFlags
// to properly pack.
using OperandCapacity = ArrayRecycler<MachineOperand>::Capacity;
OperandCapacity CapOperands; // Capacity of the Operands array.
/// Internal implementation detail class that provides out-of-line storage for
/// extra info used by the machine instruction when this info cannot be stored
/// in-line within the instruction itself.