mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-23 01:30:29 +08:00
Remove unused functions from sparc backend.
* config/sparc/sparc.c (short_branch, reg_unused_after): Delete. * config/sparc/sparc-protos.h (short_branch, reg_unused_after): Get rid of declarations. From-SVN: r180325
This commit is contained in:
parent
f0237267ba
commit
89b925a660
@ -10,6 +10,10 @@
|
||||
* config/sparc/sparc.c (struct processor_costs): To here.
|
||||
(sparc_costs): Mark static.
|
||||
|
||||
* config/sparc/sparc.c (short_branch, reg_unused_after): Delete.
|
||||
* config/sparc/sparc-protos.h (short_branch, reg_unused_after):
|
||||
Get rid of declarations.
|
||||
|
||||
2011-10-21 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* config/c6x/c6x.c (c6x_asm_emit_except_personality,
|
||||
|
@ -43,7 +43,6 @@ extern void sparc_expand_epilogue (bool);
|
||||
extern void sparc_flat_expand_epilogue (bool);
|
||||
extern bool sparc_can_use_return_insn_p (void);
|
||||
extern int check_pic (int);
|
||||
extern int short_branch (int, int);
|
||||
extern void sparc_profile_hook (int);
|
||||
extern void sparc_override_options (void);
|
||||
extern void sparc_output_scratch_registers (FILE *);
|
||||
@ -95,7 +94,6 @@ extern int fp_mov_p (rtx);
|
||||
extern int fp_high_losum_p (rtx);
|
||||
extern int mem_min_alignment (rtx, int);
|
||||
extern int pic_address_needs_scratch (rtx);
|
||||
extern int reg_unused_after (rtx, rtx);
|
||||
extern int register_ok_for_ldd (rtx);
|
||||
extern int memory_ok_for_ldd (rtx);
|
||||
extern int registers_ok_for_ldd_peep (rtx, rtx);
|
||||
|
@ -3176,51 +3176,6 @@ eligible_for_sibcall_delay (rtx trial)
|
||||
|
||||
return eligible_for_restore_insn (trial, false);
|
||||
}
|
||||
|
||||
int
|
||||
short_branch (int uid1, int uid2)
|
||||
{
|
||||
int delta = INSN_ADDRESSES (uid1) - INSN_ADDRESSES (uid2);
|
||||
|
||||
/* Leave a few words of "slop". */
|
||||
if (delta >= -1023 && delta <= 1022)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Return nonzero if REG is not used after INSN.
|
||||
We assume REG is a reload reg, and therefore does
|
||||
not live past labels or calls or jumps. */
|
||||
int
|
||||
reg_unused_after (rtx reg, rtx insn)
|
||||
{
|
||||
enum rtx_code code, prev_code = UNKNOWN;
|
||||
|
||||
while ((insn = NEXT_INSN (insn)))
|
||||
{
|
||||
if (prev_code == CALL_INSN && call_used_regs[REGNO (reg)])
|
||||
return 1;
|
||||
|
||||
code = GET_CODE (insn);
|
||||
if (GET_CODE (insn) == CODE_LABEL)
|
||||
return 1;
|
||||
|
||||
if (INSN_P (insn))
|
||||
{
|
||||
rtx set = single_set (insn);
|
||||
int in_src = set && reg_overlap_mentioned_p (reg, SET_SRC (set));
|
||||
if (set && in_src)
|
||||
return 0;
|
||||
if (set && reg_overlap_mentioned_p (reg, SET_DEST (set)))
|
||||
return 1;
|
||||
if (set == 0 && reg_overlap_mentioned_p (reg, PATTERN (insn)))
|
||||
return 0;
|
||||
}
|
||||
prev_code = code;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Determine if it's legal to put X into the constant pool. This
|
||||
is not possible if X contains the address of a symbol that is
|
||||
|
Loading…
x
Reference in New Issue
Block a user