From 30a555d98e236182b101830e65150b128727a8b9 Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Wed, 4 Aug 2004 19:38:34 -0400 Subject: [PATCH] rs6000.c (rs6000_rtx_costs): LABEL_REFs are zero cost. * config/rs6000/rs6000.c (rs6000_rtx_costs): LABEL_REFs are zero cost. From-SVN: r85582 --- gcc/ChangeLog | 7 ++++++- gcc/config/rs6000/rs6000.c | 8 +++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9f50220cb06..e480dd1e095 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-08-04 David Edelsohn + + * config/rs6000/rs6000.c (rs6000_rtx_costs): LABEL_REFs are zero + cost. + 2004-08-04 Jan Hubicka * basic-block.h (profile_staus): New global variable. @@ -206,7 +211,7 @@ * config/i386/xmmintrin.h: Include . 2004-08-03 H.J. Lu - Tanguy Fautrà + Tanguy Fautrà * config/i386/pmm_malloc.h: New file. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index b5710946eb3..035c02599c7 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -16520,8 +16520,7 @@ rs6000_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, switch (code) { - /* On the RS/6000, if it is valid in the insn, it is free. - So this always returns 0. */ + /* On the RS/6000, if it is valid in the insn, it is free. */ case CONST_INT: if (((outer_code == SET || outer_code == PLUS @@ -16591,7 +16590,6 @@ rs6000_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, case CONST: case HIGH: - case LABEL_REF: case SYMBOL_REF: case MEM: /* When optimizing for size, MEM should be slightly more expensive @@ -16600,6 +16598,10 @@ rs6000_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, *total = optimize_size ? COSTS_N_INSNS (1) + 1 : COSTS_N_INSNS (2); return true; + case LABEL_REF: + *total = 0; + return true; + case PLUS: if (mode == DFmode) { -- 2.30.2