diff options
author | Sven Verdoolaege <skimo@kotnet.org> | 2009-11-28 19:47:58 +0100 |
---|---|---|
committer | Sven Verdoolaege <skimo@kotnet.org> | 2009-12-07 16:56:11 +0100 |
commit | 6fd2691af8b426078996469960834e9bdd65ab9d (patch) | |
tree | e591298e45f2ee1e6e7537425ba3408a39d22658 /isl_tab.c | |
parent | 79776976e2fee1f831190a0fc30cd6984566f5de (diff) | |
download | isl-6fd2691af8b426078996469960834e9bdd65ab9d.tar.gz isl-6fd2691af8b426078996469960834e9bdd65ab9d.tar.bz2 isl-6fd2691af8b426078996469960834e9bdd65ab9d.zip |
isl_tab: add isl_tab_freeze_constraint
Diffstat (limited to 'isl_tab.c')
-rw-r--r-- | isl_tab.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -936,6 +936,26 @@ int isl_tab_mark_empty(struct isl_tab *tab) return 0; } +int isl_tab_freeze_constraint(struct isl_tab *tab, int con) +{ + struct isl_tab_var *var; + + if (!tab) + return -1; + + var = &tab->con[con]; + if (var->frozen) + return 0; + if (var->index < 0) + return 0; + var->frozen = 1; + + if (tab->need_undo) + return isl_tab_push_var(tab, isl_tab_undo_freeze, var); + + return 0; +} + /* Update the rows signs after a pivot of "row" and "col", with "row_sgn" * the original sign of the pivot element. * We only keep track of row signs during PILP solving and in this case @@ -2628,6 +2648,9 @@ static int perform_undo_var(struct isl_tab *tab, struct isl_tab_undo *undo) var->is_redundant = 0; tab->n_redundant--; break; + case isl_tab_undo_freeze: + var->frozen = 0; + break; case isl_tab_undo_zero: var->is_zero = 0; if (!var->is_row) @@ -2748,6 +2771,7 @@ static int perform_undo(struct isl_tab *tab, struct isl_tab_undo *undo) break; case isl_tab_undo_nonneg: case isl_tab_undo_redundant: + case isl_tab_undo_freeze: case isl_tab_undo_zero: case isl_tab_undo_allocate: case isl_tab_undo_relax: |