@@ -1279,10 +1279,6 @@ struct DSEState {
1279
1279
if (CB->onlyAccessesInaccessibleMemory ())
1280
1280
return false ;
1281
1281
1282
- // NOTE: For calls, the number of stores removed could be slightly improved
1283
- // by using AA.callCapturesBefore(UseInst, DefLoc, &DT), but that showed to
1284
- // be expensive compared to the benefits in practice. For now, avoid more
1285
- // expensive analysis to limit compile-time.
1286
1282
return isRefSet (BatchAA.getModRefInfo (UseInst, DefLoc));
1287
1283
}
1288
1284
@@ -1793,7 +1789,7 @@ struct DSEState {
1793
1789
// uncommon. If it turns out to be important, we can use
1794
1790
// getUnderlyingObjects here instead.
1795
1791
const Value *UO = getUnderlyingObject (DefLoc->Ptr );
1796
- if (!UO || ! isInvisibleToCallerAfterRet (UO))
1792
+ if (!isInvisibleToCallerAfterRet (UO))
1797
1793
continue ;
1798
1794
1799
1795
if (isWriteAtEndOfFunction (Def)) {
@@ -1965,9 +1961,7 @@ static bool eliminateDeadStores(Function &F, AliasAnalysis &AA, MemorySSA &MSSA,
1965
1961
unsigned PartialLimit = MemorySSAPartialStoreLimit;
1966
1962
// Worklist of MemoryAccesses that may be killed by KillingDef.
1967
1963
SetVector<MemoryAccess *> ToCheck;
1968
-
1969
- if (KillingUndObj)
1970
- ToCheck.insert (KillingDef->getDefiningAccess ());
1964
+ ToCheck.insert (KillingDef->getDefiningAccess ());
1971
1965
1972
1966
bool Shortend = false ;
1973
1967
bool IsMemTerm = State.isMemTerminatorInst (KillingI);
0 commit comments