SRA: Total scalarization after access propagation [PR92706]
authorMartin Jambor <mjambor@suse.cz>
Wed, 29 Jan 2020 12:13:13 +0000 (13:13 +0100)
committerMartin Jambor <mjambor@suse.cz>
Wed, 29 Jan 2020 12:13:13 +0000 (13:13 +0100)
commit636e80eea24b780f1d5f4c14c58fc00001df8508
treee3d0ede705fa9cf1b3272eddcac76f0fdc84e853
parent5b9e89c922dc2e7e8b8da644bd3a8917c16b22ac
SRA: Total scalarization after access propagation [PR92706]

2020-01-29  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/92706
* tree-sra.c (struct access): Adjust comment of
grp_total_scalarization.
(find_access_in_subtree): Look for single children spanning an entire
access.
(scalarizable_type_p): Allow register accesses, adjust callers.
(completely_scalarize): Remove function.
(scalarize_elem): Likewise.
(create_total_scalarization_access): Likewise.
(sort_and_splice_var_accesses): Do not track total scalarization
flags.
(analyze_access_subtree): New parameter totally, adjust to new meaning
of grp_total_scalarization.
(analyze_access_trees): Pass new parameter to analyze_access_subtree.
(can_totally_scalarize_forest_p): New function.
(create_total_scalarization_access): Likewise.
(create_total_access_and_reshape): Likewise.
(total_should_skip_creating_access): Likewise.
(totally_scalarize_subtree): Likewise.
(analyze_all_variable_accesses): Perform total scalarization after
subaccess propagation using the new functions above.
(initialize_constant_pool_replacements): Output initializers by
traversing the access tree.

testsuite/
* gcc.dg/tree-ssa/pr92706-2.c: New test.
* gcc.dg/guality/pr59776.c: Xfail tests for s2.g.
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/guality/pr59776.c
gcc/testsuite/gcc.dg/tree-ssa/pr92706-2.c [new file with mode: 0644]
gcc/tree-sra.c