This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PING][PATCH, 1/2] Merge rewrite_virtuals_into_loop_closed_ssa from gomp4 branch
- From: Richard Biener <rguenther at suse dot de>
- To: Tom de Vries <Tom_deVries at mentor dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 9 Jul 2015 13:04:41 +0200 (CEST)
- Subject: Re: [PING][PATCH, 1/2] Merge rewrite_virtuals_into_loop_closed_ssa from gomp4 branch
- Authentication-results: sourceware.org; auth=none
- References: <558BB0DE dot 6090700 at mentor dot com> <559A5498 dot 8030206 at mentor dot com> <alpine dot LSU dot 2 dot 11 dot 1507061531560 dot 9923 at zhemvz dot fhfr dot qr> <559BF70D dot 9050201 at mentor dot com> <559E53F9 dot 4030805 at mentor dot com>
On Thu, 9 Jul 2015, Tom de Vries wrote:
> On 07/07/15 17:58, Tom de Vries wrote:
> > > If you can
> > > handle one exit edge I also can't see the difficulty in handling
> > > all exit edges.
> > >
> >
> > Agreed, that doesn't look to complicated. I could call
> > rewrite_virtuals_into_loop_closed_ssa for all loops in
> > rewrite_virtuals_into_loop_closed_ssa, to get non-single_dom_exit loops
> > exercising the code, and fix what breaks.
>
> Hmm, I just realised, it's more complicated than I thought.
>
> In loops with single_dom_exit, the exit dominates the uses outside the loop,
> so I can replace the uses of the def with the uses of the exit phi result.
>
> If !single_dom_exit, the exit(s) may not dominate all uses, and I need to
> insert non-loop-exit phi nodes to deal with that.
Yes. This is why I originally suggested to amend the regular
loop-close-SSA rewriting code.
Richard.