tree-loop-distribution.c: Add general explanantion on the pass.
authorBin Cheng <bin.cheng@arm.com>
Wed, 5 Jul 2017 12:08:28 +0000 (12:08 +0000)
committerBin Cheng <amker@gcc.gnu.org>
Wed, 5 Jul 2017 12:08:28 +0000 (12:08 +0000)
commita8745cc231e043dc9e455ea2a5897d30c14fd95a
tree8fe167022c6a719ea6fab5b5eef3cfebbc25ad49
parent4a52eb194ce8a5c9086dbc269210d17430ce706e
tree-loop-distribution.c: Add general explanantion on the pass.

* tree-loop-distribution.c: Add general explanantion on the pass.
(generate_loops_for_partition): Mark distributed loop.
(pg_add_dependence_edges): New parameter.  Handle alias data
dependence specially and record it in the parameter if asked.
(struct pg_vdata, pg_edata, pg_edge_callback_data): New structs.
(init_partition_graph_vertices, add_partition_graph_edge): New.
(pg_skip_alias_edge, free_partition_graph_edata_cb): New.
(free_partition_graph_vdata, build_partition_graph): New.
(sort_partitions_by_post_order, merge_dep_scc_partitions): New.
(pg_collect_alias_ddrs, break_alias_scc_partitions): New.
(data_ref_segment_size, latch_dominated_by_data_ref): New.
(compute_alias_check_pairs, version_loop_by_alias_check): New.
(version_for_distribution_p, finalize_partitions): New.
(distribute_loop): Handle alias data dependence specially.  Factor
out loop fusion code as functions and call these functions.

gcc/testsuite
* gcc.dg/tree-ssa/ldist-4.c: Adjust test string.
* gcc.dg/tree-ssa/ldist-12.c: Ditto.
* gcc.dg/tree-ssa/ldist-13.c: Ditto.
* gcc.dg/tree-ssa/ldist-14.c: Ditto.

From-SVN: r249994
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/ldist-12.c
gcc/testsuite/gcc.dg/tree-ssa/ldist-13.c
gcc/testsuite/gcc.dg/tree-ssa/ldist-14.c
gcc/testsuite/gcc.dg/tree-ssa/ldist-4.c
gcc/tree-loop-distribution.c