re PR tree-optimization/90883 (Generated code is worse if returned struct is unnamed)
authorJeff Law <law@redhat.com>
Wed, 26 Jun 2019 21:36:27 +0000 (15:36 -0600)
committerJeff Law <law@gcc.gnu.org>
Wed, 26 Jun 2019 21:36:27 +0000 (15:36 -0600)
commit3fe0ddc88334f9afd622458653a6d103948994bd
treee8a0a198a8f1f0670e7862902b0f7deceeef4afd
parent9f962469cabc7fdc2ee830125a5cb4e61e1632e4
re PR tree-optimization/90883 (Generated code is worse if returned struct is unnamed)

PR tree-optimization/90883
* tree-ssa-alias.c (stmt_kills_ref_p): Handle BUILT_IN_CALLOC.
* tree-ssa-dse.c: Update various comments to distinguish between
dead and redundant stores.
(initialize_ao_ref_for_dse): Handle BUILT_IN_CALLOC.
(dse_optimize_redundant_stores): New function.
(delete_dead_or_redundant_call): Renamed from delete_dead_call.
Distinguish between dead and redundant calls in dump output.  All
callers updated.
(delete_dead_or_redundant_assignment): Similarly for assignments.
(dse_optimize_stmt): Handle _CHK variants.  For statements which
store 0 into multiple memory locations, try to prove a subsequent
store is redundant.

        PR tree-optimization/90883
* g++.dg/tree-ssa/pr90883.C: New test.
* gcc.dg/tree-ssa/ssa-dse-36.c: New test.

From-SVN: r272717
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/tree-ssa/pr90883.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-36.c [new file with mode: 0644]
gcc/tree-ssa-alias.c
gcc/tree-ssa-dse.c