isl_scheduler.c: copy_edges: extract out graph_edge_tables_add
commit7f9a5750e982128cd4b301c08493a94916b09a65
authorSven Verdoolaege <sven.verdoolaege@gmail.com>
Thu, 7 Sep 2017 13:37:17 +0000 (7 15:37 +0200)
committerSven Verdoolaege <sven.verdoolaege@gmail.com>
Fri, 8 Sep 2017 12:30:30 +0000 (8 14:30 +0200)
tree71762dce5896afdb8a22f0ea4a8f2ea91e326186
parent595ae8ecd219bf46111d5f896bcc534a3209e303
isl_scheduler.c: copy_edges: extract out graph_edge_tables_add

This function will be reused in the next commit.

Note that the original code checked the edge tables of the source graph
to determine whether an edge is of a given type, while the new code
checks the types of the edge directly.
This allows graph_edge_tables_add to be independent of the source graph.
For edge types that may appear multiple times between the same pair
of nodes, this means that all edges will be added to the edge table,
but each will overwrite the previous one.
In the end, the edge referenced from the edge table will be
the last such edge, which is also the one that is referenced
from the edge table in the source graph.

Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>
isl_scheduler.c