]> git.ipfire.org Git - thirdparty/gcc.git/commit
rs6000: Replace the builtin expansion machinery
authorBill Schmidt <wschmidt@linux.ibm.com>
Sun, 7 Nov 2021 13:56:07 +0000 (07:56 -0600)
committerBill Schmidt <wschmidt@linux.ibm.com>
Sun, 7 Nov 2021 15:23:55 +0000 (09:23 -0600)
commita28cfe49203705ff9675b79fce88d6087b11d098
treeec4c143e0a14235f3a972653c99810986829a305
parent4898e958a92d45dbf23c0f28bc7552689ba16ecc
rs6000: Replace the builtin expansion machinery

This patch forms the meat of the improvements for this patch series.
We develop a replacement for rs6000_expand_builtin and its supporting
functions, which are inefficient and difficult to maintain.

Differences between the old and new support in this patch include:
 - Make use of the new builtin data structures, directly looking up
   a function's information rather than searching for the function
   multiple times;
 - Test for enablement of builtins at expand time, to support #pragma
   target changes within a compilation unit;
 - Use the builtin function attributes (e.g., bif_is_cpu) to control
   special handling;
 - Refactor common code into one place; and
 - Provide common error handling in one place for operands that are
   restricted to specific values or ranges.

2021-11-07  Bill Schmidt  <wschmidt@linux.ibm.com>

gcc/
* config/rs6000/rs6000-call.c (rs6000_expand_new_builtin): New
forward decl.
(rs6000_invalid_new_builtin): New function.
(rs6000_expand_builtin): Call rs6000_expand_new_builtin.
(rs6000_expand_ldst_mask): New function.
(new_cpu_expand_builtin): Likewise.
(elemrev_icode): Likewise.
(ldv_expand_builtin): Likewise.
(lxvrse_expand_builtin): Likewise.
(lxvrze_expand_builtin): Likewise.
(stv_expand_builtin): Likewise.
(new_mma_expand_builtin): Likewise.
(new_htm_spr_num): Likewise.
(new_htm_expand_builtin): Likewise.
(rs6000_expand_new_builtin): Likewise.
(rs6000_init_builtins): Initialize altivec_builtin_mask_for_load.
gcc/config/rs6000/rs6000-call.c