summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2012-03-11 01:57:56 +0000
committerCraig Topper <craig.topper@gmail.com>2012-03-11 01:57:56 +0000
commit39bdc5526f9bb4985c5ea7711e603bb44707ed42 (patch)
tree3455da2b5d35524aaee7a653f2273a0d133aa4dd /utils
parentf522ce1f18726313058d81ba74ed8b44fa279d99 (diff)
downloadllvm-39bdc5526f9bb4985c5ea7711e603bb44707ed42.tar.gz
llvm-39bdc5526f9bb4985c5ea7711e603bb44707ed42.tar.bz2
llvm-39bdc5526f9bb4985c5ea7711e603bb44707ed42.tar.xz
Shrink and reorder some fields in MCOperandInfo to fit it in 8 bytes to reduce size of static tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152524 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/InstrInfoEmitter.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/TableGen/InstrInfoEmitter.cpp b/utils/TableGen/InstrInfoEmitter.cpp
index fc949f2388..43ff20373d 100644
--- a/utils/TableGen/InstrInfoEmitter.cpp
+++ b/utils/TableGen/InstrInfoEmitter.cpp
@@ -107,6 +107,11 @@ InstrInfoEmitter::GetOperandInfo(const CodeGenInstruction &Inst) {
if (Inst.Operands[i].Rec->isSubClassOf("OptionalDefOperand"))
Res += "|(1<<MCOI::OptionalDef)";
+ // Fill in operand type.
+ Res += ", MCOI::";
+ assert(!Inst.Operands[i].OperandType.empty() && "Invalid operand type.");
+ Res += Inst.Operands[i].OperandType;
+
// Fill in constraint info.
Res += ", ";
@@ -122,11 +127,6 @@ InstrInfoEmitter::GetOperandInfo(const CodeGenInstruction &Inst) {
" << 16) | (1 << MCOI::TIED_TO))";
}
- // Fill in operand type.
- Res += ", MCOI::";
- assert(!Inst.Operands[i].OperandType.empty() && "Invalid operand type.");
- Res += Inst.Operands[i].OperandType;
-
Result.push_back(Res);
}
}