On Fri, 14 Sep 2012, Steven Bosscher wrote:

> On Fri, Sep 14, 2012 at 12:50 PM, Richard Guenther wrote:
> >> Yikes, I didn't know about my_rev_post_order_compute. How horrible!
> >> That function doesn't compute reverse post-order of the CFG, but a
> >> post-order of the reverse CFG!
> >
> > Ok, well - then that's what we need for compute_antic to have
> > minimal number of iterations and it is what VRP needs.  Visit
> > all successors before BB if possible.
> 
> Right, visit all successors of BB before BB itself, aka visiting in
> topological order of the reverse CFG. But your
> my_rev_post_order_compute doesn't actually compute a post-order of the
> reverse CFG. The first block pushed into the array is EXIT_BLOCK, iff
> include_entry_exit==true. Fortunately, the function is only ever
> called with include_entry_exit==false.

Oops.

If you can figure out a better name for the function we should
probably move it to cfganal.c

Richard.

Reply via email to