This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [Patch,AVR]: Fix rtx_costs of SYMBOL_REF
- From: "Weddington, Eric" <Eric dot Weddington at atmel dot com>
- To: "Georg-Johann Lay" <avr at gjlay dot de>, <gcc-patches at gcc dot gnu dot org>
- Cc: "Anatoly Sokolov" <aesok at post dot ru>, "Denis Chertykov" <chertykov at gmail dot com>, "Richard Henderson" <rth at redhat dot com>
- Date: Wed, 20 Jul 2011 08:41:00 -0600
- Subject: RE: [Patch,AVR]: Fix rtx_costs of SYMBOL_REF
- References: <4E26E32B.5070505@gjlay.de>
> -----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;