[PATCH] D72631: [DSE] Eliminate stores at the end of the function.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 09:19:27 PST 2020


fhahn created this revision.
fhahn added reviewers: dmgreen, rnk, efriedma, bryant, asbirlea, Tyker.
Herald added subscribers: jfb, hiraditya.
Herald added a project: LLVM.

This patch add support for eliminating MemoryDefs that do not have any
aliasing users, which indicates that there are no reads/writes to the
memory location until the end of the function.

To eliminate such defs, we have to ensure that the underlying object is
not visible in the caller and does not escape via returning. We need a
separate check for that, as InvisibleToCaller does not consider returns.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72631

Files:
  llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
  llvm/test/Transforms/DeadStoreElimination/MSSA/2011-09-06-EndOfFunction.ll
  llvm/test/Transforms/DeadStoreElimination/MSSA/fence-todo.ll
  llvm/test/Transforms/DeadStoreElimination/MSSA/fence.ll
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72631.237711.patch
Type: text/x-patch
Size: 9370 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200113/012e4ec1/attachment.bin>


More information about the llvm-commits mailing list