This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix RTL sharing bug in loop unswitching (PR rtl-optimization/52092)
- From: Zdenek Dvorak <rakdver at iuuk dot mff dot cuni dot cz>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Eric Botcazou <ebotcazou at adacore dot com>, Richard Guenther <rguenther at suse dot de>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 3 Feb 2012 09:17:23 +0100
- Subject: Re: [PATCH] Fix RTL sharing bug in loop unswitching (PR rtl-optimization/52092)
- References: <20120202191227.GA18768@tyan-ft48-01.lab.bos.redhat.com>
> It seems loop-iv.c happily creates shared RTL in lots of places,
> loop-unroll.c solves that by unsharing everything it adds, this is
> an attempt to do the same in unswitching to unshare everything iv_analyze
> came up with.
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
I would suggest to move the unsharing to the point where it is clear that
the rtl will added, i.e.,
nloop = unswitch_loop (loop, bbs[i], cond, cinsn);
nloop = unswitch_loop (loop, bbs[i], copy_rtx_if_shared (cond), cinsn);