On 11/13/2015 01:23 PM, Jeff Law wrote: > On 11/13/2015 11:09 AM, Richard Biener wrote: > >>> >>> BTW Do we have an API for indicating that new blocks have been added to >>> >>> a loop? If so, then we can likely drop the LOOPS_NEED_FIXUP. >> >> Please. It's called add_to_loop or so. > Haha, the block duplication code was handling this already. So in > theory I can just drop the LOOPS_NEED_FIXUP completely. Testing now. > > jeff > Attached is the committed patch for path splitting. As noted above, we didn't need the LOOPS_NEED_FIXUP in the final version, so that wart is gone :-) I do find myself wondering if this can/should be generalized beyond just paths heading to loop backedges. However to do so I think we'd need to be able to undo this transformation reliably and we'd need some heuristics when to duplicate to expose the redundancy vs rely on PRE techniques and jump threading. I vaguely remember a paper which touched on these topics, but I can't seem to find it. Anyway, bootstrapped and regression tested on x86_64-linux-gnu. Installed on the trunk.