On Fri, Mar 11, 2011 at 03:38:49PM -0600, Sebastian Pop wrote:
> we currently call cloog_state_malloc and cloog_state_free too many
> times.  In CLooG-Parma, these functions contain the init and fini
> functions of PPL, and so calling these in the middle of graphite would
> finalize all the PPL data structures, leading to memory corruption.
> 
> This patch fixes this problem.  It passed make -k check
> RUNTESTFLAGS=graphite.exp with CLooG-ISL and CLooG-Parma (with only
> one ICE remaining as reported in http://gcc.gnu.org/PR47128 ).  Full
> regstrap with CLooG-ISL in progress on amd64-linux.  Ok for trunk?

This broke build with legacy CLooG, because build_cloog_prog
macro in graphite-cloog-compat.h hasn't been adjusted for the:

> --- a/gcc/graphite-clast-to-gimple.c
> +++ b/gcc/graphite-clast-to-gimple.c
> @@ -1236,7 +1236,7 @@ init_cloog_input_file (int scop_number)
>  
>  static void
>  build_cloog_prog (scop_p scop, CloogProgram *prog,
> -                  CloogOptions *options, CloogState *state ATTRIBUTE_UNUSED)
> +                  CloogOptions *options)
>  {
>    int i;
>    int max_nb_loops = scop_max_loop_depth (scop);

change.  Fixed thusly, committed to trunk as obvious.

2011-03-14  Jakub Jelinek  <ja...@redhat.com>

        PR bootstrap/48102
        * graphite-cloog-compat.h (build_cloog_prog): Remove STATE
        parameter.

--- gcc/graphite-cloog-compat.h.jj      2010-10-04 15:00:01.000000000 +0200
+++ gcc/graphite-cloog-compat.h 2011-03-14 09:14:26.033390135 +0100
@@ -1,6 +1,6 @@
 /* Compatibility layer for using upstream CLooG versions with
    CLooG legacy code.
-   Copyright (C) 2010 Free Software Foundation, Inc.
+   Copyright (C) 2010, 2011 Free Software Foundation, Inc.
    Contributed by Andreas Simbuerger <simbu...@fim.uni-passau.de>.
 
 This file is part of GCC.
@@ -37,8 +37,8 @@ typedef const char *clast_name_p;
 #ifndef CLOOG_ORG
 
 /* CloogOptions compatibility.  */
-#define build_cloog_prog(SCOP, PROG, OPT, STATE)\
-  build_cloog_prog (SCOP, PROG, STATE)
+#define build_cloog_prog(SCOP, PROG, OPT)\
+  build_cloog_prog (SCOP, PROG)
 #define cloog_program_extract_scalars(PROG, SCATT, OPT)\
   cloog_program_extract_scalars (PROG, SCATT)
 #define cloog_program_scatter(PROG, SCATT, OPT)\


        Jakub

Reply via email to