On Thu, Jun 18, 2015 at 9:25 AM, Tom de Vries <tom_devr...@mentor.com> wrote: > Hi, > > transform_to_exit_first_loop contains the following comment: > ... > /* Make sure that we have phi nodes on exit for all loop header phis > (create_parallel_loop requires that). */ > ... > > I ran into a problem where after transform_to_exit_first_loop_alt this > property does not hold for virtuals, and we run into trouble in > create_parallel_loop. > > The patch ensures that the property holds at the start of > transform_to_exit_first_loop_alt, which has as effect that: > - we simplify transform_to_exit_first_loop_alt a bit, and > - since the property is kept by transform_to_exit_first_loop_alt, > the property will be valid after transform_to_exit_first_loop_alt. > > Bootstrapped and reg-tested on x86_64. > > Committed to gomp-4_0-branch. > > OK for trunk?
I once made virtual-operands loop-closed but then somehow I didn't get it correct (I suppose I ran into the trap of the existing machinery using update_ssa to update out-of-loop uses) and removed that capability again. So instead of adding another limited machinery inside tree-parloops can you instead make it available from tree-ssa-loop-manip.c, eventually sharing some code? Other passes would benefit from this as well and it could save some compile-time as they wouldn't need to rewrite the virtual operands all the time. Thanks, Richard. > Thanks, > - Tom