summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2012-11-14 19:53:27 +0000
committerHal Finkel <hfinkel@anl.gov>2012-11-14 19:53:27 +0000
commit97d19ebe5b5bf27617e536a16fa232116cefe914 (patch)
tree02be0e455a33b67fdd220bbb9faf3fe05eb378ca /lib/Transforms
parentc7d180257c3d095a3c888b0b6648132a53f40ef1 (diff)
downloadllvm-97d19ebe5b5bf27617e536a16fa232116cefe914.tar.gz
llvm-97d19ebe5b5bf27617e536a16fa232116cefe914.tar.bz2
llvm-97d19ebe5b5bf27617e536a16fa232116cefe914.tar.xz
Replace std::vector -> SmallVector in BBVectorize
For now, this uses 8 on-stack elements. I'll need to do some profiling to see if this is the best number. Pointed out by Jakob in post-commit review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167966 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Vectorize/BBVectorize.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/Vectorize/BBVectorize.cpp b/lib/Transforms/Vectorize/BBVectorize.cpp
index e880acfa87..dacbc7f242 100644
--- a/lib/Transforms/Vectorize/BBVectorize.cpp
+++ b/lib/Transforms/Vectorize/BBVectorize.cpp
@@ -1485,7 +1485,7 @@ namespace {
PrunedTree.insert(QTop.first);
// Visit each child, pruning as necessary...
- std::vector<ValuePairWithDepth> BestChildren;
+ SmallVector<ValuePairWithDepth, 8> BestChildren;
VPPIteratorPair QTopRange = ConnectedPairs.equal_range(QTop.first);
for (std::multimap<ValuePair, ValuePair>::iterator K = QTopRange.first;
K != QTopRange.second; ++K) {
@@ -1517,7 +1517,7 @@ namespace {
DenseSet<ValuePair> CurrentPairs;
bool CanAdd = true;
- for (std::vector<ValuePairWithDepth>::iterator C2
+ for (SmallVector<ValuePairWithDepth, 8>::iterator C2
= BestChildren.begin(), E2 = BestChildren.end();
C2 != E2; ++C2) {
if (C2->first.first == C->first.first ||
@@ -1602,7 +1602,7 @@ namespace {
// to an already-selected child. Check for this here, and if a
// conflict is found, then remove the previously-selected child
// before adding this one in its place.
- for (std::vector<ValuePairWithDepth>::iterator C2
+ for (SmallVector<ValuePairWithDepth, 8>::iterator C2
= BestChildren.begin(); C2 != BestChildren.end();) {
if (C2->first.first == C->first.first ||
C2->first.first == C->first.second ||
@@ -1617,7 +1617,7 @@ namespace {
BestChildren.push_back(ValuePairWithDepth(C->first, C->second));
}
- for (std::vector<ValuePairWithDepth>::iterator C
+ for (SmallVector<ValuePairWithDepth, 8>::iterator C
= BestChildren.begin(), E2 = BestChildren.end();
C != E2; ++C) {
size_t DepthF = getDepthFactor(C->first.first);