On Tue, Sep 14, 2010 at 5:36 PM, Sebastian Pop <seb...@gmail.com> wrote:
> On Tue, Sep 14, 2010 at 10:19, Paulo J. Matos <pocma...@gmail.com> wrote:
>> How can I automatically update dominators? Or do I have to do it for
>> each new basic_block I create with recompute_dominator?
>
> /* Free and compute again all the dominators information.  */
>
> static inline void
> recompute_all_dominators (void)
> {
>  mark_irreducible_loops ();
>  free_dominance_info (CDI_DOMINATORS);
>  free_dominance_info (CDI_POST_DOMINATORS);
>  calculate_dominance_info (CDI_DOMINATORS);
>  calculate_dominance_info (CDI_POST_DOMINATORS);
> }

Just free them.  All following users are required to eventually
compute them anyway.  Thus,

   free_dominance_info (CDI_DOMINATORS);

if you didn't compute post-dominators they shouldn't be available.

Richard.

Reply via email to