Re: [rtlanal] Do a better job of costing parallel sets containing flag-setting operations.

2017-06-30 Thread Jeff Law
On 06/30/2017 03:03 AM, Richard Earnshaw (lists) wrote: > On 19/06/17 14:46, Richard Earnshaw (lists) wrote: >> Many parallel set insns are of the form of a single set that also sets >> the condition code flags. In this case the cost of such an insn is >> normally the cost of the part that doesn't

Re: [rtlanal] Do a better job of costing parallel sets containing flag-setting operations.

2017-06-30 Thread Richard Earnshaw (lists)
On 19/06/17 14:46, Richard Earnshaw (lists) wrote: > Many parallel set insns are of the form of a single set that also sets > the condition code flags. In this case the cost of such an insn is > normally the cost of the part that doesn't set the flags, since updating > the condition flags is simpl

Re: [rtlanal] Do a better job of costing parallel sets containing flag-setting operations.

2017-06-20 Thread Segher Boessenkool
On Mon, Jun 19, 2017 at 12:40:53PM -0500, Segher Boessenkool wrote: > On Mon, Jun 19, 2017 at 05:01:10PM +0100, Richard Earnshaw (lists) wrote: > > Yeah, and I'm not suggesting we change the logic there (sorry if the > > description was misleading). Instead I'm proposing that we handle more > > ca

Re: [rtlanal] Do a better job of costing parallel sets containing flag-setting operations.

2017-06-19 Thread Segher Boessenkool
On Mon, Jun 19, 2017 at 05:01:10PM +0100, Richard Earnshaw (lists) wrote: > Yeah, and I'm not suggesting we change the logic there (sorry if the > description was misleading). Instead I'm proposing that we handle more > cases for parallels to not return zero. Right. My test run is half way throu

Re: [rtlanal] Do a better job of costing parallel sets containing flag-setting operations.

2017-06-19 Thread Richard Earnshaw (lists)
On 19/06/17 16:09, Segher Boessenkool wrote: > On Mon, Jun 19, 2017 at 03:45:23PM +0100, Richard Earnshaw (lists) wrote: At present all such insns are treated as having unknown cost (ie 0) and combine assumes that such insns are infinitely more expensive than any other insn sequence

Re: [rtlanal] Do a better job of costing parallel sets containing flag-setting operations.

2017-06-19 Thread Segher Boessenkool
On Mon, Jun 19, 2017 at 03:45:23PM +0100, Richard Earnshaw (lists) wrote: > >> At present all such insns are treated as having unknown cost (ie 0) and > >> combine assumes that such insns are infinitely more expensive than any > >> other insn sequence with a non-zero cost. > > > > That's not what

Re: [rtlanal] Do a better job of costing parallel sets containing flag-setting operations.

2017-06-19 Thread Segher Boessenkool
On Mon, Jun 19, 2017 at 03:28:20PM +0100, Richard Earnshaw (lists) wrote: > > That's not what combine does: it optimistically assumes any combination > > with unknown costs is an improvement. > > So try this testcase on ARM. > > unsigned long x, y, z; > int b; > void test() > { >b = __builtin

Re: [rtlanal] Do a better job of costing parallel sets containing flag-setting operations.

2017-06-19 Thread Richard Earnshaw (lists)
On 19/06/17 15:08, Segher Boessenkool wrote: > Hi! > > On Mon, Jun 19, 2017 at 02:46:59PM +0100, Richard Earnshaw (lists) wrote: >> Many parallel set insns are of the form of a single set that also sets >> the condition code flags. In this case the cost of such an insn is >> normally the cost of

Re: [rtlanal] Do a better job of costing parallel sets containing flag-setting operations.

2017-06-19 Thread Richard Earnshaw (lists)
On 19/06/17 15:08, Segher Boessenkool wrote: > Hi! > > On Mon, Jun 19, 2017 at 02:46:59PM +0100, Richard Earnshaw (lists) wrote: >> Many parallel set insns are of the form of a single set that also sets >> the condition code flags. In this case the cost of such an insn is >> normally the cost of

Re: [rtlanal] Do a better job of costing parallel sets containing flag-setting operations.

2017-06-19 Thread Segher Boessenkool
Hi! On Mon, Jun 19, 2017 at 02:46:59PM +0100, Richard Earnshaw (lists) wrote: > Many parallel set insns are of the form of a single set that also sets > the condition code flags. In this case the cost of such an insn is > normally the cost of the part that doesn't set the flags, since updating >

[rtlanal] Do a better job of costing parallel sets containing flag-setting operations.

2017-06-19 Thread Richard Earnshaw (lists)
Many parallel set insns are of the form of a single set that also sets the condition code flags. In this case the cost of such an insn is normally the cost of the part that doesn't set the flags, since updating the condition flags is simply a side effect. At present all such insns are treated as