scheduler: also (optionally) bound coefficients computed by carry_dependences
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 21 Jun 2013 07:16:46 +0000 (21 09:16 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 25 Jun 2013 17:08:28 +0000 (25 19:08 +0200)
2b54bb6 (scheduler: allow to bound the coefficients in the calculated schedule,
Sun Feb 19 14:05:50 2012 +0100) introduced an option to bound the coefficients
of the calculated schedule, but it would only bound the coefficients
of that part of the schedule computed by the core scheduler in
compute_schedule_wcc.

Also make the option apply to that part of the schedule
(if any) computed by the fallback carry_dependences.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_schedule.c

index 6a074be..da0ae63 100644 (file)
@@ -2413,6 +2413,8 @@ static int setup_carry_lp(isl_ctx *ctx, struct isl_sched_graph *graph)
 
        if (count_all_constraints(graph, &n_eq, &n_ineq) < 0)
                return -1;
+       if (count_bound_coefficient_constraints(ctx, graph, &n_eq, &n_ineq) < 0)
+               return -1;
 
        dim = isl_space_set_alloc(ctx, 0, total);
        isl_basic_set_free(graph->lp);
@@ -2464,6 +2466,8 @@ static int setup_carry_lp(isl_ctx *ctx, struct isl_sched_graph *graph)
                isl_int_set_si(graph->lp->ineq[k][0], 1);
        }
 
+       if (add_bound_coefficient_constraints(ctx, graph) < 0)
+               return -1;
        if (add_all_constraints(graph) < 0)
                return -1;