[PATCH] Update if-conversion for AV

Richard Henderson rth@redhat.com
Tue Sep 21 23:49:00 GMT 2004


On Tue, Sep 21, 2004 at 03:07:03PM -0700, Devang Patel wrote:
> >>+   /* Now if possible, merge loop header and block with exit edge.
> >>+      This reduces number of basic blocks to 2. Auto vectorizer 
> >>addresses
> >>+      loops with two nodes only.  */
> >>+   if (exit_bb != loop->latch && empty_block_p (loop->latch))
> >>+     {
> >>+       if (can_merge_blocks_p (loop->header, exit_bb))
> >>+ 	{
> >>+ 	  merge_blocks (loop->header, exit_bb);
> >>+ 	  loop->num_nodes--;
> >>+ 	}
> >
> >Why not just run a cleanup_cfg pass?
> 
> Thinking like ... Instead of one entire pass why not just
> merge two blocks that we know?

Because of that conditional, mostly.  It doesn't look right,
and even if it is, it seems like something easy to get wrong.
That knowledge surely already exists elsewhere.


r~



More information about the Gcc-patches mailing list