mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-01 02:33:44 +00:00
Avoid an extra hash lookup when inserting a value into the widen map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166395 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ffe5008fd3
commit
5bb5a75b1e
@ -398,13 +398,13 @@ bool LoopVectorizationLegality::isConsecutiveGep(Value *Ptr) {
|
||||
Value *SingleBlockLoopVectorizer::getVectorValue(Value *V) {
|
||||
assert(!V->getType()->isVectorTy() && "Can't widen a vector");
|
||||
// If we saved a vectorized copy of V, use it.
|
||||
ValueMap::iterator it = WidenMap.find(V);
|
||||
if (it != WidenMap.end())
|
||||
return it->second;
|
||||
Value *&MapEntry = WidenMap[V];
|
||||
if (MapEntry)
|
||||
return MapEntry;
|
||||
|
||||
// Broadcast V and save the value for future uses.
|
||||
Value *B = getBroadcastInstrs(V);
|
||||
WidenMap[V] = B;
|
||||
MapEntry = B;
|
||||
return B;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user