[llvm] ebe741f - [DSE] Enable initializes improvement (#119116)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 09:58:16 PST 2024
Author: Haopeng Liu
Date: 2024-12-10T09:58:13-08:00
New Revision: ebe741fad07e3fda388d0fa44f256a07429cce6a
URL: https://github.com/llvm/llvm-project/commit/ebe741fad07e3fda388d0fa44f256a07429cce6a
DIFF: https://github.com/llvm/llvm-project/commit/ebe741fad07e3fda388d0fa44f256a07429cce6a.diff
LOG: [DSE] Enable initializes improvement (#119116)
Tested with an internal search backend loadtest.
With `-ftrivial-auto-var-init`, this work has a 0.2%-0.3% total QPS
improvement.
Note that, the metric is total QPS instead of cpu-time, even 1%
improvement means a lot.
- Add the "initializes" attr:
https://github.com/llvm/llvm-project/pull/97373
- Apply the attr to DSE:
https://github.com/llvm/llvm-project/pull/107282
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 09e8301b772d96..778f83b7925691 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