[llvm] 44ce588 - [DSE, MSSA] Skip checking write clobber for DomAccess (NFC).

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 24 09:17:18 PDT 2020


Author: Florian Hahn
Date: 2020-04-24T17:16:22+01:00
New Revision: 44ce588670d093ba4385403d007ffbf4a195d9a7

URL: https://github.com/llvm/llvm-project/commit/44ce588670d093ba4385403d007ffbf4a195d9a7
DIFF: https://github.com/llvm/llvm-project/commit/44ce588670d093ba4385403d007ffbf4a195d9a7.diff

LOG: [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.

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
index 2939a875addf..68ef90bab9e1 100644
--- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
@@ -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


        


More information about the llvm-commits mailing list