This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH GCC][2/5]Extend graph data structure
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Bin Cheng <Bin dot Cheng at arm dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, nd <nd at arm dot com>
- Date: Wed, 7 Jun 2017 10:39:43 +0200
- Subject: Re: [PATCH GCC][2/5]Extend graph data structure
- Authentication-results: sourceware.org; auth=none
- References: <VI1PR0802MB2176F30336584E8958E051DDE7F70@VI1PR0802MB2176.eurprd08.prod.outlook.com>
On Fri, Jun 2, 2017 at 1:51 PM, Bin Cheng <Bin.Cheng@arm.com> wrote:
> Hi,
> This patch extends graph data structure in two ways:
> 1) Passes private data to callback function of for_each_edge.
> 2) Adds new callback function to graph traversing functions like graphds_scc and graphds_dfs.
> The callback function acts as a supplement constraint for edges on top of subgraph constraint.
> With this change, the traversing function not only skips vertices/edges not belong to subgraph,
> but also skips edges when the callback function returns true on it. As a result, pass like loop
> distribution can traverse dependence graph with some dependence edges skipped.
>
> Bootstrap and test at O2/O3 on x86_64 and AArch64. is it OK?
Ok.
Richard.
> Thanks,
> bin
> 2017-05-31 Bin Cheng <bin.cheng@arm.com>
>
> * graphds.c (add_edge): Intitialize edge's attached data.
> (foll_in_subgraph, dfs_fst_edge, dfs_next_edge): New function
> pointer parameter. Call pointed function on each edge during
> graph traversing. Skip traversing the edge when the function
> returns true.
> (graphds_dfs, graphds_scc): Ditto.
> (for_each_edge): New parameter. Pass the new parameter to callback
> function.
> * graphds.h (skip_edge_callback): New function pointer type.
> (graphds_dfs, graphds_scc): New function pointer parameter.
> (graphds_edge_callback, for_each_edge): New parameter.