summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2004-03-05 10:17:40 +0000
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2004-03-05 10:17:40 +0000
commitd5790af8baf56df2c67da791338b9e8ff5c576d2 (patch)
treee25808a224115fb6cb5f5a75d510945a3104eb09 /gcc
parente60459edd9d6845f3339b2e89015580ad5bd5184 (diff)
downloadppe42-gcc-d5790af8baf56df2c67da791338b9e8ff5c576d2.tar.gz
ppe42-gcc-d5790af8baf56df2c67da791338b9e8ff5c576d2.zip
2004-02-18 Paolo Bonzini <bonzini@gnu.org>
* cse.c (cse_end_of_basic_block): Make static. * local-alloc.c (function_invariant_p): Move to reload1.c. * loop.c (libcall_other_reg, record_excess_regs): Make static. * reload1.c (function_invariant_p): Moved here from local-alloc.c, made static. * rtl.h (cse_end_of_basic_block, function_invariant_p, libcall_other_reg, record_excess_regs): Remove declarations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78960 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog13
-rw-r--r--gcc/cse.c4
-rw-r--r--gcc/local-alloc.c21
-rw-r--r--gcc/loop.c6
-rw-r--r--gcc/reload1.c22
5 files changed, 42 insertions, 24 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index eaf1236f649..04774a596f6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,16 @@
+2004-03-05 Paolo Bonzini <bonzini@gnu.org>
+
+ * cse.c (cse_end_of_basic_block): Make static.
+ * local-alloc.c (function_invariant_p): Move to
+ reload1.c.
+ * loop.c (libcall_other_reg, record_excess_regs):
+ Make static.
+ * reload1.c (function_invariant_p): Moved here
+ from local-alloc.c, made static.
+ * rtl.h (cse_end_of_basic_block, function_invariant_p,
+ libcall_other_reg, record_excess_regs): Remove
+ declarations.
+
2004-03-05 Kazu Hirata <kazu@cs.umass.edu>
* config/m32r/m32r.c (signed_comparison_operator): Add a
diff --git a/gcc/cse.c b/gcc/cse.c
index 1d3d3a193e9..27732e4c41f 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -639,6 +639,8 @@ static void record_jump_equiv (rtx, int);
static void record_jump_cond (enum rtx_code, enum machine_mode, rtx, rtx,
int);
static void cse_insn (rtx, rtx);
+static void cse_end_of_basic_block (rtx, struct cse_basic_block_data *,
+ int, int, int);
static int addr_affects_sp_p (rtx);
static void invalidate_from_clobbers (rtx);
static rtx cse_process_notes (rtx, rtx);
@@ -6759,7 +6761,7 @@ cse_set_around_loop (rtx x, rtx insn, rtx loop_start)
the current block. The incoming structure's branch path, if any, is used
to construct the output branch path. */
-void
+static void
cse_end_of_basic_block (rtx insn, struct cse_basic_block_data *data,
int follow_jumps, int after_loop, int skip_blocks)
{
diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c
index d71acab4dae..1802d093a69 100644
--- a/gcc/local-alloc.c
+++ b/gcc/local-alloc.c
@@ -759,27 +759,6 @@ memref_used_between_p (rtx memref, rtx start, rtx end)
return 0;
}
-/* Return nonzero if the rtx X is invariant over the current function. */
-/* ??? Actually, the places this is used in reload expect exactly what
- is tested here, and not everything that is function invariant. In
- particular, the frame pointer and arg pointer are special cased;
- pic_offset_table_rtx is not, and this will cause aborts when we
- go to spill these things to memory. */
-
-int
-function_invariant_p (rtx x)
-{
- if (CONSTANT_P (x))
- return 1;
- if (x == frame_pointer_rtx || x == arg_pointer_rtx)
- return 1;
- if (GET_CODE (x) == PLUS
- && (XEXP (x, 0) == frame_pointer_rtx || XEXP (x, 0) == arg_pointer_rtx)
- && CONSTANT_P (XEXP (x, 1)))
- return 1;
- return 0;
-}
-
/* Find registers that are equivalent to a single value throughout the
compilation (either because they can be referenced in memory or are set once
from a single constant). Lower their priority for a register.
diff --git a/gcc/loop.c b/gcc/loop.c
index c4ca250b910..5d458cbabc8 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -263,6 +263,8 @@ static void replace_call_address (rtx, rtx, rtx);
#endif
static rtx skip_consec_insns (rtx, int);
static int libcall_benefit (rtx);
+static rtx libcall_other_reg (rtx, rtx);
+static void record_excess_regs (rtx, rtx, rtx *);
static void ignore_some_movables (struct loop_movables *);
static void force_movables (struct loop_movables *);
static void combine_movables (struct loop_movables *, struct loop_regs *);
@@ -1231,7 +1233,7 @@ scan_loop (struct loop *loop, int flags)
/* Add elements to *OUTPUT to record all the pseudo-regs
mentioned in IN_THIS but not mentioned in NOT_IN_THIS. */
-void
+static void
record_excess_regs (rtx in_this, rtx not_in_this, rtx *output)
{
enum rtx_code code;
@@ -1285,7 +1287,7 @@ record_excess_regs (rtx in_this, rtx not_in_this, rtx *output)
If there are none, return 0.
If there are one or more, return an EXPR_LIST containing all of them. */
-rtx
+static rtx
libcall_other_reg (rtx insn, rtx equiv)
{
rtx note = find_reg_note (insn, REG_RETVAL, NULL_RTX);
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 870570c0956..ce7bf83526e 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -402,6 +402,7 @@ static int reload_reg_free_for_value_p (int, int, int, enum reload_type,
rtx, rtx, int, int);
static int free_for_value_p (int, enum machine_mode, int, enum reload_type,
rtx, rtx, int, int);
+static int function_invariant_p (rtx);
static int reload_reg_reaches_end_p (unsigned int, int, enum reload_type);
static int allocate_reload_reg (struct insn_chain *, int, int);
static int conflicts_with_override (rtx);
@@ -4976,6 +4977,27 @@ free_for_value_p (int regno, enum machine_mode mode, int opnum,
return 1;
}
+/* Return nonzero if the rtx X is invariant over the current function. */
+/* ??? Actually, the places where we use this expect exactly what
+ * is tested here, and not everything that is function invariant. In
+ * particular, the frame pointer and arg pointer are special cased;
+ * pic_offset_table_rtx is not, and this will cause aborts when we
+ * go to spill these things to memory. */
+
+static int
+function_invariant_p (rtx x)
+{
+ if (CONSTANT_P (x))
+ return 1;
+ if (x == frame_pointer_rtx || x == arg_pointer_rtx)
+ return 1;
+ if (GET_CODE (x) == PLUS
+ && (XEXP (x, 0) == frame_pointer_rtx || XEXP (x, 0) == arg_pointer_rtx)
+ && CONSTANT_P (XEXP (x, 1)))
+ return 1;
+ return 0;
+}
+
/* Determine whether the reload reg X overlaps any rtx'es used for
overriding inheritance. Return nonzero if so. */
OpenPOWER on IntegriCloud