diff options
author | Sebastian Pop <sebastian.pop@amd.com> | 2011-03-12 22:05:38 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2011-03-12 22:05:38 +0000 |
commit | 57d598f76c30d7a78686552398a4ce45550dc982 (patch) | |
tree | 7668cf622bac8898324ae5e873bfafe28e1a1293 /gcc/graphite.c | |
parent | 2e49964fd8691ca13e33df656da7fc4b27c1a77b (diff) | |
download | gcc-57d598f76c30d7a78686552398a4ce45550dc982.tar.gz |
Fix PR47127: call cloog_state_malloc and cloog_state_free only once.
2011-03-12 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/47127
* graphite-clast-to-gimple.c (build_cloog_prog): Removed state
parameter.
(set_cloog_options): Same.
(scop_to_clast): Same.
(print_clast_stmt): Do not call cloog_state_malloc and
cloog_state_free.
(print_generated_program): Same.
(gloog): Same.
* graphite-clast-to-gimple.h (cloog_state): Declared.
(scop_to_clast): Adjust declaration.
* graphite.c (cloog_state): Defined here.
(graphite_initialize): Call cloog_state_malloc.
(graphite_finalize): Call cloog_state_free.
From-SVN: r170907
Diffstat (limited to 'gcc/graphite.c')
-rw-r--r-- | gcc/graphite.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/graphite.c b/gcc/graphite.c index 70c3d463f8f..b013447443f 100644 --- a/gcc/graphite.c +++ b/gcc/graphite.c @@ -54,6 +54,8 @@ along with GCC; see the file COPYING3. If not see #include "graphite-clast-to-gimple.h" #include "graphite-sese-to-poly.h" +CloogState *cloog_state; + /* Print global statistics to FILE. */ static void @@ -206,6 +208,7 @@ graphite_initialize (void) ppl_initialized = ppl_initialize (); gcc_assert (ppl_initialized == 0); + cloog_state = cloog_state_malloc (); cloog_initialize (); if (dump_file && dump_flags) @@ -229,6 +232,7 @@ graphite_finalize (bool need_cfg_cleanup_p) tree_estimate_probability (); } + cloog_state_free (cloog_state); cloog_finalize (); ppl_finalize (); free_original_copy_tables (); |