[DSE,MSSA] Skip checking write clobber for DomAccess (NFC).
authorFlorian Hahn <flo@fhahn.com>
Thu, 23 Apr 2020 19:37:26 +0000 (20:37 +0100)
committerFlorian Hahn <flo@fhahn.com>
Fri, 24 Apr 2020 16:16:22 +0000 (17:16 +0100)
There is no need to check if the starting access for is a write clobber
and all of its uses have already been checked.

llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp

index 2939a87..68ef90b 100644 (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