[llvm] [DSE] Apply initializes attribute to DSE (PR #107282)

Jan Voung via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 5 07:56:54 PDT 2024


================
@@ -911,7 +1020,8 @@ struct DSEState {
 
         auto *MD = dyn_cast_or_null<MemoryDef>(MA);
         if (MD && MemDefs.size() < MemorySSADefsPerBlockLimit &&
-            (getLocForWrite(&I) || isMemTerminatorInst(&I)))
+            (getLocForWrite(&I) || isMemTerminatorInst(&I) ||
+             HasInitializesAttr(&I)))
----------------
jvoung wrote:

should this check the EnableInitializesImprovement before considering HasInitializesAttr ?

https://github.com/llvm/llvm-project/pull/107282


More information about the llvm-commits mailing list