This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [graphite] Some small bug fixes and improvements


I just committed the attached patch to the graphite branch.

Sebastian Pop
--
AMD - GNU Tools



On Thu, Dec 11, 2008 at 10:53 AM, Sebastian Pop <sebpop@gmail.com> wrote:
> On Thu, Dec 11, 2008 at 9:31 AM, Tobias Grosser <tobi-grosser@web.de> wrote:
>> On Tue, 2008-12-09 at 16:38 -0600, Sebastian Pop wrote:
>>> On Tue, Dec 9, 2008 at 4:15 PM, Tobias Grosser <tobi-grosser@web.de> wrote:
>> [...]
>>> With this patch, do we fail more tests in the current testsuite?  If
>>> not please apply.
>>>
>>> >  * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
>>> >  (find_params_in_bb): Do not free data refs.
>>>
>>> ok.  I would put a comment where you removed the free data refs to
>>> indicate that the problem is in the free_data_refs.  I also got bitten
>>> by this once...
>>
>> What comment would you put, and where. It seems this call to
>> free_data_ref is a remainder of code you removed in the bb copying
>> commit (142384).
>> Before we created new data_refs just to find parameters and removed them
>> later. Now we use the DATA_REFS of the gbb data structure. So we can not
>> remove any data ref during parameter detection.
>> But actually we should clean up later. Why have you removed the
>> free_data_refs() call in free_graphite_bb()? It seems also to work in
>> new_graphite_bb().
>
> Oh, here it was that free_data_refs that I removed!  There is a call
> to BITMAP_FREE (DR_VOPS (dr)) that make some problems when called from
> graphite as we try to free a DR_VOPS not allocated.  I will have to
> look more closely into this.
>
> Could you put this comment along with your patch?
>
> Thanks,
> Sebastian Pop
> --
> AMD - GNU Tools
>
> Index: graphite.c
> ===================================================================
> --- graphite.c  (revision 142673)
> +++ graphite.c  (working copy)
> @@ -1067,6 +1067,11 @@ free_graphite_bb (struct graphite_bb *gb
>   if (GBB_DOMAIN (gbb))
>     cloog_matrix_free (GBB_DOMAIN (gbb));
>
> +  /* FIXME: free_data_refs is disabled for the moment, but should be
> +     enabled.
> +
> +     free_data_refs (GBB_DATA_REFS (gbb)); */
> +
>   VEC_free (gimple, heap, GBB_CONDITIONS (gbb));
>   VEC_free (gimple, heap, GBB_CONDITION_CASES (gbb));
>   VEC_free (loop_p, heap, GBB_LOOPS (gbb));
>
2008-12-11  Tobias Grosser  <grosser@fim.uni-passau.de>

	* graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
	(find_params_in_bb): Do not free data refs.
	(free_graphite_bb): Add FIXME on disabled free_data_refs.

Index: graphite.c
===================================================================
--- graphite.c	(revision 142675)
+++ graphite.c	(working copy)
@@ -1161,6 +1161,7 @@ new_graphite_bb (scop_p scop, basic_bloc
   GBB_CONDITIONS (gbb) = NULL;
   GBB_CONDITION_CASES (gbb) = NULL;
   GBB_LOOPS (gbb) = NULL;
+  GBB_STATIC_SCHEDULE (gbb) = NULL;
   GBB_CLOOG_IV_TYPES (gbb) = NULL;
   VEC_safe_push (graphite_bb_p, heap, SCOP_BBS (scop), gbb);
 }
@@ -1176,6 +1177,11 @@ free_graphite_bb (struct graphite_bb *gb
   if (GBB_CLOOG_IV_TYPES (gbb))
     htab_delete (GBB_CLOOG_IV_TYPES (gbb));
 
+  /* FIXME: free_data_refs is disabled for the moment, but should be
+     enabled.
+
+     free_data_refs (GBB_DATA_REFS (gbb)); */
+
   VEC_free (gimple, heap, GBB_CONDITIONS (gbb));
   VEC_free (gimple, heap, GBB_CONDITION_CASES (gbb));
   VEC_free (loop_p, heap, GBB_LOOPS (gbb));
@@ -2574,7 +2580,6 @@ find_params_in_bb (scop_p scop, graphite
       irp.loop = father;
       irp.scop = scop;
       for_each_index (&dr->ref, idx_record_params, &irp);
-      free_data_ref (dr);
     }
 
   /* Find parameters in conditional statements.  */ 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]