diff options
| author | Tobias Grosser <tobias@grosser.es> | 2018-02-20 07:26:42 +0000 |
|---|---|---|
| committer | Tobias Grosser <tobias@grosser.es> | 2018-02-20 07:26:42 +0000 |
| commit | fa8079d0dc1b9fbca201b92f30d3c97386c75114 (patch) | |
| tree | 8163f9c4eb97308b4c7a8a1777fdc9aac3c789be /polly/lib/External/isl/isl_tab.c | |
| parent | 85476dc45ad1216e533385964b9ce191968c316f (diff) | |
| download | bcm5719-llvm-fa8079d0dc1b9fbca201b92f30d3c97386c75114.tar.gz bcm5719-llvm-fa8079d0dc1b9fbca201b92f30d3c97386c75114.zip | |
Update isl to isl-0.18-1047-g4a20ef8
This update:
- Removes several deprecated functions (e.g., isl_band).
- Improves the pretty-printing of sets by detecting modulos and "false"
equalities.
- Minor improvements to coalescing and increased robustness of the isl
scheduler.
This update does not yet include isl commit isl-0.18-90-gd00cb45
(isl_pw_*_alloc: add missing check for compatible spaces, Wed Sep 6 12:18:04
2017 +0200), as this additional check is too tight and unfortunately causes
two test case failures in Polly. A patch has been submitted to isl and will be
included in the next isl update for Polly.
llvm-svn: 325557
Diffstat (limited to 'polly/lib/External/isl/isl_tab.c')
| -rw-r--r-- | polly/lib/External/isl/isl_tab.c | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/polly/lib/External/isl/isl_tab.c b/polly/lib/External/isl/isl_tab.c index fd184c5440e..4a81b24d8a3 100644 --- a/polly/lib/External/isl/isl_tab.c +++ b/polly/lib/External/isl/isl_tab.c @@ -786,30 +786,42 @@ static void swap_rows(struct isl_tab *tab, int row1, int row2) tab->row_sign[row2] = s; } -static int push_union(struct isl_tab *tab, +static isl_stat push_union(struct isl_tab *tab, enum isl_tab_undo_type type, union isl_tab_undo_val u) WARN_UNUSED; -static int push_union(struct isl_tab *tab, + +/* Push record "u" onto the undo stack of "tab", provided "tab" + * keeps track of undo information. + * + * If the record cannot be pushed, then mark the undo stack as invalid + * such that a later rollback attempt will not try to undo earlier + * records without having been able to undo the current record. + */ +static isl_stat push_union(struct isl_tab *tab, enum isl_tab_undo_type type, union isl_tab_undo_val u) { struct isl_tab_undo *undo; if (!tab) - return -1; + return isl_stat_error; if (!tab->need_undo) - return 0; + return isl_stat_ok; undo = isl_alloc_type(tab->mat->ctx, struct isl_tab_undo); if (!undo) - return -1; + goto error; undo->type = type; undo->u = u; undo->next = tab->top; tab->top = undo; - return 0; + return isl_stat_ok; +error: + free_undo(tab); + tab->top = NULL; + return isl_stat_error; } -int isl_tab_push_var(struct isl_tab *tab, +isl_stat isl_tab_push_var(struct isl_tab *tab, enum isl_tab_undo_type type, struct isl_tab_var *var) { union isl_tab_undo_val u; @@ -820,7 +832,7 @@ int isl_tab_push_var(struct isl_tab *tab, return push_union(tab, type, u); } -int isl_tab_push(struct isl_tab *tab, enum isl_tab_undo_type type) +isl_stat isl_tab_push(struct isl_tab *tab, enum isl_tab_undo_type type) { union isl_tab_undo_val u = { 0 }; return push_union(tab, type, u); @@ -829,20 +841,21 @@ int isl_tab_push(struct isl_tab *tab, enum isl_tab_undo_type type) /* Push a record on the undo stack describing the current basic * variables, so that the this state can be restored during rollback. */ -int isl_tab_push_basis(struct isl_tab *tab) +isl_stat isl_tab_push_basis(struct isl_tab *tab) { int i; union isl_tab_undo_val u; u.col_var = isl_alloc_array(tab->mat->ctx, int, tab->n_col); if (tab->n_col && !u.col_var) - return -1; + return isl_stat_error; for (i = 0; i < tab->n_col; ++i) u.col_var[i] = tab->col_var[i]; return push_union(tab, isl_tab_undo_saved_basis, u); } -int isl_tab_push_callback(struct isl_tab *tab, struct isl_tab_callback *callback) +isl_stat isl_tab_push_callback(struct isl_tab *tab, + struct isl_tab_callback *callback) { union isl_tab_undo_val u; u.callback = callback; @@ -917,12 +930,12 @@ struct isl_tab *isl_tab_drop_sample(struct isl_tab *tab, int s) /* Record the current number of samples so that we can remove newer * samples during a rollback. */ -int isl_tab_save_samples(struct isl_tab *tab) +isl_stat isl_tab_save_samples(struct isl_tab *tab) { union isl_tab_undo_val u; if (!tab) - return -1; + return isl_stat_error; u.n = tab->n_sample; return push_union(tab, isl_tab_undo_saved_samples, u); |

