aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2008-08-31 22:49:42 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2008-08-31 20:49:42 +0000
commit899cc0f433d06f9cf914224fe6968e391b903c0b (patch)
tree212dea79b765386b3da5143e55e3a400579610b4 /gcc
parentcd6b7bc60d96bede7b4aa79495523ac997ab7c62 (diff)
downloadgcc-899cc0f433d06f9cf914224fe6968e391b903c0b.zip
gcc-899cc0f433d06f9cf914224fe6968e391b903c0b.tar.gz
gcc-899cc0f433d06f9cf914224fe6968e391b903c0b.tar.bz2
frv.c (frv_rtx_costs): Update forward declaration.
* frv.c (frv_rtx_costs): Update forward declaration. * spu.c (spu_rtx_costs): Likewise. * pdp11.c: Include df.h (pdp11_output_function_epilogue): Use df_set_regs_ever_live. * m68hc11.c (m68hc11_gen_highpart): Fix call of gen_rtx_SUBREG. (m68hc11_rtx_costs_1): Fix call of rtx_cost. * iq2000.c (iq2000_address_cost): Add speed argument. (iq2000_rtx_costs): Likewise. * mn10300.c (mn10300_address_cost_1): Remove speed argument; update call of mn10300_address_cost. * mcore.c: Include df.h (mcore_rtx_costs): Update prototype. * score3.c: Include df.h (score3_rtx_costs): Remove speed argument. * score7.c: Include df.h (score7_address_cost): Remove speed argument. * score-protos.h (score_address_cost): Update prototype. * score.c: Include df.h (score_rtx_costs): Update call of costs functions. * v850.c (v850_rtx_costs): Add bool argument. From-SVN: r139843
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog23
-rw-r--r--gcc/config/frv/frv.c2
-rw-r--r--gcc/config/iq2000/iq2000.c7
-rw-r--r--gcc/config/m68hc11/m68hc11.c5
-rw-r--r--gcc/config/m68hc11/m68hc11.h7
-rw-r--r--gcc/config/mcore/mcore.c3
-rw-r--r--gcc/config/mn10300/mn10300.c4
-rw-r--r--gcc/config/pdp11/pdp11.c3
-rw-r--r--gcc/config/score/score-protos.h2
-rw-r--r--gcc/config/score/score.c5
-rw-r--r--gcc/config/score/score3.c3
-rw-r--r--gcc/config/score/score7.c4
-rw-r--r--gcc/config/spu/spu.c2
-rw-r--r--gcc/config/v850/v850.c2
14 files changed, 49 insertions, 23 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 816130d..2fc2fe7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,26 @@
+2008-08-31 Jan Hubicka <jh@suse.cz>
+
+ * frv.c (frv_rtx_costs): Update forward declaration.
+ * spu.c (spu_rtx_costs): Likewise.
+ * pdp11.c: Include df.h
+ (pdp11_output_function_epilogue): Use df_set_regs_ever_live.
+ * m68hc11.c (m68hc11_gen_highpart): Fix call of gen_rtx_SUBREG.
+ (m68hc11_rtx_costs_1): Fix call of rtx_cost.
+ * iq2000.c (iq2000_address_cost): Add speed argument.
+ (iq2000_rtx_costs): Likewise.
+ * mn10300.c (mn10300_address_cost_1): Remove speed argument;
+ update call of mn10300_address_cost.
+ * mcore.c: Include df.h
+ (mcore_rtx_costs): Update prototype.
+ * score3.c: Include df.h
+ (score3_rtx_costs): Remove speed argument.
+ * score7.c: Include df.h
+ (score7_address_cost): Remove speed argument.
+ * score-protos.h (score_address_cost): Update prototype.
+ * score.c: Include df.h
+ (score_rtx_costs): Update call of costs functions.
+ * v850.c (v850_rtx_costs): Add bool argument.
+
2008-08-31 Hans-Peter Nilsson <hp@axis.com>
* config/cris/cris.c (cris_rtx_costs): Correct call to rtx_costs.
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index 4a57486..1d0174c 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -366,7 +366,7 @@ static void frv_setup_incoming_varargs (CUMULATIVE_ARGS *,
tree, int *, int);
static rtx frv_expand_builtin_saveregs (void);
static void frv_expand_builtin_va_start (tree, rtx);
-static bool frv_rtx_costs (rtx, int, int, int*);
+static bool frv_rtx_costs (rtx, int, int, int*, bool);
static void frv_asm_out_constructor (rtx, int);
static void frv_asm_out_destructor (rtx, int);
static bool frv_function_symbol_referenced_p (rtx);
diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c
index a716e72..b8b1f41 100644
--- a/gcc/config/iq2000/iq2000.c
+++ b/gcc/config/iq2000/iq2000.c
@@ -744,7 +744,7 @@ iq2000_move_1word (rtx operands[], rtx insn, int unsignedp)
/* Provide the costs of an addressing mode that contains ADDR. */
static int
-iq2000_address_cost (rtx addr, bool speec ATTRIBUTE_UNUSED)
+iq2000_address_cost (rtx addr, bool speed)
{
switch (GET_CODE (addr))
{
@@ -795,7 +795,7 @@ iq2000_address_cost (rtx addr, bool speec ATTRIBUTE_UNUSED)
case LABEL_REF:
case HIGH:
case LO_SUM:
- return iq2000_address_cost (plus1) + 1;
+ return iq2000_address_cost (plus1, speed) + 1;
default:
break;
@@ -3203,7 +3203,8 @@ print_operand (FILE *file, rtx op, int letter)
}
static bool
-iq2000_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int * total, bool speed)
+iq2000_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int * total,
+ bool speed ATTRIBUTE_UNUSED)
{
enum machine_mode mode = GET_MODE (x);
diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c
index b19f1e7..6850157 100644
--- a/gcc/config/m68hc11/m68hc11.c
+++ b/gcc/config/m68hc11/m68hc11.c
@@ -1960,7 +1960,7 @@ m68hc11_gen_highpart (enum machine_mode mode, rtx x)
switch (GET_CODE (x))
{
case SUBREG:
- return gen_rtx_SUBREG (mode, XEXP (x, 0), XEXP (x, 1));
+ return gen_rtx_SUBREG (mode, XEXP (x, 0), XINT (x, 1));
case REG:
if (REGNO (x) < FIRST_PSEUDO_REGISTER)
return gen_rtx_REG (mode, REGNO (x));
@@ -5335,7 +5335,8 @@ m68hc11_rtx_costs_1 (rtx x, enum rtx_code code,
+ rtx_cost (XEXP (XEXP (x, 0), 0), code, !optimize_size)
+ rtx_cost (XEXP (XEXP (x, 1), 0), code, !optimize_size);
- total = rtx_cost (XEXP (x, 0), code) + rtx_cost (XEXP (x, 1), code);
+ total = rtx_cost (XEXP (x, 0), code, !optimize_size)
+ + rtx_cost (XEXP (x, 1), code, !optimize_size);
switch (mode)
{
case QImode:
diff --git a/gcc/config/m68hc11/m68hc11.h b/gcc/config/m68hc11/m68hc11.h
index cae57e3..cb789e1 100644
--- a/gcc/config/m68hc11/m68hc11.h
+++ b/gcc/config/m68hc11/m68hc11.h
@@ -1067,18 +1067,15 @@ extern enum reg_class m68hc11_index_reg_class;
local-alloc.c. */
-/* Internal macro, return 1 if REGNO is a valid base register. */
-#define REG_VALID_P(REGNO) ((REGNO) >= 0)
-
extern unsigned char m68hc11_reg_valid_for_base[FIRST_PSEUDO_REGISTER];
#define REG_VALID_FOR_BASE_P(REGNO) \
- (REG_VALID_P (REGNO) && (REGNO) < FIRST_PSEUDO_REGISTER \
+ ((REGNO) < FIRST_PSEUDO_REGISTER \
&& m68hc11_reg_valid_for_base[REGNO])
/* Internal macro, return 1 if REGNO is a valid index register. */
extern unsigned char m68hc11_reg_valid_for_index[FIRST_PSEUDO_REGISTER];
#define REG_VALID_FOR_INDEX_P(REGNO) \
- (REG_VALID_P (REGNO) >= 0 && (REGNO) < FIRST_PSEUDO_REGISTER \
+ ((REGNO) < FIRST_PSEUDO_REGISTER \
&& m68hc11_reg_valid_for_index[REGNO])
/* Internal macro, the nonstrict definition for REGNO_OK_FOR_BASE_P. */
diff --git a/gcc/config/mcore/mcore.c b/gcc/config/mcore/mcore.c
index 229b32e..94ec826 100644
--- a/gcc/config/mcore/mcore.c
+++ b/gcc/config/mcore/mcore.c
@@ -44,6 +44,7 @@
#include "toplev.h"
#include "target.h"
#include "target-def.h"
+#include "df.h"
/* Maximum size we are allowed to grow the stack in a single operation.
If we want more, we must do it in increments of at most this size.
@@ -143,7 +144,7 @@ static const char *mcore_strip_name_encoding (const char *);
static int mcore_const_costs (rtx, RTX_CODE);
static int mcore_and_cost (rtx);
static int mcore_ior_cost (rtx);
-static bool mcore_rtx_costs (rtx, int, int, int *);
+static bool mcore_rtx_costs (rtx, int, int, int *, bool);
static void mcore_external_libcall (rtx);
static bool mcore_return_in_memory (const_tree, const_tree);
static int mcore_arg_partial_bytes (CUMULATIVE_ARGS *,
diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c
index 2774970..f89e075 100644
--- a/gcc/config/mn10300/mn10300.c
+++ b/gcc/config/mn10300/mn10300.c
@@ -1942,7 +1942,7 @@ legitimate_address_p (enum machine_mode mode, rtx x, int strict)
}
static int
-mn10300_address_cost_1 (rtx x, int *unsig, bool speed ATTRIBUTE_UNUSED)
+mn10300_address_cost_1 (rtx x, int *unsig)
{
switch (GET_CODE (x))
{
@@ -1979,7 +1979,7 @@ mn10300_address_cost_1 (rtx x, int *unsig, bool speed ATTRIBUTE_UNUSED)
case EXPR_LIST:
case SUBREG:
case MEM:
- return mn10300_address_cost (XEXP (x, 0));
+ return mn10300_address_cost (XEXP (x, 0), !optimize_size);
case ZERO_EXTEND:
*unsig = 1;
diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c
index 5216797..5d214305 100644
--- a/gcc/config/pdp11/pdp11.c
+++ b/gcc/config/pdp11/pdp11.c
@@ -40,6 +40,7 @@ along with GCC; see the file COPYING3. If not see
#include "tm_p.h"
#include "target.h"
#include "target-def.h"
+#include "df.h"
/*
#define FPU_REG_P(X) ((X)>=8 && (X)<14)
@@ -376,7 +377,7 @@ pdp11_output_function_epilogue (FILE *stream, HOST_WIDE_INT size)
if (frame_pointer_needed)
{
/* hope this is safe - m68k does it also .... */
- df_regs_ever_live_p (FRAME_POINTER_REGNUM) = 0;
+ df_set_regs_ever_live (FRAME_POINTER_REGNUM, false);
for (i =7, j = 0 ; i >= 0 ; i--)
if (df_regs_ever_live_p (i) && ! call_used_regs[i])
diff --git a/gcc/config/score/score-protos.h b/gcc/config/score/score-protos.h
index 4c7963f..972c9f7 100644
--- a/gcc/config/score/score-protos.h
+++ b/gcc/config/score/score-protos.h
@@ -39,7 +39,7 @@ extern const char * score_move (rtx *ops);
extern bool score_unaligned_load (rtx* ops);
extern bool score_unaligned_store (rtx* ops);
extern bool score_block_move (rtx* ops);
-extern int score_address_cost (rtx addr);
+extern int score_address_cost (rtx addr, bool speed);
extern rtx score_function_arg (const CUMULATIVE_ARGS *cum,
enum machine_mode mode,
tree type, int named);
diff --git a/gcc/config/score/score.c b/gcc/config/score/score.c
index 861e5ba..9d0c7dd 100644
--- a/gcc/config/score/score.c
+++ b/gcc/config/score/score.c
@@ -49,6 +49,7 @@
#include "langhooks.h"
#include "score7.h"
#include "score3.h"
+#include "df.h"
#undef TARGET_ASM_FILE_START
#define TARGET_ASM_FILE_START score_asm_file_start
@@ -573,9 +574,9 @@ score_rtx_costs (rtx x, int code, int outer_code, int *total,
bool speed ATTRIBUTE_UNUSED)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
- return score7_rtx_costs (x, code, outer_code, total);
+ return score7_rtx_costs (x, code, outer_code, total, speed);
else if (TARGET_SCORE3)
- return score3_rtx_costs (x, code, outer_code, total);
+ return score3_rtx_costs (x, code, outer_code, total, speed);
gcc_unreachable ();
}
diff --git a/gcc/config/score/score3.c b/gcc/config/score/score3.c
index 3392c41..4bfaae9 100644
--- a/gcc/config/score/score3.c
+++ b/gcc/config/score/score3.c
@@ -49,6 +49,7 @@
#include "langhooks.h"
#include "cfglayout.h"
#include "score3.h"
+#include "df.h"
#define BITSET_P(VALUE, BIT) (((VALUE) & (1L << (BIT))) != 0)
#define INS_BUF_SZ 128
@@ -1155,7 +1156,7 @@ score3_rtx_costs (rtx x, int code, int outer_code, int *total,
/* Implement TARGET_ADDRESS_COST macro. */
int
-score3_address_cost (rtx addr, bool speed ATTRIBUTE_UNUSED)
+score3_address_cost (rtx addr)
{
return score3_address_insns (addr, SImode);
}
diff --git a/gcc/config/score/score7.c b/gcc/config/score/score7.c
index 52234fd..5d507d9 100644
--- a/gcc/config/score/score7.c
+++ b/gcc/config/score/score7.c
@@ -49,6 +49,7 @@
#include "langhooks.h"
#include "cfglayout.h"
#include "score7.h"
+#include "df.h"
#define BITSET_P(VALUE, BIT) (((VALUE) & (1L << (BIT))) != 0)
#define INS_BUF_SZ 128
@@ -1146,8 +1147,7 @@ score7_rtx_costs (rtx x, int code, int outer_code, int *total,
/* Implement TARGET_ADDRESS_COST macro. */
int
-score7_address_cost (rtx addr,
- bool speed ATTRIBUTE_UNUSED)
+score7_address_cost (rtx addr)
{
return score7_address_insns (addr, SImode);
}
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index e22513f..eaece4c 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -126,7 +126,7 @@ static int mem_is_padded_component_ref (rtx x);
static bool spu_assemble_integer (rtx x, unsigned int size, int aligned_p);
static void spu_asm_globalize_label (FILE * file, const char *name);
static unsigned char spu_rtx_costs (rtx x, int code, int outer_code,
- int *total);
+ int *total, bool speed);
static unsigned char spu_function_ok_for_sibcall (tree decl, tree exp);
static void spu_init_libfuncs (void);
static bool spu_return_in_memory (const_tree type, const_tree fntype);
diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c
index d461979..ee72e82 100644
--- a/gcc/config/v850/v850.c
+++ b/gcc/config/v850/v850.c
@@ -53,7 +53,7 @@ static bool v850_handle_option (size_t, const char *, int);
static void const_double_split (rtx, HOST_WIDE_INT *, HOST_WIDE_INT *);
static int const_costs_int (HOST_WIDE_INT, int);
static int const_costs (rtx, enum rtx_code);
-static bool v850_rtx_costs (rtx, int, int, int *);
+static bool v850_rtx_costs (rtx, int, int, int *, bool);
static void substitute_ep_register (rtx, rtx, int, int, rtx *, rtx *);
static void v850_reorg (void);
static int ep_memory_offset (enum machine_mode, int);