Do not abuse sese for codegenerationtobias/debug_generated_programregtest/success/2009_11_21_18_13_17regtest/success/remotes/tobias/debug_generated_program
commit6b5b48a8026b38edcf075689a60a9b720f3b480e
authorTobias Grosser <grosser@fim.uni-passau.de>
Sat, 21 Nov 2009 09:13:39 +0000 (21 10:13 +0100)
committerTobias Grosser <grosser@fim.uni-passau.de>
Sat, 21 Nov 2009 16:54:52 +0000 (21 17:54 +0100)
tree1668422f4bd8cd7548d52df80f47f4189c4755ac
parent98ce0fa1b72a4452e90d1395f5f33c92d6291c53
Do not abuse sese for codegeneration

CLooG automatically frees the names list, so sharing SESE_PARAMS_NAMES
between gloog() and debug_generated_program() leads to freeing them
twice. As both SESE_PARAM_NAMES and SESE_PARAMS_INDEX are code
generation data structures remove them and the functions working on them
from sese.h and put them in clast-to-gimple.

2009-11-21  Tobias Grosser  <grosser@fim.uni-passau.de>

* graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
clast_name_to_index, save_clast_name_index, debug_clast_name_index,
debug_clast_name_indexes_1, debug_clast_name_indexes,
clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
(clast_name_to_gcc, clast_to_gcc_expression,
clast_to_gcc_expression_red, gcc_type_for_clast_expr,
gcc_type_for_clast_eq, graphite_translate_clast_equation,
graphite_create_guard_cond_expr, graphite_create_new_loop,
translate_clast): Add params_index.
(initialize_cloog_names): Create parameter strings from scratch, do
not reference other strings.
(create_params_index): New.
(gloog): Initialize params_index.
* graphite-scop-detection (free_scops_1): Removed.
(limit_scops): Use normal free_scops.
* graphite-sese-to-poly.c (save_var_names): Removed.
(parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
and SESE_PARAMS_INDEX.
* sese.c (new_sese, free_sese): Dito.
* sese.h (struct sese): Remove params_index, params_names.
(SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
gcc/ChangeLog.graphite
gcc/graphite-clast-to-gimple.c
gcc/graphite-scop-detection.c
gcc/graphite-sese-to-poly.c
gcc/sese.c
gcc/sese.h