[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:31 PDT 2015


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

On Wed, Aug 12, 2015 at 10:54 AM, Erik Eckstein <eeckstein at apple.com> wrote:
> eeckstein added a comment.
>
> Some data from the lnt test suite:
>
> Compile time: I did not see any changes which are not noise.
> Execution time: There are a few benchmarks with improvements, but I think most (if not all) is noise.
>
> Static statistics data:
> This optimization effects redundant stores of the form:
>
> %x = load %p
> store %x, %p
>
> With this patch the compiler can eliminate 131 more redundant stores of this kind.
>
>
> http://reviews.llvm.org/D11854
>
>
>


More information about the llvm-commits mailing list