Re: IVs optimization issue

2012-03-01 Thread Aurelien Buhrig
Le 01/03/2012 11:09, Richard Guenther a écrit : > On Wed, Feb 29, 2012 at 6:02 PM, Aurelien Buhrig > wrote: >> Le 29/02/2012 17:08, Richard Guenther a écrit : >>> On Wed, Feb 29, 2012 at 4:41 PM, Aurelien Buhrig >>> wrote: Le 29/02/2012 16:15, Richard Guenther a écrit : > On Wed, Feb 29,

Re: IVs optimization issue

2012-03-01 Thread Richard Guenther
On Wed, Feb 29, 2012 at 6:02 PM, Aurelien Buhrig wrote: > Le 29/02/2012 17:08, Richard Guenther a écrit : >> On Wed, Feb 29, 2012 at 4:41 PM, Aurelien Buhrig >> wrote: >>> Le 29/02/2012 16:15, Richard Guenther a écrit : On Wed, Feb 29, 2012 at 4:08 PM, Aurelien Buhrig wrote: >

Re: IVs optimization issue

2012-02-29 Thread Aurelien Buhrig
Le 29/02/2012 17:08, Richard Guenther a écrit : > On Wed, Feb 29, 2012 at 4:41 PM, Aurelien Buhrig > wrote: >> Le 29/02/2012 16:15, Richard Guenther a écrit : >>> On Wed, Feb 29, 2012 at 4:08 PM, Aurelien Buhrig >>> wrote: > The issue is most probably that on GIMPLE we only deal with ptr

Re: IVs optimization issue

2012-02-29 Thread Richard Guenther
On Wed, Feb 29, 2012 at 4:41 PM, Aurelien Buhrig wrote: > Le 29/02/2012 16:15, Richard Guenther a écrit : >> On Wed, Feb 29, 2012 at 4:08 PM, Aurelien Buhrig >> wrote: >>> The issue is most probably that on GIMPLE we only deal with ptr_mode, not Pmode, and IVOPTs thinks that pointer ind

Re: IVs optimization issue

2012-02-29 Thread Aurelien Buhrig
Le 29/02/2012 16:15, Richard Guenther a écrit : > On Wed, Feb 29, 2012 at 4:08 PM, Aurelien Buhrig > wrote: >> >>> The issue is most probably that on GIMPLE we only deal with ptr_mode, >>> not Pmode, and IVOPTs thinks that pointer induction variables will >>> have ptr_mode. To fix this the cost c

Re: IVs optimization issue

2012-02-29 Thread Richard Guenther
On Wed, Feb 29, 2012 at 4:08 PM, Aurelien Buhrig wrote: > >> The issue is most probably that on GIMPLE we only deal with ptr_mode, >> not Pmode, and IVOPTs thinks that pointer induction variables will >> have ptr_mode.  To fix this the cost computation would need to take >> into account ptr_mode t

Re: IVs optimization issue

2012-02-29 Thread Aurelien Buhrig
> The issue is most probably that on GIMPLE we only deal with ptr_mode, > not Pmode, and IVOPTs thinks that pointer induction variables will > have ptr_mode. To fix this the cost computation would need to take > into account ptr_mode to Pmode conversions _and_ would need to > consider Pmode IVs i

Re: IVs optimization issue

2012-02-29 Thread Richard Guenther
On Wed, Feb 29, 2012 at 9:11 AM, Aurelien Buhrig wrote: > Hi, > > I'm porting a gcc backend (4.6.1) for a 16-bit MCU with PSI pmode, and > SI ptr_mode. > > I have a QoR problem with loops: the chosen IVs are often not good. > I looked at tree-ssa-loop-ivopts.c but it is hard to understand that > c

IVs optimization issue

2012-02-29 Thread Aurelien Buhrig
Hi, I'm porting a gcc backend (4.6.1) for a 16-bit MCU with PSI pmode, and SI ptr_mode. I have a QoR problem with loops: the chosen IVs are often not good. I looked at tree-ssa-loop-ivopts.c but it is hard to understand that code. So sorry if my questions are a bit confused but I would like to un