From b20dcefcd958588ed32f34a9a3a12b382717cf69 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sun, 20 Aug 2017 20:46:58 +0200 Subject: [PATCH] isl_tab_basic_set_non_trivial_lexmin: postpone rollback until entering level This is a minor clean-up. In the original code, the rollback was performed while leaving the level that backtracks to the previous level. Now it is performed on entering that previous level. This makes the code slightly easier to understand because the rollback is now performed at the level that created the snapshot. Signed-off-by: Sven Verdoolaege --- isl_tab_pip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/isl_tab_pip.c b/isl_tab_pip.c index 2c9ec8f4..515da6cf 100644 --- a/isl_tab_pip.c +++ b/isl_tab_pip.c @@ -5369,6 +5369,9 @@ __isl_give isl_vec *isl_tab_basic_set_non_trivial_lexmin( triv[level].side = 0; triv[level].update = 0; triv[level].n_zero = 0; + } else { + if (isl_tab_rollback(tab, triv[level].snap) < 0) + goto error; } r = triv[level].region; @@ -5379,9 +5382,6 @@ __isl_give isl_vec *isl_tab_basic_set_non_trivial_lexmin( backtrack: level--; init = 0; - if (level >= 0) - if (isl_tab_rollback(tab, triv[level].snap) < 0) - goto error; continue; } -- 2.11.4.GIT