[llvm] r174914 - BBVectorize: Omit unnecessary entries in PairableInstUsers
Hal Finkel
hfinkel at anl.gov
Mon Feb 11 15:02:09 PST 2013
Author: hfinkel
Date: Mon Feb 11 17:02:09 2013
New Revision: 174914
URL: http://llvm.org/viewvc/llvm-project?rev=174914&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp
Modified: llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp?rev=174914&r1=174913&r2=174914&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp Mon Feb 11 17:02:09 2013
@@ -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));
+ }
}
}
More information about the llvm-commits
mailing list