[llvm] [DSE] Apply initializes attribute to DSE (PR #107282)
    Antonio Frighetto via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Oct 21 18:11:54 PDT 2024
    
    
  
================
@@ -1602,7 +1665,16 @@ struct DSEState {
 
       // Uses which may read the original MemoryDef mean we cannot eliminate the
       // original MD. Stop walk.
-      if (isReadClobber(MaybeDeadLoc, UseInst)) {
+      // If KillingDef is a CallInst with "initializes" attribute, the reads in
+      // Callee would be dominated by initializations, so this should be safe.
----------------
antoniofrighetto wrote:
```suggestion
      // the callee would be dominated by initializations, so this should be safe.
```
https://github.com/llvm/llvm-project/pull/107282
    
    
More information about the llvm-commits
mailing list