[PATCH] D82407: [DSE,MSSA] Remove dead stores to stack-allocated locations

Whitney Tsang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 23 13:59:26 PDT 2020


Whitney created this revision.
Whitney added reviewers: fhahn, chrisjackson, bkramer, serge-sans-paille, zoecarver, eli.friedman, etiotto, bmahjour.
Whitney added a project: LLVM.
Herald added subscribers: llvm-commits, hiraditya, Prazek.

This patch adds the support to remove dead stores to stack-allocated locations when `-enable-dse-memoryssa=true`.
For example:

  %A = alloca i32
  ...
  store i32 1, i32* %A
  ret void

Note that dead stores to stack-allocated locations in end blocks can already be removed when `-enable-dse-memoryssa=false`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82407

Files:
  llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
  llvm/test/Transforms/DeadStoreElimination/MSSA/mda-with-dbg-values.ll
  llvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-captures.ll
  llvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-exceptions.ll
  llvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-memintrinsics.ll
  llvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-multipath.ll
  llvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-simple.ll
  llvm/test/Transforms/DeadStoreElimination/MSSA/simple.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82407.272816.patch
Type: text/x-patch
Size: 10236 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200623/e264ccf6/attachment.bin>


More information about the llvm-commits mailing list