From 73451ae7855681759cde520c001171d9d1bede96 Mon Sep 17 00:00:00 2001 From: Georg-Johann Lay Date: Wed, 20 Jul 2011 15:10:13 +0000 Subject: [PATCH] * config/avr/avr.c (avr_rtx_costs): Set cost of SYMBOL_REF to 0. From-SVN: r176516 --- gcc/ChangeLog | 6 +++++- gcc/config/avr/avr.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ca0dfa0a170..6f09fc5bfe2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2011-07-20 Georg-Johann Lay + + * config/avr/avr.c (avr_rtx_costs): Set cost of SYMBOL_REF to 0. + 2011-07-20 Andreas Krebbel * config/s390/s390.c (s390_class_max_nregs): Fix return type. @@ -907,7 +911,7 @@ * doc/tm.texi.in (TARGET_ASM_MERGEABLE_RODATA_PREFIX): Add hook. * doc/tm.texi: Regenerate. - * target.def (mergeable_rodata_prefix: New defhookpod. + * target.def (mergeable_rodata_prefix): New defhookpod. * varasm.c (mergeable_string_section, mergeable_constant_section): Use it. Allocate name with alloca. diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index ebfec0da024..7364f1b2c6a 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -5332,6 +5332,7 @@ avr_rtx_costs (rtx x, int codearg, int outer_code ATTRIBUTE_UNUSED, int *total, { case CONST_INT: case CONST_DOUBLE: + case SYMBOL_REF: /* Immediate constants are as cheap as registers. */ *total = 0; return true; @@ -5339,7 +5340,6 @@ avr_rtx_costs (rtx x, int codearg, int outer_code ATTRIBUTE_UNUSED, int *total, case MEM: case CONST: case LABEL_REF: - case SYMBOL_REF: *total = COSTS_N_INSNS (GET_MODE_SIZE (mode)); return true; -- 2.30.2