mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
Fixes for post-commit review comments on r277480
llvm-svn: 277510
This commit is contained in:
parent
9c298de15a
commit
25c482560c
@ -1113,15 +1113,14 @@ public:
|
|||||||
|
|
||||||
if (IsCall)
|
if (IsCall)
|
||||||
return CS.getCalledValue() == Other.CS.getCalledValue();
|
return CS.getCalledValue() == Other.CS.getCalledValue();
|
||||||
else
|
return Loc == Other.Loc;
|
||||||
return Loc == Other.Loc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// FIXME: MSVC 2013 does not properly implement C++11 union rules, once we
|
// FIXME: MSVC 2013 does not properly implement C++11 union rules, once we
|
||||||
// require newer versions, this should be made an anonymous union again.
|
// require newer versions, this should be made an anonymous union again.
|
||||||
ImmutableCallSite CS;
|
ImmutableCallSite CS;
|
||||||
MemoryLocation Loc;
|
MemoryLocation Loc;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <> struct DenseMapInfo<MemoryLocOrCall> {
|
template <> struct DenseMapInfo<MemoryLocOrCall> {
|
||||||
@ -1136,10 +1135,8 @@ template <> struct DenseMapInfo<MemoryLocOrCall> {
|
|||||||
return hash_combine(MLOC.IsCall,
|
return hash_combine(MLOC.IsCall,
|
||||||
DenseMapInfo<const Value *>::getHashValue(
|
DenseMapInfo<const Value *>::getHashValue(
|
||||||
MLOC.getCS().getCalledValue()));
|
MLOC.getCS().getCalledValue()));
|
||||||
else
|
return hash_combine(
|
||||||
return hash_combine(
|
MLOC.IsCall, DenseMapInfo<MemoryLocation>::getHashValue(MLOC.getLoc()));
|
||||||
MLOC.IsCall,
|
|
||||||
DenseMapInfo<MemoryLocation>::getHashValue(MLOC.getLoc()));
|
|
||||||
}
|
}
|
||||||
static bool isEqual(const MemoryLocOrCall &LHS, const MemoryLocOrCall &RHS) {
|
static bool isEqual(const MemoryLocOrCall &LHS, const MemoryLocOrCall &RHS) {
|
||||||
return LHS == RHS;
|
return LHS == RHS;
|
||||||
@ -1243,7 +1240,7 @@ void MemorySSA::OptimizeUses::optimizeUsesInBlock(
|
|||||||
|
|
||||||
MemoryLocOrCall UseMLOC(MU);
|
MemoryLocOrCall UseMLOC(MU);
|
||||||
auto &LocInfo = LocStackInfo[UseMLOC];
|
auto &LocInfo = LocStackInfo[UseMLOC];
|
||||||
// If the pop epoch changed, if means we've removed stuff from top of
|
// If the pop epoch changed, it means we've removed stuff from top of
|
||||||
// stack due to changing blocks. We may have to reset the lower bound or
|
// stack due to changing blocks. We may have to reset the lower bound or
|
||||||
// last kill info.
|
// last kill info.
|
||||||
if (LocInfo.PopEpoch != PopEpoch) {
|
if (LocInfo.PopEpoch != PopEpoch) {
|
||||||
@ -1280,9 +1277,10 @@ void MemorySSA::OptimizeUses::optimizeUsesInBlock(
|
|||||||
unsigned long UpperBound = VersionStack.size() - 1;
|
unsigned long UpperBound = VersionStack.size() - 1;
|
||||||
|
|
||||||
if (UpperBound - LocInfo.LowerBound > MaxCheckLimit) {
|
if (UpperBound - LocInfo.LowerBound > MaxCheckLimit) {
|
||||||
DEBUG(dbgs() << "We are being asked to check up to "
|
DEBUG(dbgs() << "MemorySSA skipping optimization of " << *MU << " ("
|
||||||
<< UpperBound - LocInfo.LowerBound
|
<< *(MU->getMemoryInst()) << ")"
|
||||||
<< " loads and stores, so we didn't.\n");
|
<< " because there are " << UpperBound - LocInfo.LowerBound
|
||||||
|
<< " stores to disambiguate\n");
|
||||||
// Because we did not walk, LastKill is no longer valid, as this may
|
// Because we did not walk, LastKill is no longer valid, as this may
|
||||||
// have been a kill.
|
// have been a kill.
|
||||||
LocInfo.LastKillValid = false;
|
LocInfo.LastKillValid = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user