isl_scheduler.c: update_edge: re-add edges of multi-edge types to tables
commitf9bcae64267fab12594e8b8dc6ffee9c6668bca8
authorSven Verdoolaege <sven.verdoolaege@gmail.com>
Thu, 7 Sep 2017 13:52:43 +0000 (7 15:52 +0200)
committerSven Verdoolaege <sven.verdoolaege@gmail.com>
Fri, 8 Sep 2017 15:12:14 +0000 (8 17:12 +0200)
tree611cda23c7ffee6607acadb5894e72f21606b8a9
parent7f9a5750e982128cd4b301c08493a94916b09a65
isl_scheduler.c: update_edge: re-add edges of multi-edge types to tables

During construction of the graph, edges of types that can appear
multiple times between the same pair of nodes share an entry
in the edge table, meaning that the last one gets referenced
from the table.
If this edge turns out to be empty, it is removed from the table,
which could result in none of these edges being referenced
from the table even if there are still some that are non-empty.

Always add edges of these types to the table (again) to ensure
that as long as there is at least one edge between
a given pair of nodes, one of them (the last one)
will be referenced from the table.

This commit changes the order in which edges are updated.
The reverse order was used in isl-0.06-43-g1192654a2e (add
isl_union_set_compute_schedule, Sat Mar 19 14:47:47 2011 +0100)
because edges were being removed from the graph.
Since isl-0.09-170-gd5ed563c9e (isl_union_set_compute_schedule:
also keep track of proximity edges in hash table,
Fri Apr 13 11:32:53 2012 +0200), the edges are only
removed from the tables and the reverse order is no longer required.
The original order is used here for consistency.
That is, the edge referenced from the table will always
be the last non-empty edge.

This commit is the result of code inspection.
It is not clear if this fixes any problems that may occur in practice.

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