isl_basic_set_opt: avoid invalid access on error path
[platform/upstream/isl.git] / isl_tarjan.c
index 847b83b..ea5bfa9 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright 2010-2011 INRIA Saclay
  * Copyright 2012      Ecole Normale Superieure
  *
- * Use of this software is governed by the GNU LGPLv2.1 license
+ * Use of this software is governed by the MIT license
  *
  * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France,
  * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod,
@@ -107,7 +107,13 @@ static int isl_tarjan_components(struct isl_tarjan_graph *g, int i,
 }
 
 /* Decompose the graph with "len" nodes and edges defined by "follows"
- * into strongly connected components.
+ * into strongly connected components (SCCs).
+ * follows(i, j, user) should return 1 if "i" follows "j" and 0 otherwise.
+ * It should return -1 on error.
+ *
+ * If SCC a contains a node i that follows a node j in another SCC b
+ * (i.e., follows(i, j, user) returns 1), then SCC a will appear after SCC b
+ * in the result.
  */
 struct isl_tarjan_graph *isl_tarjan_graph_init(isl_ctx *ctx, int len,
        int (*follows)(int i, int j, void *user), void *user)