[PR 78687] Set SRA grp_write lazily
authorMartin Jambor <mjambor@suse.cz>
Tue, 2 May 2017 12:49:55 +0000 (14:49 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Tue, 2 May 2017 12:49:55 +0000 (14:49 +0200)
commit2bba75411e14cdf1ee67f4ee965665cf6c6c6ea7
treedaaf9a73b62e3430dc79e23fa0d3062bcf282693
parent2bf54d93f159210d0c05a07c655eb847c069365c
[PR 78687] Set SRA grp_write lazily

2017-05-02  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/78687
* tree-sra.c (access): New field parent.
(process_subtree_disqualification): New function.
(disqualify_candidate): Call it.
(build_accesses_from_assign): Reset write flag if creating an
assighnment link.
(build_access_subtree): Fill in parent field and also prpagate
down grp_write flag.
(create_artificial_child_access): New parameter set_grp_write, set
grp_write to its value.
(propagate_subaccesses_across_link): Also propagate grp_write flag
values.
(propagate_all_subaccesses): Push the closest parent back to work
queue if add_access_to_work_queue returned true.

testsuite/
* g++.dg/tree-ssa/pr78687.C: New test.

From-SVN: r247497
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/tree-ssa/pr78687.C [new file with mode: 0644]
gcc/tree-sra.c