This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR55833 + cheaper checking
Hi,
> > Yes, you should check whether you are in an irreducible loop. This is done by
> > testing EDGE_IRREDUCIBLE_LOOP flag,
>
> Alright, I was wondering whether there's any other way. Unfortunately,
> here I couldn't do something like
>
> if (loop_preheader_edge (loop)->flags & EDGE_IRREDUCIBLE_LOOP)
> ...
> because we're natural loop in a subloop, so I abused the loop exits of
> this loop. Hopefully I'm not doing something evil.
>
> Updated patch attached. Ok if testing passes? Thanks,
yes, this is OK,
Zdenek
> 2013-01-14 Richard Biener <rguenther@suse.de>
> Marek Polacek <polacek@redhat.com>
>
> PR rtl-optimization/55833
> * loop-unswitch.c (unswitch_loops): Move loop verification...
> (unswitch_single_loop): ...here. Call mark_irreducible_loops.
> * cfgloopmanip.c (fix_loop_placement): Add IRRED_INVALIDATED parameter.
> Set it to true when we're removing a loop from hierarchy tree in
> an irreducible region.
> (fix_bb_placements): Adjust caller.
> (fix_loop_placements): Likewise.
>
> * gcc.dg/pr55833.c: New test.