[llvm-branch-commits] [llvm-branch] r168012 - in /llvm/branches/release_32: ./ lib/Transforms/Vectorize/BBVectorize.cpp
Hal Finkel
hfinkel at anl.gov
Wed Nov 14 16:34:29 PST 2012
Author: hfinkel
Date: Wed Nov 14 18:34:28 2012
New Revision: 168012
URL: http://llvm.org/viewvc/llvm-project?rev=168012&view=rev
Log:
Merge r167942, r167966 to fix non-deterministic behavior in BBVectorize
Modified:
llvm/branches/release_32/ (props changed)
llvm/branches/release_32/lib/Transforms/Vectorize/BBVectorize.cpp
Propchange: llvm/branches/release_32/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Nov 14 18:34:28 2012
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,167731,167743,167750,167784,167811,167817
+/llvm/trunk:155241,167731,167743,167750,167784,167811,167817,167942,167966
Modified: llvm/branches/release_32/lib/Transforms/Vectorize/BBVectorize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_32/lib/Transforms/Vectorize/BBVectorize.cpp?rev=168012&r1=168011&r2=168012&view=diff
==============================================================================
--- llvm/branches/release_32/lib/Transforms/Vectorize/BBVectorize.cpp (original)
+++ llvm/branches/release_32/lib/Transforms/Vectorize/BBVectorize.cpp Wed Nov 14 18:34:28 2012
@@ -1485,7 +1485,7 @@
PrunedTree.insert(QTop.first);
// Visit each child, pruning as necessary...
- DenseMap<ValuePair, size_t> 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 @@
DenseSet<ValuePair> CurrentPairs;
bool CanAdd = true;
- for (DenseMap<ValuePair, size_t>::iterator C2
+ for (SmallVector<ValuePairWithDepth, 8>::iterator C2
= BestChildren.begin(), E2 = BestChildren.end();
C2 != E2; ++C2) {
if (C2->first.first == C->first.first ||
@@ -1602,22 +1602,22 @@
// 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 (DenseMap<ValuePair, size_t>::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 ||
C2->first.second == C->first.first ||
C2->first.second == C->first.second ||
pairsConflict(C2->first, C->first, PairableInstUsers))
- BestChildren.erase(C2++);
+ C2 = BestChildren.erase(C2);
else
++C2;
}
- BestChildren.insert(ValuePairWithDepth(C->first, C->second));
+ BestChildren.push_back(ValuePairWithDepth(C->first, C->second));
}
- for (DenseMap<ValuePair, size_t>::iterator C
+ for (SmallVector<ValuePairWithDepth, 8>::iterator C
= BestChildren.begin(), E2 = BestChildren.end();
C != E2; ++C) {
size_t DepthF = getDepthFactor(C->first.first);
More information about the llvm-branch-commits
mailing list