Re: [Patch ifcvt costs 0/3] Introduce a new target hook for ifcvt costs.

2015-10-09 Thread Jeff Law
On 10/09/2015 05:28 AM, Bernd Schmidt wrote: I don't know whether you've done any more work on the patch series, but I think I've made up my mind that optimizing the sequence before computing its cost would be a good thing to try first. Either with a better expander interface which generates the

Re: [Patch ifcvt costs 0/3] Introduce a new target hook for ifcvt costs.

2015-10-09 Thread Bernd Schmidt
On 10/01/2015 11:37 AM, Bernd Schmidt wrote: On 09/29/2015 04:31 PM, James Greenhalgh wrote: On the other side of the equation, we want a cost for the converted sequence. We can build a cost of the generated rtl sequence, but for targets like AArch64 this is going to be wildly off. AArch64 will

Re: [Patch ifcvt costs 0/3] Introduce a new target hook for ifcvt costs.

2015-10-01 Thread Bernd Schmidt
On 09/29/2015 04:31 PM, James Greenhalgh wrote: On the other side of the equation, we want a cost for the converted sequence. We can build a cost of the generated rtl sequence, but for targets like AArch64 this is going to be wildly off. AArch64 will expand (a > b) ? x : y; as a set to the CC reg

Re: [Patch ifcvt costs 0/3] Introduce a new target hook for ifcvt costs.

2015-09-30 Thread Mike Stump
On Sep 30, 2015, at 1:04 AM, Richard Biener wrote: > So what about a branch_cost hook that takes taken/not-taken probabilities as > argument? So, for my port, I need to know %prediction as well to calculate cost. I know, kinda sucks. Or put another way, I want to explain the cost taken, predi

Re: [Patch ifcvt costs 0/3] Introduce a new target hook for ifcvt costs.

2015-09-30 Thread Richard Biener
On Tue, Sep 29, 2015 at 4:31 PM, James Greenhalgh wrote: > On Tue, Sep 29, 2015 at 11:16:37AM +0100, Richard Biener wrote: >> On Fri, Sep 25, 2015 at 5:04 PM, James Greenhalgh >> wrote: >> > Hi, >> > >> > In relation to the patch I put up for review a few weeks ago to teach >> > RTL if-convert to

Re: [Patch ifcvt costs 0/3] Introduce a new target hook for ifcvt costs.

2015-09-30 Thread Richard Biener
On Tue, Sep 29, 2015 at 9:23 PM, Mike Stump wrote: > On Sep 29, 2015, at 7:31 AM, James Greenhalgh > wrote: >> On Tue, Sep 29, 2015 at 11:16:37AM +0100, Richard Biener wrote: >>> On Fri, Sep 25, 2015 at 5:04 PM, James Greenhalgh >>> wrote: In relation to the patch I put up for review

Re: [Patch ifcvt costs 0/3] Introduce a new target hook for ifcvt costs.

2015-09-29 Thread Mike Stump
On Sep 29, 2015, at 7:31 AM, James Greenhalgh wrote: > On Tue, Sep 29, 2015 at 11:16:37AM +0100, Richard Biener wrote: >> On Fri, Sep 25, 2015 at 5:04 PM, James Greenhalgh >> wrote: >>> >>> In relation to the patch I put up for review a few weeks ago to teach >>> RTL if-convert to handle multipl

Re: [Patch ifcvt costs 0/3] Introduce a new target hook for ifcvt costs.

2015-09-29 Thread James Greenhalgh
On Tue, Sep 29, 2015 at 11:16:37AM +0100, Richard Biener wrote: > On Fri, Sep 25, 2015 at 5:04 PM, James Greenhalgh > wrote: > > Hi, > > > > In relation to the patch I put up for review a few weeks ago to teach > > RTL if-convert to handle multiple sets in a basic block [1], I was > > asking about

Re: [Patch ifcvt costs 0/3] Introduce a new target hook for ifcvt costs.

2015-09-29 Thread Richard Biener
On Fri, Sep 25, 2015 at 5:04 PM, James Greenhalgh wrote: > Hi, > > In relation to the patch I put up for review a few weeks ago to teach > RTL if-convert to handle multiple sets in a basic block [1], I was > asking about a sensible cost model to use. There was some consensus at > Cauldron that wha

[Patch ifcvt costs 0/3] Introduce a new target hook for ifcvt costs.

2015-09-25 Thread James Greenhalgh
Hi, In relation to the patch I put up for review a few weeks ago to teach RTL if-convert to handle multiple sets in a basic block [1], I was asking about a sensible cost model to use. There was some consensus at Cauldron that what should be done in this situation is to introduce a target hook that