[DSE,MSSA] Skip checking write clobber for DomAccess (NFC).

There is no need to check if the starting access for is a write clobber
and all of its uses have already been checked.
This commit is contained in:
Florian Hahn 2020-04-23 20:37:26 +01:00
parent e4175ff525
commit 44ce588670
1 changed files with 3 additions and 3 deletions

View File

@ -1707,11 +1707,11 @@ struct DSEState {
return None;
}
// For the KillingDef we only have to check if it reads the memory
// location.
// For the KillingDef and DomAccess we only have to check if it reads the
// memory location.
// TODO: It would probably be better to check for self-reads before
// calling the function.
if (KillingDef == UseAccess)
if (KillingDef == UseAccess || DomAccess == UseAccess)
continue;
// Check all uses for MemoryDefs, except for defs completely overwriting