Re: [PATCH 1/4][PR tree-optimization/78496] Don't simplify conditionals too early in VRP

2017-05-08 Thread Jeff Law
On 05/08/2017 01:32 AM, Richard Biener wrote: Note that I tried last stage3 (it ended up being too late) to get rid of ASSERT_EXPRs doing substitute-and-fold itself (basically copy-propagate them out at this point rather than as a separate thing later). This is because the ASSERT_EXPR uses inte

Re: [PATCH 1/4][PR tree-optimization/78496] Don't simplify conditionals too early in VRP

2017-05-08 Thread Richard Biener via gcc-patches
On Fri, May 5, 2017 at 10:53 PM, Jeff Law wrote: > On 05/04/2017 08:37 AM, Jeff Law wrote: >> >> >> You understanding is slightly wrong however, The ASSERT_EXPRs and >> conditionals map 100% through propagation and into simplification. It's >> only during simplification that we lose the direct m

Re: [PATCH 1/4][PR tree-optimization/78496] Don't simplify conditionals too early in VRP

2017-05-05 Thread Jeff Law
On 05/04/2017 08:37 AM, Jeff Law wrote: You understanding is slightly wrong however, The ASSERT_EXPRs and conditionals map 100% through propagation and into simplification. It's only during simplification that we lose the direct mapping as we change the conditional in order to remove the un

Re: [PATCH 1/4][PR tree-optimization/78496] Don't simplify conditionals too early in VRP

2017-05-04 Thread Jeff Law
On 05/04/2017 04:59 AM, Richard Biener wrote: I think this is a hack ;) Basically the issue is that jump-threading uses ASSERT_EXPRs at all (which are an implementation detail of VRP). As far as I understand it does that because VRP can do "fancy" things and create ASSERT_EXPRs that do not di

Re: [PATCH 1/4][PR tree-optimization/78496] Don't simplify conditionals too early in VRP

2017-05-04 Thread Richard Biener
On Wed, May 3, 2017 at 6:32 PM, Jeff Law wrote: > [ With the patch attached... ] > > > On 05/03/2017 10:31 AM, Jeff Law wrote: >> >> This is the first of 3-5 patches to address pr78496. >> >> The goal of these patches is to catch jump threads earlier in the pipeline >> to avoid undesirable behavio

Re: [PATCH 1/4][PR tree-optimization/78496] Don't simplify conditionals too early in VRP

2017-05-03 Thread Jeff Law
On 05/03/2017 10:55 AM, Bin.Cheng wrote: On Wed, May 3, 2017 at 5:32 PM, Jeff Law wrote: [ With the patch attached... ] On 05/03/2017 10:31 AM, Jeff Law wrote: This is the first of 3-5 patches to address pr78496. The goal of these patches is to catch jump threads earlier in the pipeline to

Re: [PATCH 1/4][PR tree-optimization/78496] Don't simplify conditionals too early in VRP

2017-05-03 Thread Bin.Cheng
On Wed, May 3, 2017 at 5:32 PM, Jeff Law wrote: > [ With the patch attached... ] > > > On 05/03/2017 10:31 AM, Jeff Law wrote: >> >> This is the first of 3-5 patches to address pr78496. >> >> The goal of these patches is to catch jump threads earlier in the pipeline >> to avoid undesirable behavio

Re: [PATCH 1/4][PR tree-optimization/78496] Don't simplify conditionals too early in VRP

2017-05-03 Thread Jeff Law
[ With the patch attached... ] On 05/03/2017 10:31 AM, Jeff Law wrote: This is the first of 3-5 patches to address pr78496. The goal of these patches is to catch jump threads earlier in the pipeline to avoid undesirable behavior in PRE and more generally be able to exploit the secondary oppor

[PATCH 1/4][PR tree-optimization/78496] Don't simplify conditionals too early in VRP

2017-05-03 Thread Jeff Law
This is the first of 3-5 patches to address pr78496. The goal of these patches is to catch jump threads earlier in the pipeline to avoid undesirable behavior in PRE and more generally be able to exploit the secondary opportunities exposed by jump threading. One of the more serious issues I fo