[PR 80898] Propagate grp_write from disqualified SRA candidates
authorMartin Jambor <mjambor@suse.cz>
Thu, 1 Jun 2017 12:14:29 +0000 (14:14 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Thu, 1 Jun 2017 12:14:29 +0000 (14:14 +0200)
commitc8638450abe8a406813652eae4f9e7b3cb3bece4
tree4fddb5aa4bc1185eb3bc05e4fc510a14a8d1b53c
parent4ba66aee9e94f1bfb82fbebac661ad60cbce1176
[PR 80898] Propagate grp_write from disqualified SRA candidates

2017-06-01  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/80898
* tree-sra.c (process_subtree_disqualification): Removed.
(disqualify_candidate): Do not acll
process_subtree_disqualification.
(subtree_mark_written_and_enqueue): New function.
(propagate_all_subaccesses): Set grp_write of LHS subtree if the
RHS has been disqualified and re-queue LHS if necessary.  Apart
from that, ignore disqualified RHS.

testsuite/
* gcc.dg/tree-ssa/pr80898.c: New test.
* gcc.dg/tree-ssa/pr80898-2.c: Likewise.

From-SVN: r248790
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr80898-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/pr80898.c [new file with mode: 0644]
gcc/tree-sra.c