Re: [PATCH] comment precising need to use free_dominance_info
So maybe this patch adding a comment on calculate_dominance_info is more adapted. ChangeLog: 2011-05-17 Pierre Vittetpier...@pvittet.com * dominance.c (calculate_dominance_info): Add comment precising when to free with free_dominance_info contributor number: 634276 Index: gcc/dominance.c === --- gcc/dominance.c (revision 173830) +++ gcc/dominance.c (working copy) @@ -628,8 +628,15 @@ compute_dom_fast_query (enum cdi_direction dir) } /* The main entry point into this module. DIR is set depending on whether - we want to compute dominators or postdominators. */ + we want to compute dominators or postdominators. + We try to keep dominance info alive as long as possible (to avoid + recomputing it often). It has to be freed with free_dominance_info when CFG + transformation makes it invalide. + + post_dominance info is less often used, and should be freed after each use. +*/ + void calculate_dominance_info (enum cdi_direction dir) {
Re: [PATCH] comment precising need to use free_dominance_info
On Thu, May 12, 2011 at 12:14 AM, pier...@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 pier...@pvittet.com * cfgloop.c (flow_loops_find): Add comment remembering to call free_dominance_info