summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-02-11 23:02:09 +0000
committerHal Finkel <hfinkel@anl.gov>2013-02-11 23:02:09 +0000
commit39a95032d2522970d482f0588335f4595d8dcee2 (patch)
treea34902176af828e53a99606884e6c0b3b0c239f5
parent08834518adfba0800a1dd0c6d5ecf5f646afe8b2 (diff)
downloadbcm5719-llvm-39a95032d2522970d482f0588335f4595d8dcee2.tar.gz
bcm5719-llvm-39a95032d2522970d482f0588335f4595d8dcee2.zip
BBVectorize: Omit unnecessary entries in PairableInstUsers
This map is queried only for instructions in pairs of pairable instructions; so make sure that only pairs of pairable instructions are added to the map. This gives a 3.5% speedup on the csa.ll test case from PR15222. No functionality change intended. llvm-svn: 174914
-rw-r--r--llvm/lib/Transforms/Vectorize/BBVectorize.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Vectorize/BBVectorize.cpp b/llvm/lib/Transforms/Vectorize/BBVectorize.cpp
index bf8fca06ff5..b14d91dd8e6 100644
--- a/llvm/lib/Transforms/Vectorize/BBVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/BBVectorize.cpp
@@ -1390,8 +1390,10 @@ namespace {
(void) trackUsesOfI(Users, WriteSet, I, J);
for (DenseSet<Value *>::iterator U = Users.begin(), E = Users.end();
- U != E; ++U)
+ U != E; ++U) {
+ if (IsInPair.find(*U) == IsInPair.end()) continue;
PairableInstUsers.insert(ValuePair(I, *U));
+ }
}
}
OpenPOWER on IntegriCloud