This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH GCC][2/5]Extend graph data structure

On Fri, Jun 2, 2017 at 1:51 PM, Bin Cheng <> 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?



> Thanks,
> bin
> 2017-05-31  Bin Cheng  <>
>         * 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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]