[llvm] 13dae34 - [DSE] Enable the initializes improvement in DSE (#124058)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 15:51:09 PST 2025


Author: Haopeng Liu
Date: 2025-01-23T15:51:04-08:00
New Revision: 13dae34819e5ba2d7644f8486f1f291bf5836d48

URL: https://github.com/llvm/llvm-project/commit/13dae34819e5ba2d7644f8486f1f291bf5836d48
DIFF: https://github.com/llvm/llvm-project/commit/13dae34819e5ba2d7644f8486f1f291bf5836d48.diff

LOG: [DSE] Enable the initializes improvement in DSE (#124058)

(Retry) enable the initializes improvement in DSE.

Initially enabled in https://github.com/llvm/llvm-project/pull/119116.

Fix the aliasing issue through global variables in
https://github.com/llvm/llvm-project/pull/120044.

The compile-time comparison of this enabling (no meaningful diff):
https://llvm-compile-time-tracker.com/compare.php?from=b46fcb9fa32f24660b1b8858d5c4cbdb76ef9d8b&to=33dc817b81f7898c87b052d1ddfd3d6e6f5b5dbd&stat=instructions%3Au

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 241c57e88b447e..de15748ff06374 100644
--- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
@@ -164,9 +164,9 @@ static cl::opt<bool>
     OptimizeMemorySSA("dse-optimize-memoryssa", cl::init(true), cl::Hidden,
                       cl::desc("Allow DSE to optimize memory accesses."));
 
-// TODO: turn on and remove this flag.
+// TODO: remove this flag.
 static cl::opt<bool> EnableInitializesImprovement(
-    "enable-dse-initializes-attr-improvement", cl::init(false), cl::Hidden,
+    "enable-dse-initializes-attr-improvement", cl::init(true), cl::Hidden,
     cl::desc("Enable the initializes attr improvement in DSE"));
 
 //===----------------------------------------------------------------------===//


        


More information about the llvm-commits mailing list