[PATCH] D29624: [DSE] Basic MemorySSA-backed global DSE
bryant via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 7 02:18:39 PST 2017
bryant created this revision.
Herald added a subscriber: Prazek.
Previously posted to https://reviews.llvm.org/D28395 .
This will do everything that the current DSE does (except partial overwrite
tracking), but globally and sparsely (thanks to MemorySSA). Its main limitation
is that it requires every the later store of a DSE pair to post-dom the earlier.
In other words, it can't transform this:
store _ -> %x
if undef:
store _ -> %x
else:
// do nothing.
into:
if undef:
store _ -> %x
else:
store _ -> %x
because the store inside the if-block doesn't post-dom the first one. Properly
handling this case would require a PRE approach (thanks Dan) that I'm also
currently cooking up.
So the purpose of posting this is posterity, and also to act as a back-up in
case the PRE attempt fails.
Repository:
rL LLVM
https://reviews.llvm.org/D29624
Files:
include/llvm/InitializePasses.h
include/llvm/Transforms/Scalar/DeadStoreElimination.h
lib/Passes/PassBuilder.cpp
lib/Passes/PassRegistry.def
lib/Transforms/Scalar/DeadStoreElimination.cpp
lib/Transforms/Scalar/Scalar.cpp
test/Transforms/DeadStoreElimination/global-dse.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29624.87379.patch
Type: text/x-patch
Size: 29103 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170207/32a3dcec/attachment-0001.bin>
More information about the llvm-commits
mailing list