Re: IVs optimization issue

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

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 aurelien.buhrig@gmail.com wrote: Le 29/02/2012 17:08, Richard Guenther a écrit : On Wed, Feb 29, 2012 at 4:41 PM, Aurelien Buhrig aurelien.buhrig@gmail.com wrote: Le 29/02/2012 16:15,

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

Re: IVs optimization issue

2012-02-29 Thread Richard Guenther
On Wed, Feb 29, 2012 at 9:11 AM, Aurelien Buhrig aurelien.buhrig@gmail.com 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

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 in

Re: IVs optimization issue

2012-02-29 Thread Richard Guenther
On Wed, Feb 29, 2012 at 4:08 PM, Aurelien Buhrig aurelien.buhrig@gmail.com 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

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 aurelien.buhrig@gmail.com 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

Re: IVs optimization issue

2012-02-29 Thread Richard Guenther
On Wed, Feb 29, 2012 at 4:41 PM, Aurelien Buhrig aurelien.buhrig@gmail.com wrote: Le 29/02/2012 16:15, Richard Guenther a écrit : On Wed, Feb 29, 2012 at 4:08 PM, Aurelien Buhrig aurelien.buhrig@gmail.com wrote: The issue is most probably that on GIMPLE we only deal with ptr_mode,

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 aurelien.buhrig@gmail.com wrote: Le 29/02/2012 16:15, Richard Guenther a écrit : On Wed, Feb 29, 2012 at 4:08 PM, Aurelien Buhrig aurelien.buhrig@gmail.com wrote: The issue is most