diff options
author | Martin Jambor <mjambor@suse.cz> | 2017-09-06 11:25:00 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2017-09-06 11:25:00 +0200 |
commit | e9982c6ae9c3525d0815963281a825996e392d42 (patch) | |
tree | b1a1cc1aa54de0f4c913401af9eb5b8e08779489 /gcc/tree-sra.c | |
parent | c7a494c99b4a421f6b80af834adb0d4c703d47a5 (diff) |
Enqueue all SRA links for write flag propagation
2017-09-06 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/82078
gcc/
* tree-sra.c (sort_and_splice_var_accesses): Move call to
add_access_to_work_queue...
(build_accesses_from_assign): ...here.
(propagate_all_subaccesses): Make sure racc is the group
representative, if there is one.
gcc/testsuite/
* gcc.dg/tree-ssa/pr82078.c: New test.
From-SVN: r251756
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r-- | gcc/tree-sra.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 68edbce21b3..163b7a2d03b 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -1359,6 +1359,8 @@ build_accesses_from_assign (gimple *stmt) link->lacc = lacc; link->racc = racc; add_link_to_rhs (racc, link); + add_access_to_work_queue (racc); + /* Let's delay marking the areas as written until propagation of accesses across link, unless the nature of rhs tells us that its data comes from elsewhere. */ @@ -2118,7 +2120,6 @@ sort_and_splice_var_accesses (tree var) access->grp_total_scalarization = total_scalarization; access->grp_partial_lhs = grp_partial_lhs; access->grp_unscalarizable_region = unscalarizable_region; - add_access_to_work_queue (access); *prev_acc_ptr = access; prev_acc_ptr = &access->next_grp; @@ -2712,6 +2713,8 @@ propagate_all_subaccesses (void) struct access *racc = pop_access_from_work_queue (); struct assign_link *link; + if (racc->group_representative) + racc= racc->group_representative; gcc_assert (racc->first_link); for (link = racc->first_link; link; link = link->next) |