diff options
author | Jakub Jelinek <jakub@redhat.com> | 2000-03-24 22:48:01 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2000-03-24 22:48:01 +0100 |
commit | 7d167afd46ed1252cef65dbb043c2815b082fd89 (patch) | |
tree | f90c05f553aeeb028e19de1c5837ae1bb6663362 /gcc/final.c | |
parent | 5ad5a9844bd95909a89dd2e0fd374ddd413ccda6 (diff) | |
download | gcc-7d167afd46ed1252cef65dbb043c2815b082fd89.zip gcc-7d167afd46ed1252cef65dbb043c2815b082fd89.tar.gz gcc-7d167afd46ed1252cef65dbb043c2815b082fd89.tar.bz2 |
sibcall.c (skip_copy_to_return_value): Use OUTGOING_REGNO for comparison if regno's are equal.
* sibcall.c (skip_copy_to_return_value): Use OUTGOING_REGNO for
comparison if regno's are equal.
* calls.c (initialize_argument_informat): Add ecf_flags argument.
Use FUNCTION_INCOMING_ARG if available and ECF_SIBCALL.
(expand_call): Update caller.
Avoid making a sibling call if argument size of the callee is larger
than argument size of the caller.
Call hard_function_value with outgoing set if in sibcall pass.
Use FUNCTION_INCOMING_ARG if available and ECF_SIBCALL.
* final.c (permitted_reg_in_leaf_functions, only_leaf_regs_used):
Change LEAF_REGISTERS from an array initializer to actual array
identifier. Move static global variable into the function.
(leaf_function_p): Allow SIBLING_CALL_P calls even outside of
sequences for leaf functions.
* global.c (global_alloc): Likewise.
* tm.texi (LEAF_REGISTERS): Update documentation.
* config/sparc/sparc.h (CONDITIONAL_REGISTER_USAGE): Remove the ugly
TARGET_FLAT leaf disabling hack.
(LEAF_REGISTERS): Changed from an array initializer to actual array
identifier to avoid duplication and remove the above hack.
(FUNCTION_OK_FOR_SIBCALL): Define.
* config/sparc/sparc.md (sibcall): New attr type. Use it almost
always like call attribute.
(eligible_for_sibcall_delay): New attribute.
(sibcall): New delay type.
(sibcall, sibcall_value, sibcall_epilogue): New expands.
(sibcall_symbolic_sp32, sibcall_symbolic_sp64,
sibcall_value_symbolic_sp32, sibcall_value_symbolic_sp64): New insns.
* config/sparc/sparc.c (sparc_leaf_regs): New array.
(eligible_for_sibcall_delay, output_restore_regs, output_sibcall):
New functions.
(output_function_epilogue): Move part of the code into
output_restore_regs.
(ultra_code_from_mask, ultrasparc_sched_reorder): Handle
TYPE_SIBCALL.
* sparc-protos.h (output_sibcall, eligible_for_sibcall_delay): New
prototypes.
From-SVN: r32730
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/final.c b/gcc/final.c index 90437e0..5693d46 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -4015,7 +4015,8 @@ leaf_function_p () for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) { - if (GET_CODE (insn) == CALL_INSN) + if (GET_CODE (insn) == CALL_INSN + && ! SIBLING_CALL_P (insn)) return 0; if (GET_CODE (insn) == INSN && GET_CODE (PATTERN (insn)) == SEQUENCE @@ -4025,7 +4026,8 @@ leaf_function_p () } for (insn = current_function_epilogue_delay_list; insn; insn = XEXP (insn, 1)) { - if (GET_CODE (XEXP (insn, 0)) == CALL_INSN) + if (GET_CODE (XEXP (insn, 0)) == CALL_INSN + && ! SIBLING_CALL_P (insn)) return 0; if (GET_CODE (XEXP (insn, 0)) == INSN && GET_CODE (PATTERN (XEXP (insn, 0))) == SEQUENCE @@ -4048,8 +4050,6 @@ leaf_function_p () #ifdef LEAF_REGISTERS -static char permitted_reg_in_leaf_functions[] = LEAF_REGISTERS; - /* Return 1 if this function uses only the registers that can be safely renumbered. */ @@ -4057,6 +4057,7 @@ int only_leaf_regs_used () { int i; + char *permitted_reg_in_leaf_functions = LEAF_REGISTERS; for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) if ((regs_ever_live[i] || global_regs[i]) |