Re: [PATCH, c] all plattforms: support using a CC_REG instead cc0_rtx

2019-12-15 Thread Segher Boessenkool
On Sun, Dec 15, 2019 at 03:45:34PM -0700, Jeff Law wrote: > For x86, patterns which set/clobber the condition codes have explicit > sets/clobbers of the flags register. As a result the dataflow is > accurately represented and the optimizers don't really have to do > anything special. It's no diff

Re: [PATCH, c] all plattforms: support using a CC_REG instead cc0_rtx

2019-12-15 Thread Jeff Law
On Sat, 2019-12-14 at 03:55 +0100, Stefan Franke wrote: > Am 2019-12-13 21:59, schrieb Segher Boessenkool: > > On Fri, Dec 13, 2019 at 08:55:15PM +0100, Stefan Franke wrote: > > > Am 2019-12-13 18:58, schrieb Segher Boessenkool: > > > > On Fri, Dec 13, 2019 at 05:25:41PM +0100, Stefan Franke wrote:

Re: [PATCH, c] all plattforms: support using a CC_REG instead cc0_rtx

2019-12-15 Thread Jeff Law
On Fri, 2019-12-13 at 17:25 +0100, Stefan Franke wrote: > Hi there, > > I suggest this patch to allow architectures do substitute cc0_rtx with a > generated cc register. > > Why? If you are using a cc register plus your architecture as many > instructions which may clobber that cc register, som

Re: [PATCH, c] all plattforms: support using a CC_REG instead cc0_rtx

2019-12-13 Thread Stefan Franke
Am 2019-12-14 04:03, schrieb Andrew Pinski: On Fri, Dec 13, 2019 at 6:56 PM Stefan Franke wrote: Am 2019-12-13 21:59, schrieb Segher Boessenkool: > On Fri, Dec 13, 2019 at 08:55:15PM +0100, Stefan Franke wrote: >> Am 2019-12-13 18:58, schrieb Segher Boessenkool: >> >On Fri, Dec 13, 2019 at 05:

Re: [PATCH, c] all plattforms: support using a CC_REG instead cc0_rtx

2019-12-13 Thread Andrew Pinski
On Fri, Dec 13, 2019 at 6:56 PM Stefan Franke wrote: > > Am 2019-12-13 21:59, schrieb Segher Boessenkool: > > On Fri, Dec 13, 2019 at 08:55:15PM +0100, Stefan Franke wrote: > >> Am 2019-12-13 18:58, schrieb Segher Boessenkool: > >> >On Fri, Dec 13, 2019 at 05:25:41PM +0100, Stefan Franke wrote: >

Re: [PATCH, c] all plattforms: support using a CC_REG instead cc0_rtx

2019-12-13 Thread Stefan Franke
Am 2019-12-13 21:59, schrieb Segher Boessenkool: On Fri, Dec 13, 2019 at 08:55:15PM +0100, Stefan Franke wrote: Am 2019-12-13 18:58, schrieb Segher Boessenkool: >On Fri, Dec 13, 2019 at 05:25:41PM +0100, Stefan Franke wrote: >>Why? If you are using a cc register plus your architecture as many >>

Re: [PATCH, c] all plattforms: support using a CC_REG instead cc0_rtx

2019-12-13 Thread Segher Boessenkool
On Fri, Dec 13, 2019 at 08:55:15PM +0100, Stefan Franke wrote: > Am 2019-12-13 18:58, schrieb Segher Boessenkool: > >On Fri, Dec 13, 2019 at 05:25:41PM +0100, Stefan Franke wrote: > >>Why? If you are using a cc register plus your architecture as many > >>instructions which may clobber that cc regis

Re: [PATCH, c] all plattforms: support using a CC_REG instead cc0_rtx

2019-12-13 Thread Stefan Franke
Am 2019-12-13 18:58, schrieb Segher Boessenkool: Hi! On Fri, Dec 13, 2019 at 05:25:41PM +0100, Stefan Franke wrote: I suggest this patch to allow architectures do substitute cc0_rtx with a generated cc register. Why? If you are using a cc register plus your architecture as many instructions w

Re: [PATCH, c] all plattforms: support using a CC_REG instead cc0_rtx

2019-12-13 Thread Segher Boessenkool
Hi! On Fri, Dec 13, 2019 at 05:25:41PM +0100, Stefan Franke wrote: > I suggest this patch to allow architectures do substitute cc0_rtx with a > generated cc register. > > Why? If you are using a cc register plus your architecture as many > instructions which may clobber that cc register, some p

[PATCH, c] all plattforms: support using a CC_REG instead cc0_rtx

2019-12-13 Thread Stefan Franke
Hi there, I suggest this patch to allow architectures do substitute cc0_rtx with a generated cc register. Why? If you are using a cc register plus your architecture as many instructions which may clobber that cc register, some passes (e.g. gcse) will reorder the insns. This can lead to the s