[DSE] Only query object size for identified objects
This is supposed to be a fast heuristic primarily interested in allocas. We should not call it for non-root objects where object size needs to be determined recursively.
This commit is contained in:
@@ -949,7 +949,8 @@ struct DSEState {
|
||||
|
||||
// Check whether the killing store overwrites the whole object, in which
|
||||
// case the size/offset of the dead store does not matter.
|
||||
if (DeadUndObj == KillingUndObj && KillingLocSize.isPrecise()) {
|
||||
if (DeadUndObj == KillingUndObj && KillingLocSize.isPrecise() &&
|
||||
isIdentifiedObject(KillingUndObj)) {
|
||||
uint64_t KillingUndObjSize = getPointerSize(KillingUndObj, DL, TLI, &F);
|
||||
if (KillingUndObjSize != MemoryLocation::UnknownSize &&
|
||||
KillingUndObjSize == KillingLocSize.getValue())
|
||||
|
||||
Reference in New Issue
Block a user