[PATCH V2] Refactor tree-loop-distribution for thread safety

Richard Biener richard.guenther@gmail.com
Fri Nov 15 09:47:00 GMT 2019


On Thu, Nov 14, 2019 at 10:35 PM Giuliano Belinassi
<giuliano.belinassi@usp.br> wrote:
>
> Previously, the suggested patch removed all tree-loop-distributions.c global
> variables moving them into a struct and passing it aroung across the functions.
> This patch address this problem by using C++ classes instead, avoiding passing
> the struct as argument since it will be accessible from this pointer.

This patch is OK if it passes bootstrap and regtest.

Thanks,
Richard.

> gcc/ChangeLog
> 2019-11-14  Giuliano Belinassi  <giuliano.belinassi@usp.br>
>
>         * cfgloop.c (get_loop_body_in_custom_order): New.
>         * cfgloop.h (get_loop_body_in_custom_order): New prototype.
>         * tree-loop-distribution.c (class loop_distribution): New.
>         (bb_top_order_cmp): Remove.
>         (bb_top_order_cmp_r): New.
>         (create_rdg_vertices): Move into class loop_distribution.
>         (stmts_from_loop): Same as above.
>         (update_for_merge): Same as above.
>         (partition_merge_into): Same as above.
>         (get_data_dependence): Same as above.
>         (data_dep_in_cycle_p): Same as above.
>         (update_type_for_merge): Same as above.
>         (build_rdg_partition_for-vertex): Same as above.
>         (classify_builtin_ldst): Same as above.
>         (classify_partition): Same as above.
>         (share_memory_accesses): Same as above.
>         (rdg_build_partitions): Same as above.
>         (pg_add_dependence_edges): Same as above.
>         (build_partition_graph): Same as above.
>         (merge_dep_scc_partitions): Same as above.
>         (break_alias_scc_partitions): Same as above.
>         (finalize_partitions): Same as above.
>         (distribute_loop): Same as above.
>         (bb_top_order_init): New method
>         (bb_top_order_destroy): New method.
>         (get_bb_top_order_index_size): New method.
>         (get_bb_top_order_index_index): New method.
>         (get_bb_top_order_index_index): New method.
>         (loop_distribution::execute): New method.
>         (pass_loop_distribution::execute): Instantiate loop_distribution.



More information about the Gcc-patches mailing list