Re: [Patch,AVR]: Fix rtx_costs of SYMBOL_REF

2011-07-21 Thread Georg-Johann Lay
Richard Henderson wrote: > On 07/20/2011 07:16 AM, Georg-Johann Lay wrote: >> case CONST_INT: >> case CONST_DOUBLE: >> +case SYMBOL_REF: >>/* Immediate constants are as cheap as registers. */ >>*total = 0; >>return true; >> @@ -5348,7 +5349,6 @@ avr_rtx_costs

Re: [Patch,AVR]: Fix rtx_costs of SYMBOL_REF

2011-07-20 Thread Richard Henderson
On 07/20/2011 07:16 AM, Georg-Johann Lay wrote: > case CONST_INT: > case CONST_DOUBLE: > +case SYMBOL_REF: >/* Immediate constants are as cheap as registers. */ >*total = 0; >return true; > @@ -5348,7 +5349,6 @@ avr_rtx_costs (rtx x, int codearg, int o >

RE: [Patch,AVR]: Fix rtx_costs of SYMBOL_REF

2011-07-20 Thread Weddington, Eric
> -Original Message- > From: Georg-Johann Lay [mailto:a...@gjlay.de] > Sent: Wednesday, July 20, 2011 8:16 AM > To: gcc-patches@gcc.gnu.org > Cc: Anatoly Sokolov; Denis Chertykov; Weddington, Eric; Richard Henderson > Subject: [Patch,AVR]: Fix rtx_costs of SYMBOL_REF &

[Patch,AVR]: Fix rtx_costs of SYMBOL_REF

2011-07-20 Thread Georg-Johann Lay
This is a mini-patch to fix rtx_costs for SYMBOL_REF. The cost of a SYMBOL_REF is the same as a CONST_INT because it can be used the same way. I observed small performance regression in my code and found that the reason is too high cost for SYMBOL_REF. char x[10]; char getx2 (unsigned char i, u