[PATCH] D11854: DeadStoreElimination: remove a redundant store even if the load is in a different block.

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 11:50:34 PDT 2015


dberlin added a comment.

LGTM
LNT doesn't have particularly large programs, so not seeing compile
time effects there is not surprising.  Your walk may in fact, walk the
entire CFG *for each store* (if load is in entry block, store is near
exit block).

This is, in general, a really expensive way to perform this optimization.

It's sad this can't take advantage of GVN, and instead just directly
compares pointer operands.  This means things like bitcasts/etc, will
cause it to not eliminate dead stores it could.  Another thing on the
pile of usefulness for separating GVN's analysis and elimination.

However, all that said,  i'm fine with this patch, we'll fix any
compile time issues when they pop up by doing it right.

--Dan


http://reviews.llvm.org/D11854





More information about the llvm-commits mailing list