Patchwork comment precising need to use free_dominance_info

login
register
mail settings
Submitter Pierre Vittet
Date May 11, 2011, 10:14 p.m.
Message ID <9551d240d1b3eb591ad5c2ceb8999939@localhost>
Download mbox | patch
Permalink /patch/95190/
State New
Headers show

Comments

Pierre Vittet - May 11, 2011, 10:14 p.m.
After using function flow_loops_find in cfgloop.c, it is needed to use 
free_dominance_info to clear structure which have beend added by the 
use of calculate_dominance_info.

I have added a comment precising this.

My contributor number is 634276.


ChangeLog:
2011-05-11  Pierre Vittet  <piervit@pvittet.com>

	* cfgloop.c (flow_loops_find): Add comment remembering to call
	free_dominance_info
Richard Guenther - May 12, 2011, 8:47 a.m.
On Thu, May 12, 2011 at 12:14 AM,  <piervit@pvittet.com> wrote:
> After using function flow_loops_find in cfgloop.c, it is needed to use
> free_dominance_info to clear structure which have beend added by the use of
> calculate_dominance_info.
>
> I have added a comment precising this.
>
> My contributor number is 634276.

The patch is not correct.  Keeping dom info live is ok.

Richard.

>
> ChangeLog:
> 2011-05-11  Pierre Vittet  <piervit@pvittet.com>
>
>        * cfgloop.c (flow_loops_find): Add comment remembering to call
>        free_dominance_info
>

Patch

Index: gcc/cfgloop.c
===================================================================
--- gcc/cfgloop.c	(revision 173677)
+++ gcc/cfgloop.c	(working copy)
@@ -368,6 +368,11 @@  init_loops_structure (struct loops *loops, unsigne
 
 /* Find all the natural loops in the function and save in LOOPS structure and
    recalculate loop_depth information in basic block structures.
+
+   This function calls calculate_dominance_info which allocates a structure to
+   handle dominance. It must be freed after use with the function
+   free_dominance_info.
+
    Return the number of natural loops found.  */
 
 int