On Wed, May 11, 2011 at 10:03 PM, Ian Lance Taylor <i...@google.com> wrote:
> Pierre Vittet <pier...@pvittet.com> writes:
>
>> First, thanks for your help. I have looked at several function using
>> calculate_dominance_info(). From what I understand, when you have
>> finish to use it, you have to clear the structure by making a
>> free_dominance_info().
>> In the function flow_loops_find (file gcc/cfgloop.c), there is a call
>> to calculate_dominance_info() without call to free_dominance_info(). I
>> feel it is a bug, no?
>
> Not in this case, no.  The caller or a later pass is responsible for
> freeing it in this case.  There should ideally be a comment about this.

dominator information should be freed if it is made invalid by CFG
transformations.
Otherwise the policy is to keep it around to avoid re-computing it (too many
passes need it).  For post-dominator info the policy is to always free it.

Richard.

> Ian
>

Reply via email to