[PATCH] D89650: [DSE] Remove noop stores after killing stores for a MemoryDef.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 18 10:19:08 PDT 2020


fhahn created this revision.
fhahn added reviewers: asbirlea, george.burgess.iv, zoecarver.
Herald added subscribers: pengfei, dexonsmith, hiraditya.
Herald added a project: LLVM.
fhahn requested review of this revision.

Currently we fail to eliminate some noop stores if there is a kill-able
store between the starting def and the load. This is because we
eliminate noop stores first.

In practice it seems like eliminating noop stores after the main
elimination for a def covers slightly more cases.

This patch improves the number of stores slightly in 2 cases for X86 -O3
-flto

Same hash: 235 (filtered out)
Remaining: 2
Metric: dse.NumRedundantStores

Program                                          base      patch diff
 test-suite...ce/Benchmarks/PAQ8p/paq8p.test     2.00   3.00 50.0%
 test-suite...006/453.povray/453.povray.test    18.00  21.00 16.7%

There might be other phase ordering issues, but it appears that they do
not show up in the test-suite/SPEC2000/SPEC2006. We can always tune the
ordering later.

Partly fixes PR47887.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D89650

Files:
  llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
  llvm/test/Transforms/DeadStoreElimination/MSSA/calloc-store.ll
  llvm/test/Transforms/DeadStoreElimination/MSSA/noop-stores.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89650.298883.patch
Type: text/x-patch
Size: 4468 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201018/56bfa73c/attachment.bin>


More information about the llvm-commits mailing list