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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174914 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Hal Finkel 2013-02-11 23:02:09 +00:00
parent 86f18eb0b3
commit 8f3359a4b3

View File

@ -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));
}
}
}