From e8c60733b92e4c52382ffe95eec1d576f6655feb Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Thu, 19 Apr 2012 17:52:34 +0000 Subject: [PATCH] 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 --- utils/TableGen/AsmMatcherEmitter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp index 676211d3125..1b7f67e83a4 100644 --- a/utils/TableGen/AsmMatcherEmitter.cpp +++ b/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 ResOperands; + SmallVector 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 AsmOperands; + SmallVector AsmOperands; /// Predicates - The required subtarget features to match this instruction. SmallVector RequiredFeatures;