diff options
author | grosser <grosser@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-30 22:06:27 +0000 |
---|---|---|
committer | grosser <grosser@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-30 22:06:27 +0000 |
commit | c9ef6b0ef08751c3a3770da15d38c1ef59ee2ec0 (patch) | |
tree | 8557f4e933b1efe957ca676604b348d1e69abdc2 /gcc/graphite-scop-detection.c | |
parent | 83b6c9dbe59299f469b81f88a1de57609e1257f9 (diff) | |
download | gcc-c9ef6b0ef08751c3a3770da15d38c1ef59ee2ec0.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154844 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-scop-detection.c')
-rw-r--r-- | gcc/graphite-scop-detection.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index 6580252a7fa..02c653b69a6 100644 --- a/gcc/graphite-scop-detection.c +++ b/gcc/graphite-scop-detection.c @@ -1207,24 +1207,6 @@ print_graphite_statistics (FILE* file, VEC (scop_p, heap) *scops) print_graphite_scop_statistics (file, scop); } -/* Version of free_scops special cased for limit_scops. */ - -static void -free_scops_1 (VEC (scop_p, heap) **scops) -{ - int i; - scop_p scop; - - for (i = 0; VEC_iterate (scop_p, *scops, i, scop); i++) - { - sese region = SCOP_REGION (scop); - free (SESE_PARAMS_NAMES (region)); - SESE_PARAMS_NAMES (region) = 0; - } - - free_scops (*scops); -} - /* We limit all SCoPs to SCoPs, that are completely surrounded by a loop. Example: @@ -1278,7 +1260,7 @@ limit_scops (VEC (scop_p, heap) **scops) } } - free_scops_1 (scops); + free_scops (*scops); *scops = VEC_alloc (scop_p, heap, 3); create_sese_edges (regions); |