remove_all_equalities: copy context whenever main polyhedron is updated
commitf22b2f8c5ef63af7e12e5efe844b899e017bd3a1
authorSven Verdoolaege <sven.verdoolaege@gmail.com>
Mon, 7 Dec 2020 20:20:31 +0000 (7 21:20 +0100)
committerSven Verdoolaege <sven.verdoolaege@gmail.com>
Mon, 7 Dec 2020 20:20:31 +0000 (7 21:20 +0100)
tree1f792796a90f7c254ed835127d9122a8ebe95fe1
parent3c51d6e4c6a6d7f119959332dcdeaf6eb572561c
remove_all_equalities: copy context whenever main polyhedron is updated

The condition "Q != *P" is used in the calls to transform and
remove_parameter_equalities to indicate that the input polyhedra
should be freed when updated.
Initially Q and D point to the original polyhedra, which should
not be freed.  If the original Q gets replaced by a new polyhedron
then D (if set) should point to a new polyhedron as well,
otherwise the original polyhedron will get freed whenever
the context gets updated.
It is not clear whether this can happen in practice without
also running into the issue fixed by the next commit,
but it is definitely needed for the next commit.

Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>
remove_equalities.c