[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
sabre at nondot.org
Thu Feb 15 14:48:48 PST 2007
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.634 -> 1.635
---
Log message:
change some vectors to smallvectors. This speeds up instcombine on 447.dealII
by 5%.
---
Diffs of the changes: (+3 -3)
InstructionCombining.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.634 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.635
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.634 Thu Feb 15 13:41:52 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Thu Feb 15 16:48:32 2007
@@ -7748,9 +7748,9 @@
// 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 @@
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;
More information about the llvm-commits
mailing list