move all global variables to CloogState
commita9846c1b95d5ea884478c2d131f48d684de5301d
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 26 May 2009 17:44:16 +0000 (26 19:44 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 31 May 2009 18:38:29 +0000 (31 20:38 +0200)
tree972d6e430c129ad30e24f53071a1c4f7160b4c74
parenta87eeda6e77ca981fdb4637d792771b25ec7cac5
move all global variables to CloogState

Putting all global variables in the CloogState ensures
that CLooG is thread safe as long as the backend used is
thread safe as well.

In particular, the PolyLib specifc MAX_RAYS is moved
into CloogState, even though it's probably not
very useful to have it set to different values in
different states.

Most of the global variables used in checking for memory
leaks have also been moved to CloogState.
The remaining two sets have been dropped, namely
cloog_int_* and cloog_matrix_*.
It would be tricky to pass the CloogState to all
init and clear macro calls, while there aren't that
many direct manipulations of cloog_int_t's left in
the core and there will be even fewer after one of
the next patches.
cloog_matrix is (now) a PolyLib specific thing.
It wouldn't be too difficult to have it keep a
CloogState reference as well, but it doesn't
seem worth it.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
20 files changed:
include/cloog/block.h
include/cloog/int.h.in
include/cloog/loop.h
include/cloog/polylib/backend.h.in
include/cloog/polylib/domain.h
include/cloog/program.h
include/cloog/state.h
include/cloog/statement.h
source/block.c
source/cloog.c
source/isl/constraints.c
source/isl/domain.c
source/loop.c
source/polylib/backend.c
source/polylib/domain.c
source/polylib/matrix.c
source/program.c
source/state.c
source/statement.c
test/generate_test.c