diff options
author | Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp> | 2022-06-15 21:21:21 +0900 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2022-06-15 16:55:36 -0700 |
commit | 43b0c56fda4bc990e8ee8d6a0b376de7b663bb06 (patch) | |
tree | e2b0511e65e49eac0883b44d8d9d262d9fa7dde8 /gcc/builtins.cc | |
parent | 96518f714e3fab53a966a05b8d48011e27c1a718 (diff) | |
download | gcc-43b0c56fda4bc990e8ee8d6a0b376de7b663bb06.zip gcc-43b0c56fda4bc990e8ee8d6a0b376de7b663bb06.tar.gz gcc-43b0c56fda4bc990e8ee8d6a0b376de7b663bb06.tar.bz2 |
xtensa: Add support for sibling call optimization
This patch introduces support for sibling call optimization, when call0
ABI is in effect.
gcc/ChangeLog:
* config/xtensa/xtensa-protos.h (xtensa_prepare_expand_call,
xtensa_emit_sibcall): New prototypes.
(xtensa_expand_epilogue): Add new argument that specifies whether
or not sibling call.
* config/xtensa/xtensa.cc (TARGET_FUNCTION_OK_FOR_SIBCALL):
New macro definition.
(xtensa_prepare_expand_call): New function in order to share
the common code.
(xtensa_emit_sibcall, xtensa_function_ok_for_sibcall):
New functions.
(xtensa_expand_epilogue): Add new argument sibcall_p and use it
for sibling call handling.
* config/xtensa/xtensa.md (call, call_value):
Use xtensa_prepare_expand_call.
(call_internal, call_value_internal):
Add the condition in order to be disabled if sibling call.
(sibcall, sibcall_value, sibcall_epilogue): New expansions.
(sibcall_internal, sibcall_value_internal): New insn patterns,
and split ones in order to take care of the indirect sibcalls.
gcc/testsuite/ChangeLog:
* gcc.target/xtensa/sibcalls.c: New.
Diffstat (limited to 'gcc/builtins.cc')
0 files changed, 0 insertions, 0 deletions