[PATCH][AARCH64]Simplify call, call_value, sibcall, sibcall_value patterns.
Renlin Li
renlin.li@foss.arm.com
Thu Dec 1 15:40:00 GMT 2016
Hi all,
This patch refactors the code used in call, call_value, sibcall,
sibcall_value expanders.
Before the change, the logic is following:
call expander --> call_internal --> call_reg/call_symbol
call_vlaue expander --> call_value_internal --> call_value_reg/call_value_symbol
sibcall expander --> sibcall_internal --> sibcall_insn
sibcall_value expander --> sibcall_value_internal --> sibcall_value_insn
After the change, the logic is simplified into:
call expander --> aarch64_expand_call() --> call_insn
call_value expander --> aarch64_expand_call() --> call_value_insn
sibcall expander --> aarch64_expand_call() --> sibcall_insn
sibcall_value expander --> aarch64_expand_call() --> sibcall_value_insn
The code are factored out from each expander into aarch64_expand_call ().
This also fixes the two issues Richard Henderson suggests in comments 8:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64971
aarch64-none-elf regression test Okay, aarch64-linux bootstrap Okay.
Okay for trunk?
Regards,
Renlin Li
gcc/ChangeLog:
2016-12-01 Renlin Li <renlin.li@arm.com>
* config/aarch64/aarch64-protos.h (aarch64_expand_call): Declare.
* config/aarch64/aarch64.c (aarch64_expand_call): Define.
* config/aarch64/constraints.md (Usf): Add long call check.
* config/aarch64/aarch64.md (call): Use aarch64_expand_call.
(call_value): Likewise.
(sibcall): Likewise.
(sibcall_value): Likewise.
(call_insn): New.
(call_value_insn): New.
(sibcall_insn): Update rtx pattern.
(sibcall_value_insn): Likewise.
(call_internal): Remove.
(call_value_internal): Likewise.
(sibcall_internal): Likewise.
(sibcall_value_internal): Likewise.
(call_reg): Likewise.
(call_symbol): Likewise.
(call_value_reg): Likewise.
(call_value_symbol): Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new.diff
Type: text/x-patch
Size: 9497 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161201/d1de4297/attachment.bin>
More information about the Gcc-patches
mailing list