move isl_ctx from CloogOptions to CloogState
All isl structures are created within an isl_ctx. This means that whenever
CLooG need to allocate an isl structure, it needs to have a pointer to
an isl_ctx structure. Furthermore, if CLooG creates an isl_ctx structure
for itself, then it needs to destroy this structure and this destruction
needs to be performed after all the isl objects created within this state
have been destroyed.
Before this patch, the isl_ctx pointer was stored in the CloogOptions
object, but this means that the CloogOptions object can only be
destroyed after all processing by CLooG. This was perceived to be
error prone, especially since the example in the current documentation
destroys the CloogOptions object before it destroys the CloogPogram
object.
This patch introduces a new CloogState structure to contain
the isl_ctx pointer. The CloogState object should be created
before anything else and should be destroyed after anything else.
Functions that create new cloog objects are passed a pointer
to this CloogState unless they are already implicitly passed
a pointer to this object through some other object.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
26 files changed: