summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2012-04-19 17:52:34 +0000
committerJim Grosbach <grosbach@apple.com>2012-04-19 17:52:34 +0000
commita37e2295d4572cb1b7cdb08e57688b564d1f5f51 (patch)
tree69e6c862f43ac74e2d00c4bee6d675cac1e1073b
parent8c2beaac8bf144d06517153d1c0ed073ae3123c8 (diff)
downloadbcm5719-llvm-a37e2295d4572cb1b7cdb08e57688b564d1f5f51.tar.gz
bcm5719-llvm-a37e2295d4572cb1b7cdb08e57688b564d1f5f51.zip
Use a SmallVector instead of std::vector for ResOperands.
There's almost always a small number of instruction operands, so use a SmallVector and save on heap allocations. llvm-svn: 155143
-rw-r--r--llvm/utils/TableGen/AsmMatcherEmitter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
index 676211d3125..1b7f67e83a4 100644
--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
@@ -385,7 +385,7 @@ struct MatchableInfo {
/// ResOperands - This is the operand list that should be built for the result
/// MCInst.
- std::vector<ResOperand> ResOperands;
+ SmallVector<ResOperand, 8> ResOperands;
/// AsmString - The assembly string for this instruction (with variants
/// removed), e.g. "movsx $src, $dst".
@@ -399,7 +399,7 @@ struct MatchableInfo {
/// annotated with a class and where in the OperandList they were defined.
/// This directly corresponds to the tokenized AsmString after the mnemonic is
/// removed.
- SmallVector<AsmOperand, 4> AsmOperands;
+ SmallVector<AsmOperand, 8> AsmOperands;
/// Predicates - The required subtarget features to match this instruction.
SmallVector<SubtargetFeatureInfo*, 4> RequiredFeatures;
OpenPOWER on IntegriCloud