cse.c (cse_end_of_basic_block): Make static.

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.

From-SVN: r78960
This commit is contained in:
Paolo Bonzini 2004-03-05 10:17:40 +00:00 committed by Paolo Bonzini
parent d0fe265e2c
commit 86caf04d48
5 changed files with 42 additions and 24 deletions

View File

@ -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

View File

@ -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)
{

View File

@ -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.

View File

@ -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);

View File

@ -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. */