* config/avr/avr.c (avr_rtx_costs): Set cost of SYMBOL_REF to 0.
authorGeorg-Johann Lay <gjl@gcc.gnu.org>
Wed, 20 Jul 2011 15:10:13 +0000 (15:10 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Wed, 20 Jul 2011 15:10:13 +0000 (15:10 +0000)
From-SVN: r176516

gcc/ChangeLog
gcc/config/avr/avr.c

index ca0dfa0..6f09fc5 100644 (file)
@@ -1,3 +1,7 @@
+2011-07-20  Georg-Johann Lay  <avr@gjlay.de>
+
+       * config/avr/avr.c (avr_rtx_costs): Set cost of SYMBOL_REF to 0.
+
 2011-07-20  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
 
        * config/s390/s390.c (s390_class_max_nregs): Fix return type.
 
        * 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.
 
index ebfec0d..7364f1b 100644 (file)
@@ -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;