aboutsummaryrefslogtreecommitdiff
path: root/gcc/graphite.c
diff options
context:
space:
mode:
authorSebastian Pop <sebastian.pop@amd.com>2011-03-12 22:05:38 +0000
committerSebastian Pop <spop@gcc.gnu.org>2011-03-12 22:05:38 +0000
commit57d598f76c30d7a78686552398a4ce45550dc982 (patch)
tree7668cf622bac8898324ae5e873bfafe28e1a1293 /gcc/graphite.c
parent2e49964fd8691ca13e33df656da7fc4b27c1a77b (diff)
downloadgcc-57d598f76c30d7a78686552398a4ce45550dc982.zip
gcc-57d598f76c30d7a78686552398a4ce45550dc982.tar.gz
gcc-57d598f76c30d7a78686552398a4ce45550dc982.tar.bz2
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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/graphite.c b/gcc/graphite.c
index 70c3d46..b013447 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 ();