This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



> -----Original Message-----
> From: Georg-Johann Lay [mailto:avr@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
> 
> This is a mini-patch to fix rtx_costs for SYMBOL_REF.
> 
<snip> 
> 
> OK to commit?


Yes, please commit.

Eric Weddington


> Johann
> 
> 	* config/avr/avr.c (avr_rtx_costs): Set cost of SYMBOL_REF to 0.
> 
> Index: config/avr/avr.c
> ===================================================================
> --- config/avr/avr.c	(revision 176276)
> +++ config/avr/avr.c	(working copy)
> @@ -5341,6 +5341,7 @@ avr_rtx_costs (rtx x, int codearg, int o
>      {
>      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
>      case MEM:
>      case CONST:
>      case LABEL_REF:
> -    case SYMBOL_REF:
>        *total = COSTS_N_INSNS (GET_MODE_SIZE (mode));
>        return true;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]