diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-02-15 22:48:32 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-02-15 22:48:32 +0000 |
| commit | af6094fe3ff6efa3f3db7916b72bd172fe7a9484 (patch) | |
| tree | 67fc6ff7798ea6e6c2b388ba3e49376e418a3c69 /llvm/lib/Transforms/Scalar/InstructionCombining.cpp | |
| parent | 0c182a48e49fe54abb002fdf21d64241891e3dfc (diff) | |
| download | bcm5719-llvm-af6094fe3ff6efa3f3db7916b72bd172fe7a9484.tar.gz bcm5719-llvm-af6094fe3ff6efa3f3db7916b72bd172fe7a9484.zip | |
change some vectors to smallvectors. This speeds up instcombine on 447.dealII
by 5%.
llvm-svn: 34332
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index b5576179986..1ef5d2a7a48 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -7748,9 +7748,9 @@ Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) { // is a getelementptr instruction, combine the indices of the two // getelementptr instructions into a single instruction. // - std::vector<Value*> SrcGEPOperands; + SmallVector<Value*, 8> SrcGEPOperands; if (User *Src = dyn_castGetElementPtr(PtrOp)) - SrcGEPOperands.assign(Src->op_begin(), Src->op_end()); + SrcGEPOperands.append(Src->op_begin(), Src->op_end()); if (!SrcGEPOperands.empty()) { // Note that if our source is a gep chain itself that we wait for that @@ -7761,7 +7761,7 @@ Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) { cast<Instruction>(SrcGEPOperands[0])->getNumOperands() == 2) return 0; // Wait until our source is folded to completion. - std::vector<Value *> Indices; + SmallVector<Value*, 8> Indices; // Find out whether the last index in the source GEP is a sequential idx. bool EndsWithSequential = false; |

