[6/6] rs6000: Rename arrays to remove temporary _x suffix
Commit Message
Hi!
While we had two sets of built-in infrastructure at once, I added _x as a
suffix to two arrays to disambiguate the old and new versions. Time to fix
that also.
Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this
okay for trunk?
Thanks!
Bill
2021-12-06 Bill Schmidt <wschmidt@linux.ibm.com>
gcc/
* config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): Rename
rs6000_builtin_decls_x to rs6000_builtin_decls.
(altivec_resolve_overloaded_builtin): Likewise. Also rename
rs6000_builtin_info_x to rs6000_builtin_info.
* config/rs6000/rs6000-call.c (rs6000_invalid_builtin): Rename
rs6000_builtin_info_x to rs6000_builtin_info.
(rs6000_builtin_is_supported): Likewise.
(rs6000_gimple_fold_mma_builtin): Likewise. Also rename
rs6000_builtin_decls_x to rs6000_builtin_decls.
(rs6000_gimple_fold_builtin): Rename rs6000_builtin_info_x to
rs6000_builtin_info.
(cpu_expand_builtin): Likewise.
(rs6000_expand_builtin): Likewise.
(rs6000_init_builtins): Likewise. Also rename rs6000_builtin_decls_x
to rs6000_builtin_decls.
(rs6000_builtin_decl): Rename rs6000_builtin_decls_x to
rs6000_builtin_decls.
* config/rs6000/rs6000-gen-builtins.c (write_decls): In generated code,
rename rs6000_builtin_decls_x to rs6000_builtin_decls, and rename
rs6000_builtin_info_x to rs6000_builtin_info.
(write_bif_static_init): In generated code, rename
rs6000_builtin_info_x to rs6000_builtin_info.
(write_init_bif_table): In generated code, rename
rs6000_builtin_decls_x to rs6000_builtin_decls, and rename
rs6000_builtin_info_x to rs6000_builtin_info.
(write_init_ovld_table): In generated code, rename
rs6000_builtin_decls_x to rs6000_builtin_decls.
(write_init_file): Likewise.
* config/rs6000/rs6000.c (rs6000_builtin_vectorized_function):
Likewise.
(rs6000_builtin_md_vectorized_function): Likewise.
(rs6000_builtin_reciprocal): Likewise.
(add_condition_to_bb): Likewise.
(rs6000_atomic_assign_expand_fenv): Likewise.
---
gcc/config/rs6000/rs6000-c.c | 64 ++++++++++++-------------
gcc/config/rs6000/rs6000-call.c | 46 +++++++++---------
gcc/config/rs6000/rs6000-gen-builtins.c | 27 +++++------
gcc/config/rs6000/rs6000.c | 58 +++++++++++-----------
4 files changed, 96 insertions(+), 99 deletions(-)
Comments
Ping. Thanks!
Bill
On 12/6/21 2:49 PM, Bill Schmidt via Gcc-patches wrote:
> Hi!
>
> While we had two sets of built-in infrastructure at once, I added _x as a
> suffix to two arrays to disambiguate the old and new versions. Time to fix
> that also.
>
> Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this
> okay for trunk?
>
> Thanks!
> Bill
>
> 2021-12-06 Bill Schmidt <wschmidt@linux.ibm.com>
>
> gcc/
> * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): Rename
> rs6000_builtin_decls_x to rs6000_builtin_decls.
> (altivec_resolve_overloaded_builtin): Likewise. Also rename
> rs6000_builtin_info_x to rs6000_builtin_info.
> * config/rs6000/rs6000-call.c (rs6000_invalid_builtin): Rename
> rs6000_builtin_info_x to rs6000_builtin_info.
> (rs6000_builtin_is_supported): Likewise.
> (rs6000_gimple_fold_mma_builtin): Likewise. Also rename
> rs6000_builtin_decls_x to rs6000_builtin_decls.
> (rs6000_gimple_fold_builtin): Rename rs6000_builtin_info_x to
> rs6000_builtin_info.
> (cpu_expand_builtin): Likewise.
> (rs6000_expand_builtin): Likewise.
> (rs6000_init_builtins): Likewise. Also rename rs6000_builtin_decls_x
> to rs6000_builtin_decls.
> (rs6000_builtin_decl): Rename rs6000_builtin_decls_x to
> rs6000_builtin_decls.
> * config/rs6000/rs6000-gen-builtins.c (write_decls): In generated code,
> rename rs6000_builtin_decls_x to rs6000_builtin_decls, and rename
> rs6000_builtin_info_x to rs6000_builtin_info.
> (write_bif_static_init): In generated code, rename
> rs6000_builtin_info_x to rs6000_builtin_info.
> (write_init_bif_table): In generated code, rename
> rs6000_builtin_decls_x to rs6000_builtin_decls, and rename
> rs6000_builtin_info_x to rs6000_builtin_info.
> (write_init_ovld_table): In generated code, rename
> rs6000_builtin_decls_x to rs6000_builtin_decls.
> (write_init_file): Likewise.
> * config/rs6000/rs6000.c (rs6000_builtin_vectorized_function):
> Likewise.
> (rs6000_builtin_md_vectorized_function): Likewise.
> (rs6000_builtin_reciprocal): Likewise.
> (add_condition_to_bb): Likewise.
> (rs6000_atomic_assign_expand_fenv): Likewise.
> ---
> gcc/config/rs6000/rs6000-c.c | 64 ++++++++++++-------------
> gcc/config/rs6000/rs6000-call.c | 46 +++++++++---------
> gcc/config/rs6000/rs6000-gen-builtins.c | 27 +++++------
> gcc/config/rs6000/rs6000.c | 58 +++++++++++-----------
> 4 files changed, 96 insertions(+), 99 deletions(-)
>
> diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c
> index f790c72d621..e0ebdeed548 100644
> --- a/gcc/config/rs6000/rs6000-c.c
> +++ b/gcc/config/rs6000/rs6000-c.c
> @@ -867,7 +867,7 @@ altivec_build_resolved_builtin (tree *args, int n, tree fntype, tree ret_type,
> {
> tree argtypes = TYPE_ARG_TYPES (fntype);
> tree arg_type[MAX_OVLD_ARGS];
> - tree fndecl = rs6000_builtin_decls_x[bif_id];
> + tree fndecl = rs6000_builtin_decls[bif_id];
>
> for (int i = 0; i < n; i++)
> {
> @@ -1001,13 +1001,13 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
> case E_SFmode:
> {
> /* For floats use the xvmulsp instruction directly. */
> - tree call = rs6000_builtin_decls_x[RS6000_BIF_XVMULSP];
> + tree call = rs6000_builtin_decls[RS6000_BIF_XVMULSP];
> return build_call_expr (call, 2, arg0, arg1);
> }
> case E_DFmode:
> {
> /* For doubles use the xvmuldp instruction directly. */
> - tree call = rs6000_builtin_decls_x[RS6000_BIF_XVMULDP];
> + tree call = rs6000_builtin_decls[RS6000_BIF_XVMULDP];
> return build_call_expr (call, 2, arg0, arg1);
> }
> /* Other types are errors. */
> @@ -1066,7 +1066,7 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
> vec_safe_push (params, arg0);
> vec_safe_push (params, arg1);
> tree call = altivec_resolve_overloaded_builtin
> - (loc, rs6000_builtin_decls_x[RS6000_OVLD_VEC_CMPEQ],
> + (loc, rs6000_builtin_decls[RS6000_OVLD_VEC_CMPEQ],
> params);
> /* Use save_expr to ensure that operands used more than once
> that may have side effects (like calls) are only evaluated
> @@ -1076,7 +1076,7 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
> vec_safe_push (params, call);
> vec_safe_push (params, call);
> return altivec_resolve_overloaded_builtin
> - (loc, rs6000_builtin_decls_x[RS6000_OVLD_VEC_NOR], params);
> + (loc, rs6000_builtin_decls[RS6000_OVLD_VEC_NOR], params);
> }
> /* Other types are errors. */
> default:
> @@ -1129,9 +1129,9 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
> vec_safe_push (params, arg1);
>
> if (fcode == RS6000_OVLD_VEC_ADDE)
> - add_sub_builtin = rs6000_builtin_decls_x[RS6000_OVLD_VEC_ADD];
> + add_sub_builtin = rs6000_builtin_decls[RS6000_OVLD_VEC_ADD];
> else
> - add_sub_builtin = rs6000_builtin_decls_x[RS6000_OVLD_VEC_SUB];
> + add_sub_builtin = rs6000_builtin_decls[RS6000_OVLD_VEC_SUB];
>
> tree call
> = altivec_resolve_overloaded_builtin (loc, add_sub_builtin,
> @@ -1207,9 +1207,9 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
> vec_safe_push (params, arg1);
>
> if (fcode == RS6000_OVLD_VEC_ADDEC)
> - as_c_builtin = rs6000_builtin_decls_x[RS6000_OVLD_VEC_ADDC];
> + as_c_builtin = rs6000_builtin_decls[RS6000_OVLD_VEC_ADDC];
> else
> - as_c_builtin = rs6000_builtin_decls_x[RS6000_OVLD_VEC_SUBC];
> + as_c_builtin = rs6000_builtin_decls[RS6000_OVLD_VEC_SUBC];
>
> tree call1 = altivec_resolve_overloaded_builtin (loc, as_c_builtin,
> params);
> @@ -1218,9 +1218,9 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
> vec_safe_push (params, arg1);
>
> if (fcode == RS6000_OVLD_VEC_ADDEC)
> - as_builtin = rs6000_builtin_decls_x[RS6000_OVLD_VEC_ADD];
> + as_builtin = rs6000_builtin_decls[RS6000_OVLD_VEC_ADD];
> else
> - as_builtin = rs6000_builtin_decls_x[RS6000_OVLD_VEC_SUB];
> + as_builtin = rs6000_builtin_decls[RS6000_OVLD_VEC_SUB];
>
> tree call2 = altivec_resolve_overloaded_builtin (loc, as_builtin,
> params);
> @@ -1236,7 +1236,7 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
> params = make_tree_vector ();
> vec_safe_push (params, call1);
> vec_safe_push (params, call2);
> - tree or_builtin = rs6000_builtin_decls_x[RS6000_OVLD_VEC_OR];
> + tree or_builtin = rs6000_builtin_decls[RS6000_OVLD_VEC_OR];
> return altivec_resolve_overloaded_builtin (loc, or_builtin,
> params);
> }
> @@ -1380,34 +1380,34 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
> break;
>
> case E_V1TImode:
> - call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V1TI];
> + call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V1TI];
> break;
>
> case E_V2DFmode:
> - call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V2DF];
> + call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V2DF];
> break;
>
> case E_V2DImode:
> - call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V2DI];
> + call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V2DI];
> break;
>
> case E_V4SFmode:
> - call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V4SF];
> + call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V4SF];
> break;
>
> case E_V4SImode:
> if (TARGET_DIRECT_MOVE_64BIT)
> - call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V4SI];
> + call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V4SI];
> break;
>
> case E_V8HImode:
> if (TARGET_DIRECT_MOVE_64BIT)
> - call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V8HI];
> + call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V8HI];
> break;
>
> case E_V16QImode:
> if (TARGET_DIRECT_MOVE_64BIT)
> - call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V16QI];
> + call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V16QI];
> break;
> }
> }
> @@ -1422,27 +1422,27 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
> break;
>
> case E_V2DFmode:
> - call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V2DF];
> + call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V2DF];
> break;
>
> case E_V2DImode:
> - call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V2DI];
> + call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V2DI];
> break;
>
> case E_V4SFmode:
> - call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V4SF];
> + call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V4SF];
> break;
>
> case E_V4SImode:
> - call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V4SI];
> + call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V4SI];
> break;
>
> case E_V8HImode:
> - call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V8HI];
> + call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V8HI];
> break;
>
> case E_V16QImode:
> - call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V16QI];
> + call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V16QI];
> break;
> }
> }
> @@ -1542,9 +1542,9 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
>
> arg2 = wide_int_to_tree (TREE_TYPE (arg2), selector);
> if (mode == V2DFmode)
> - call = rs6000_builtin_decls_x[RS6000_BIF_VEC_SET_V2DF];
> + call = rs6000_builtin_decls[RS6000_BIF_VEC_SET_V2DF];
> else if (mode == V2DImode)
> - call = rs6000_builtin_decls_x[RS6000_BIF_VEC_SET_V2DI];
> + call = rs6000_builtin_decls[RS6000_BIF_VEC_SET_V2DI];
>
> /* Note, __builtin_vec_insert_<xxx> has vector and scalar types
> reversed. */
> @@ -1554,7 +1554,7 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
> else if (mode == V1TImode && VECTOR_UNIT_VSX_P (mode)
> && TREE_CODE (arg2) == INTEGER_CST)
> {
> - tree call = rs6000_builtin_decls_x[RS6000_BIF_VEC_SET_V1TI];
> + tree call = rs6000_builtin_decls[RS6000_BIF_VEC_SET_V1TI];
> wide_int selector = wi::zero(32);
>
> arg2 = wide_int_to_tree (TREE_TYPE (arg2), selector);
> @@ -1740,7 +1740,7 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
> instance = instance->next;
>
> gcc_assert (instance != NULL);
> - tree fntype = rs6000_builtin_info_x[instance->bifid].fntype;
> + tree fntype = rs6000_builtin_info[instance->bifid].fntype;
> tree parmtype0 = TREE_VALUE (TYPE_ARG_TYPES (fntype));
> tree parmtype1 = TREE_VALUE (TREE_CHAIN (TYPE_ARG_TYPES (fntype)));
>
> @@ -1798,7 +1798,7 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
> instance = instance->next;
>
> gcc_assert (instance != NULL);
> - tree fntype = rs6000_builtin_info_x[instance->bifid].fntype;
> + tree fntype = rs6000_builtin_info[instance->bifid].fntype;
> tree parmtype0 = TREE_VALUE (TYPE_ARG_TYPES (fntype));
> tree parmtype1 = TREE_VALUE (TREE_CHAIN (TYPE_ARG_TYPES (fntype)));
>
> @@ -1849,7 +1849,7 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
> if (rs6000_builtin_decl (instance->bifid, false) != error_mark_node
> && supported)
> {
> - tree fntype = rs6000_builtin_info_x[instance->bifid].fntype;
> + tree fntype = rs6000_builtin_info[instance->bifid].fntype;
> tree ret_type = TREE_TYPE (instance->fntype);
> return altivec_build_resolved_builtin (args, n, fntype,
> ret_type,
> @@ -1876,7 +1876,7 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
> /* Provide clarity of the relationship between the overload
> and the instantiation. */
> const char *internal_name
> - = rs6000_builtin_info_x[instance->bifid].bifname;
> + = rs6000_builtin_info[instance->bifid].bifname;
> rich_location richloc (line_table, input_location);
> inform (&richloc,
> "overloaded builtin %qs is implemented by builtin %qs",
> diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c
> index 5ce0d2cef88..38f0ccc97db 100644
> --- a/gcc/config/rs6000/rs6000-call.c
> +++ b/gcc/config/rs6000/rs6000-call.c
> @@ -3258,9 +3258,9 @@ void
> rs6000_invalid_builtin (enum rs6000_gen_builtins fncode)
> {
> size_t j = (size_t) fncode;
> - const char *name = rs6000_builtin_info_x[j].bifname;
> + const char *name = rs6000_builtin_info[j].bifname;
>
> - switch (rs6000_builtin_info_x[j].enable)
> + switch (rs6000_builtin_info[j].enable)
> {
> case ENB_P5:
> error ("%qs requires the %qs option", name, "-mcpu=power5");
> @@ -3510,7 +3510,7 @@ rs6000_builtin_valid_without_lhs (enum rs6000_gen_builtins fn_code,
> bool
> rs6000_builtin_is_supported (enum rs6000_gen_builtins fncode)
> {
> - switch (rs6000_builtin_info_x[(size_t) fncode].enable)
> + switch (rs6000_builtin_info[(size_t) fncode].enable)
> {
> case ENB_ALWAYS:
> return true;
> @@ -3570,18 +3570,18 @@ rs6000_gimple_fold_mma_builtin (gimple_stmt_iterator *gsi,
> gimple *stmt = gsi_stmt (*gsi);
> size_t fncode = (size_t) fn_code;
>
> - if (!bif_is_mma (rs6000_builtin_info_x[fncode]))
> + if (!bif_is_mma (rs6000_builtin_info[fncode]))
> return false;
>
> /* Each call that can be gimple-expanded has an associated built-in
> function that it will expand into. If this one doesn't, we have
> already expanded it! Exceptions: lxvp and stxvp. */
> - if (rs6000_builtin_info_x[fncode].assoc_bif == RS6000_BIF_NONE
> + if (rs6000_builtin_info[fncode].assoc_bif == RS6000_BIF_NONE
> && fncode != RS6000_BIF_LXVP
> && fncode != RS6000_BIF_STXVP)
> return false;
>
> - bifdata *bd = &rs6000_builtin_info_x[fncode];
> + bifdata *bd = &rs6000_builtin_info[fncode];
> unsigned nopnds = bd->nargs;
> gimple_seq new_seq = NULL;
> gimple *new_call;
> @@ -3626,7 +3626,7 @@ rs6000_gimple_fold_mma_builtin (gimple_stmt_iterator *gsi,
> to emit a xxmfacc instruction now, since we cannot do it later. */
> if (fncode == RS6000_BIF_DISASSEMBLE_ACC)
> {
> - new_decl = rs6000_builtin_decls_x[RS6000_BIF_XXMFACC_INTERNAL];
> + new_decl = rs6000_builtin_decls[RS6000_BIF_XXMFACC_INTERNAL];
> new_call = gimple_build_call (new_decl, 1, src);
> src = create_tmp_reg_or_ssa_name (vector_quad_type_node);
> gimple_call_set_lhs (new_call, src);
> @@ -3635,7 +3635,7 @@ rs6000_gimple_fold_mma_builtin (gimple_stmt_iterator *gsi,
>
> /* Copy the accumulator/pair vector by vector. */
> new_decl
> - = rs6000_builtin_decls_x[rs6000_builtin_info_x[fncode].assoc_bif];
> + = rs6000_builtin_decls[rs6000_builtin_info[fncode].assoc_bif];
> tree dst_type = build_pointer_type_for_mode (unsigned_V16QI_type_node,
> ptr_mode, true);
> tree dst_base = build1 (VIEW_CONVERT_EXPR, dst_type, dst_ptr);
> @@ -3693,7 +3693,7 @@ rs6000_gimple_fold_mma_builtin (gimple_stmt_iterator *gsi,
>
> /* Convert this built-in into an internal version that uses pass-by-value
> arguments. The internal built-in is found in the assoc_bif field. */
> - new_decl = rs6000_builtin_decls_x[rs6000_builtin_info_x[fncode].assoc_bif];
> + new_decl = rs6000_builtin_decls[rs6000_builtin_info[fncode].assoc_bif];
> tree lhs, op[MAX_MMA_OPERANDS];
> tree acc = gimple_call_arg (stmt, 0);
> push_gimplify_context (true);
> @@ -3777,8 +3777,8 @@ rs6000_gimple_fold_builtin (gimple_stmt_iterator *gsi)
> gimple *g;
>
> size_t uns_fncode = (size_t) fn_code;
> - enum insn_code icode = rs6000_builtin_info_x[uns_fncode].icode;
> - const char *fn_name1 = rs6000_builtin_info_x[uns_fncode].bifname;
> + enum insn_code icode = rs6000_builtin_info[uns_fncode].icode;
> + const char *fn_name1 = rs6000_builtin_info[uns_fncode].bifname;
> const char *fn_name2 = (icode != CODE_FOR_nothing)
> ? get_insn_name ((int) icode)
> : "nothing";
> @@ -4801,7 +4801,7 @@ cpu_expand_builtin (enum rs6000_gen_builtins fcode,
> if (TREE_CODE (arg) != STRING_CST)
> {
> error ("builtin %qs only accepts a string argument",
> - rs6000_builtin_info_x[(size_t) fcode].bifname);
> + rs6000_builtin_info[(size_t) fcode].bifname);
> return const0_rtx;
> }
>
> @@ -4820,7 +4820,7 @@ cpu_expand_builtin (enum rs6000_gen_builtins fcode,
> {
> /* Invalid CPU argument. */
> error ("cpu %qs is an invalid argument to builtin %qs",
> - cpu, rs6000_builtin_info_x[(size_t) fcode].bifname);
> + cpu, rs6000_builtin_info[(size_t) fcode].bifname);
> return const0_rtx;
> }
>
> @@ -4849,7 +4849,7 @@ cpu_expand_builtin (enum rs6000_gen_builtins fcode,
> /* Invalid HWCAP argument. */
> error ("%s %qs is an invalid argument to builtin %qs",
> "hwcap", hwcap,
> - rs6000_builtin_info_x[(size_t) fcode].bifname);
> + rs6000_builtin_info[(size_t) fcode].bifname);
> return const0_rtx;
> }
>
> @@ -4877,7 +4877,7 @@ cpu_expand_builtin (enum rs6000_gen_builtins fcode,
>
> #else
> warning (0, "builtin %qs needs GLIBC (2.23 and newer) that exports hardware "
> - "capability bits", rs6000_builtin_info_x[(size_t) fcode].bifname);
> + "capability bits", rs6000_builtin_info[(size_t) fcode].bifname);
>
> /* For old LIBCs, always return FALSE. */
> emit_move_insn (target, GEN_INT (0));
> @@ -5479,7 +5479,7 @@ rs6000_expand_builtin (tree exp, rtx target, rtx /* subtarget */,
> enum rs6000_gen_builtins fcode
> = (enum rs6000_gen_builtins) DECL_MD_FUNCTION_CODE (fndecl);
> size_t uns_fcode = (size_t)fcode;
> - enum insn_code icode = rs6000_builtin_info_x[uns_fcode].icode;
> + enum insn_code icode = rs6000_builtin_info[uns_fcode].icode;
>
> /* TODO: The following commentary and code is inherited from the original
> builtin processing code. The commentary is a bit confusing, with the
> @@ -5557,7 +5557,7 @@ rs6000_expand_builtin (tree exp, rtx target, rtx /* subtarget */,
> /* In case of "#pragma target" changes, we initialize all builtins
> but check for actual availability now, during expand time. For
> invalid builtins, generate a normal call. */
> - bifdata *bifaddr = &rs6000_builtin_info_x[uns_fcode];
> + bifdata *bifaddr = &rs6000_builtin_info[uns_fcode];
> bif_enable e = bifaddr->enable;
>
> if (!(e == ENB_ALWAYS
> @@ -6260,7 +6260,7 @@ rs6000_init_builtins (void)
> fprintf (stderr, "\nAutogenerated built-in functions:\n\n");
> for (int i = 1; i < (int) RS6000_BIF_MAX; i++)
> {
> - bif_enable e = rs6000_builtin_info_x[i].enable;
> + bif_enable e = rs6000_builtin_info[i].enable;
> if (e == ENB_P5 && !TARGET_POPCNTB)
> continue;
> if (e == ENB_P6 && !TARGET_CMPB)
> @@ -6299,10 +6299,10 @@ rs6000_init_builtins (void)
> continue;
> if (e == ENB_MMA && !TARGET_MMA)
> continue;
> - tree fntype = rs6000_builtin_info_x[i].fntype;
> + tree fntype = rs6000_builtin_info[i].fntype;
> tree t = TREE_TYPE (fntype);
> fprintf (stderr, "%s %s (", rs6000_type_string (t),
> - rs6000_builtin_info_x[i].bifname);
> + rs6000_builtin_info[i].bifname);
> t = TYPE_ARG_TYPES (fntype);
> while (t && TREE_VALUE (t) != void_type_node)
> {
> @@ -6313,7 +6313,7 @@ rs6000_init_builtins (void)
> fprintf (stderr, ", ");
> }
> fprintf (stderr, "); %s [%4d]\n",
> - rs6000_builtin_info_x[i].attr_string, (int) i);
> + rs6000_builtin_info[i].attr_string, (int) i);
> }
> fprintf (stderr, "\nEnd autogenerated built-in functions.\n\n\n");
> }
> @@ -6342,7 +6342,7 @@ rs6000_init_builtins (void)
> }
>
> altivec_builtin_mask_for_load
> - = rs6000_builtin_decls_x[RS6000_BIF_MASK_FOR_LOAD];
> + = rs6000_builtin_decls[RS6000_BIF_MASK_FOR_LOAD];
>
> #ifdef SUBTARGET_INIT_BUILTINS
> SUBTARGET_INIT_BUILTINS;
> @@ -6359,7 +6359,7 @@ rs6000_builtin_decl (unsigned code, bool /* initialize_p */)
> if (fcode >= RS6000_OVLD_MAX)
> return error_mark_node;
>
> - return rs6000_builtin_decls_x[code];
> + return rs6000_builtin_decls[code];
> }
>
> /* Return the internal arg pointer used for function incoming
> diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c
> index 114289a0034..f1a9d1f0e63 100644
> --- a/gcc/config/rs6000/rs6000-gen-builtins.c
> +++ b/gcc/config/rs6000/rs6000-gen-builtins.c
> @@ -2208,7 +2208,7 @@ write_decls (void)
> fprintf (header_file, " RS6000_OVLD_MAX\n};\n\n");
>
> fprintf (header_file,
> - "extern GTY(()) tree rs6000_builtin_decls_x[RS6000_OVLD_MAX];\n\n");
> + "extern GTY(()) tree rs6000_builtin_decls[RS6000_OVLD_MAX];\n\n");
>
> fprintf (header_file,
> "enum rs6000_ovld_instances\n{\n RS6000_INST_NONE,\n");
> @@ -2336,9 +2336,6 @@ write_decls (void)
> "#define bif_is_endian(x)\t((x).bifattrs & bif_endian_bit)\n");
> fprintf (header_file, "\n");
>
> - /* #### Note that the _x is added for now to avoid conflict with
> - the existing rs6000_builtin_info[] file while testing. It will
> - be removed as we progress. */
> /* #### Cannot mark this as a GC root because only pointer types can
> be marked as GTY((user)) and be GC roots. All trees in here are
> kept alive by other globals, so not a big deal. Alternatively,
> @@ -2346,7 +2343,7 @@ write_decls (void)
> to avoid requiring a GTY((user)) designation, but that seems
> unnecessarily gross. */
> fprintf (header_file,
> - "extern bifdata rs6000_builtin_info_x[RS6000_BIF_MAX];\n\n");
> + "extern bifdata rs6000_builtin_info[RS6000_BIF_MAX];\n\n");
>
> fprintf (header_file, "struct GTY((user)) ovlddata\n");
> fprintf (header_file, "{\n");
> @@ -2495,12 +2492,12 @@ write_header_file (void)
> return 1;
> }
>
> -/* Write the decl and initializer for rs6000_builtin_info_x[]. */
> +/* Write the decl and initializer for rs6000_builtin_info[]. */
> static void
> write_bif_static_init (void)
> {
> const char *res[3];
> - fprintf (init_file, "bifdata rs6000_builtin_info_x[RS6000_BIF_MAX] =\n");
> + fprintf (init_file, "bifdata rs6000_builtin_info[RS6000_BIF_MAX] =\n");
> fprintf (init_file, " {\n");
> fprintf (init_file, " { /* RS6000_BIF_NONE: */\n");
> fprintf (init_file, " \"\", ENB_ALWAYS, 0, CODE_FOR_nothing, 0,\n");
> @@ -2665,7 +2662,7 @@ write_init_bif_table (void)
> for (int i = 0; i <= curr_bif; i++)
> {
> fprintf (init_file,
> - " rs6000_builtin_info_x[RS6000_BIF_%s].fntype"
> + " rs6000_builtin_info[RS6000_BIF_%s].fntype"
> "\n = %s;\n",
> bifs[i].idname, bifs[i].fndecl);
>
> @@ -2692,7 +2689,7 @@ write_init_bif_table (void)
> }
>
> fprintf (init_file,
> - " rs6000_builtin_decls_x[(int)RS6000_BIF_%s] = t\n",
> + " rs6000_builtin_decls[(int)RS6000_BIF_%s] = t\n",
> bifs[i].idname);
> fprintf (init_file,
> " = add_builtin_function (\"%s\",\n",
> @@ -2733,7 +2730,7 @@ write_init_bif_table (void)
> fprintf (init_file, " }\n");
> fprintf (init_file, " else\n");
> fprintf (init_file, " {\n");
> - fprintf (init_file, " rs6000_builtin_decls_x"
> + fprintf (init_file, " rs6000_builtin_decls"
> "[(int)RS6000_BIF_%s] = NULL_TREE;\n", bifs[i].idname);
> fprintf (init_file, " }\n");
> }
> @@ -2786,7 +2783,7 @@ write_init_ovld_table (void)
> }
>
> fprintf (init_file,
> - " rs6000_builtin_decls_x[(int)RS6000_OVLD_%s] = t\n",
> + " rs6000_builtin_decls[(int)RS6000_OVLD_%s] = t\n",
> stanza->stanza_id);
> fprintf (init_file,
> " = add_builtin_function (\"%s\",\n",
> @@ -2835,7 +2832,7 @@ write_init_file (void)
> fprintf (init_file, "#include \"rs6000-builtins.h\"\n");
> fprintf (init_file, "\n");
>
> - fprintf (init_file, "tree rs6000_builtin_decls_x[RS6000_OVLD_MAX];\n\n");
> + fprintf (init_file, "tree rs6000_builtin_decls[RS6000_OVLD_MAX];\n\n");
>
> write_bif_static_init ();
> write_ovld_static_init ();
> @@ -2851,11 +2848,11 @@ write_init_file (void)
> fprintf (init_file, "\n");
>
> fprintf (init_file,
> - " rs6000_builtin_decls_x[RS6000_BIF_NONE] = NULL_TREE;\n");
> + " rs6000_builtin_decls[RS6000_BIF_NONE] = NULL_TREE;\n");
> fprintf (init_file,
> - " rs6000_builtin_decls_x[RS6000_BIF_MAX] = NULL_TREE;\n");
> + " rs6000_builtin_decls[RS6000_BIF_MAX] = NULL_TREE;\n");
> fprintf (init_file,
> - " rs6000_builtin_decls_x[RS6000_OVLD_NONE] = NULL_TREE;\n\n");
> + " rs6000_builtin_decls[RS6000_OVLD_NONE] = NULL_TREE;\n\n");
>
> write_init_bif_table ();
> write_init_ovld_table ();
> diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
> index 38e22f927c5..60fbb1ea443 100644
> --- a/gcc/config/rs6000/rs6000.c
> +++ b/gcc/config/rs6000/rs6000.c
> @@ -5596,95 +5596,95 @@ rs6000_builtin_vectorized_function (unsigned int fn, tree type_out,
> if (VECTOR_UNIT_VSX_P (V2DFmode)
> && out_mode == DFmode && out_n == 2
> && in_mode == DFmode && in_n == 2)
> - return rs6000_builtin_decls_x[RS6000_BIF_CPSGNDP];
> + return rs6000_builtin_decls[RS6000_BIF_CPSGNDP];
> if (VECTOR_UNIT_VSX_P (V4SFmode)
> && out_mode == SFmode && out_n == 4
> && in_mode == SFmode && in_n == 4)
> - return rs6000_builtin_decls_x[RS6000_BIF_CPSGNSP];
> + return rs6000_builtin_decls[RS6000_BIF_CPSGNSP];
> if (VECTOR_UNIT_ALTIVEC_P (V4SFmode)
> && out_mode == SFmode && out_n == 4
> && in_mode == SFmode && in_n == 4)
> - return rs6000_builtin_decls_x[RS6000_BIF_COPYSIGN_V4SF];
> + return rs6000_builtin_decls[RS6000_BIF_COPYSIGN_V4SF];
> break;
> CASE_CFN_CEIL:
> if (VECTOR_UNIT_VSX_P (V2DFmode)
> && out_mode == DFmode && out_n == 2
> && in_mode == DFmode && in_n == 2)
> - return rs6000_builtin_decls_x[RS6000_BIF_XVRDPIP];
> + return rs6000_builtin_decls[RS6000_BIF_XVRDPIP];
> if (VECTOR_UNIT_VSX_P (V4SFmode)
> && out_mode == SFmode && out_n == 4
> && in_mode == SFmode && in_n == 4)
> - return rs6000_builtin_decls_x[RS6000_BIF_XVRSPIP];
> + return rs6000_builtin_decls[RS6000_BIF_XVRSPIP];
> if (VECTOR_UNIT_ALTIVEC_P (V4SFmode)
> && out_mode == SFmode && out_n == 4
> && in_mode == SFmode && in_n == 4)
> - return rs6000_builtin_decls_x[RS6000_BIF_VRFIP];
> + return rs6000_builtin_decls[RS6000_BIF_VRFIP];
> break;
> CASE_CFN_FLOOR:
> if (VECTOR_UNIT_VSX_P (V2DFmode)
> && out_mode == DFmode && out_n == 2
> && in_mode == DFmode && in_n == 2)
> - return rs6000_builtin_decls_x[RS6000_BIF_XVRDPIM];
> + return rs6000_builtin_decls[RS6000_BIF_XVRDPIM];
> if (VECTOR_UNIT_VSX_P (V4SFmode)
> && out_mode == SFmode && out_n == 4
> && in_mode == SFmode && in_n == 4)
> - return rs6000_builtin_decls_x[RS6000_BIF_XVRSPIM];
> + return rs6000_builtin_decls[RS6000_BIF_XVRSPIM];
> if (VECTOR_UNIT_ALTIVEC_P (V4SFmode)
> && out_mode == SFmode && out_n == 4
> && in_mode == SFmode && in_n == 4)
> - return rs6000_builtin_decls_x[RS6000_BIF_VRFIM];
> + return rs6000_builtin_decls[RS6000_BIF_VRFIM];
> break;
> CASE_CFN_FMA:
> if (VECTOR_UNIT_VSX_P (V2DFmode)
> && out_mode == DFmode && out_n == 2
> && in_mode == DFmode && in_n == 2)
> - return rs6000_builtin_decls_x[RS6000_BIF_XVMADDDP];
> + return rs6000_builtin_decls[RS6000_BIF_XVMADDDP];
> if (VECTOR_UNIT_VSX_P (V4SFmode)
> && out_mode == SFmode && out_n == 4
> && in_mode == SFmode && in_n == 4)
> - return rs6000_builtin_decls_x[RS6000_BIF_XVMADDSP];
> + return rs6000_builtin_decls[RS6000_BIF_XVMADDSP];
> if (VECTOR_UNIT_ALTIVEC_P (V4SFmode)
> && out_mode == SFmode && out_n == 4
> && in_mode == SFmode && in_n == 4)
> - return rs6000_builtin_decls_x[RS6000_BIF_VMADDFP];
> + return rs6000_builtin_decls[RS6000_BIF_VMADDFP];
> break;
> CASE_CFN_TRUNC:
> if (VECTOR_UNIT_VSX_P (V2DFmode)
> && out_mode == DFmode && out_n == 2
> && in_mode == DFmode && in_n == 2)
> - return rs6000_builtin_decls_x[RS6000_BIF_XVRDPIZ];
> + return rs6000_builtin_decls[RS6000_BIF_XVRDPIZ];
> if (VECTOR_UNIT_VSX_P (V4SFmode)
> && out_mode == SFmode && out_n == 4
> && in_mode == SFmode && in_n == 4)
> - return rs6000_builtin_decls_x[RS6000_BIF_XVRSPIZ];
> + return rs6000_builtin_decls[RS6000_BIF_XVRSPIZ];
> if (VECTOR_UNIT_ALTIVEC_P (V4SFmode)
> && out_mode == SFmode && out_n == 4
> && in_mode == SFmode && in_n == 4)
> - return rs6000_builtin_decls_x[RS6000_BIF_VRFIZ];
> + return rs6000_builtin_decls[RS6000_BIF_VRFIZ];
> break;
> CASE_CFN_NEARBYINT:
> if (VECTOR_UNIT_VSX_P (V2DFmode)
> && flag_unsafe_math_optimizations
> && out_mode == DFmode && out_n == 2
> && in_mode == DFmode && in_n == 2)
> - return rs6000_builtin_decls_x[RS6000_BIF_XVRDPI];
> + return rs6000_builtin_decls[RS6000_BIF_XVRDPI];
> if (VECTOR_UNIT_VSX_P (V4SFmode)
> && flag_unsafe_math_optimizations
> && out_mode == SFmode && out_n == 4
> && in_mode == SFmode && in_n == 4)
> - return rs6000_builtin_decls_x[RS6000_BIF_XVRSPI];
> + return rs6000_builtin_decls[RS6000_BIF_XVRSPI];
> break;
> CASE_CFN_RINT:
> if (VECTOR_UNIT_VSX_P (V2DFmode)
> && !flag_trapping_math
> && out_mode == DFmode && out_n == 2
> && in_mode == DFmode && in_n == 2)
> - return rs6000_builtin_decls_x[RS6000_BIF_XVRDPIC];
> + return rs6000_builtin_decls[RS6000_BIF_XVRDPIC];
> if (VECTOR_UNIT_VSX_P (V4SFmode)
> && !flag_trapping_math
> && out_mode == SFmode && out_n == 4
> && in_mode == SFmode && in_n == 4)
> - return rs6000_builtin_decls_x[RS6000_BIF_XVRSPIC];
> + return rs6000_builtin_decls[RS6000_BIF_XVRSPIC];
> break;
> default:
> break;
> @@ -5731,25 +5731,25 @@ rs6000_builtin_md_vectorized_function (tree fndecl, tree type_out,
> if (VECTOR_UNIT_ALTIVEC_OR_VSX_P (V4SFmode)
> && out_mode == SFmode && out_n == 4
> && in_mode == SFmode && in_n == 4)
> - return rs6000_builtin_decls_x[RS6000_BIF_VRSQRTFP];
> + return rs6000_builtin_decls[RS6000_BIF_VRSQRTFP];
> break;
> case RS6000_BIF_RSQRT:
> if (VECTOR_UNIT_VSX_P (V2DFmode)
> && out_mode == DFmode && out_n == 2
> && in_mode == DFmode && in_n == 2)
> - return rs6000_builtin_decls_x[RS6000_BIF_RSQRT_2DF];
> + return rs6000_builtin_decls[RS6000_BIF_RSQRT_2DF];
> break;
> case RS6000_BIF_RECIPF:
> if (VECTOR_UNIT_ALTIVEC_OR_VSX_P (V4SFmode)
> && out_mode == SFmode && out_n == 4
> && in_mode == SFmode && in_n == 4)
> - return rs6000_builtin_decls_x[RS6000_BIF_VRECIPFP];
> + return rs6000_builtin_decls[RS6000_BIF_VRECIPFP];
> break;
> case RS6000_BIF_RECIP:
> if (VECTOR_UNIT_VSX_P (V2DFmode)
> && out_mode == DFmode && out_n == 2
> && in_mode == DFmode && in_n == 2)
> - return rs6000_builtin_decls_x[RS6000_BIF_RECIP_V2DF];
> + return rs6000_builtin_decls[RS6000_BIF_RECIP_V2DF];
> break;
> default:
> break;
> @@ -5804,7 +5804,7 @@ rs6000_builtin_md_vectorized_function (tree fndecl, tree type_out,
> }
>
> if (in_mode == exp_mode && in_vmode == exp_vmode)
> - return rs6000_builtin_decls_x[bif];
> + return rs6000_builtin_decls[bif];
> }
>
> return NULL_TREE;
> @@ -22496,13 +22496,13 @@ rs6000_builtin_reciprocal (tree fndecl)
> if (!RS6000_RECIP_AUTO_RSQRTE_P (V2DFmode))
> return NULL_TREE;
>
> - return rs6000_builtin_decls_x[RS6000_BIF_RSQRT_2DF];
> + return rs6000_builtin_decls[RS6000_BIF_RSQRT_2DF];
>
> case RS6000_BIF_XVSQRTSP:
> if (!RS6000_RECIP_AUTO_RSQRTE_P (V4SFmode))
> return NULL_TREE;
>
> - return rs6000_builtin_decls_x[RS6000_BIF_RSQRT_4SF];
> + return rs6000_builtin_decls[RS6000_BIF_RSQRT_4SF];
>
> default:
> return NULL_TREE;
> @@ -25124,7 +25124,7 @@ add_condition_to_bb (tree function_decl, tree version_decl,
>
> tree bool_zero = build_int_cst (bool_int_type_node, 0);
> tree cond_var = create_tmp_var (bool_int_type_node);
> - tree predicate_decl = rs6000_builtin_decls_x[(int) RS6000_BIF_CPU_SUPPORTS];
> + tree predicate_decl = rs6000_builtin_decls[(int) RS6000_BIF_CPU_SUPPORTS];
> const char *arg_str = rs6000_clone_map[clone_isa].name;
> tree predicate_arg = build_string_literal (strlen (arg_str) + 1, arg_str);
> gimple *call_cond_stmt = gimple_build_call (predicate_decl, 1, predicate_arg);
> @@ -27764,8 +27764,8 @@ rs6000_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update)
> return;
> }
>
> - tree mffs = rs6000_builtin_decls_x[RS6000_BIF_MFFS];
> - tree mtfsf = rs6000_builtin_decls_x[RS6000_BIF_MTFSF];
> + tree mffs = rs6000_builtin_decls[RS6000_BIF_MFFS];
> + tree mtfsf = rs6000_builtin_decls[RS6000_BIF_MTFSF];
> tree call_mffs = build_call_expr (mffs, 0);
>
> /* Generates the equivalent of feholdexcept (&fenv_var)
On Mon, Dec 6, 2021 at 3:49 PM Bill Schmidt <wschmidt@linux.ibm.com> wrote:
>
> Hi!
>
> While we had two sets of built-in infrastructure at once, I added _x as a
> suffix to two arrays to disambiguate the old and new versions. Time to fix
> that also.
>
> Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this
> okay for trunk?
>
> Thanks!
> Bill
>
> 2021-12-06 Bill Schmidt <wschmidt@linux.ibm.com>
>
> gcc/
> * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): Rename
> rs6000_builtin_decls_x to rs6000_builtin_decls.
> (altivec_resolve_overloaded_builtin): Likewise. Also rename
> rs6000_builtin_info_x to rs6000_builtin_info.
> * config/rs6000/rs6000-call.c (rs6000_invalid_builtin): Rename
> rs6000_builtin_info_x to rs6000_builtin_info.
> (rs6000_builtin_is_supported): Likewise.
> (rs6000_gimple_fold_mma_builtin): Likewise. Also rename
> rs6000_builtin_decls_x to rs6000_builtin_decls.
> (rs6000_gimple_fold_builtin): Rename rs6000_builtin_info_x to
> rs6000_builtin_info.
> (cpu_expand_builtin): Likewise.
> (rs6000_expand_builtin): Likewise.
> (rs6000_init_builtins): Likewise. Also rename rs6000_builtin_decls_x
> to rs6000_builtin_decls.
> (rs6000_builtin_decl): Rename rs6000_builtin_decls_x to
> rs6000_builtin_decls.
> * config/rs6000/rs6000-gen-builtins.c (write_decls): In generated code,
> rename rs6000_builtin_decls_x to rs6000_builtin_decls, and rename
> rs6000_builtin_info_x to rs6000_builtin_info.
> (write_bif_static_init): In generated code, rename
> rs6000_builtin_info_x to rs6000_builtin_info.
> (write_init_bif_table): In generated code, rename
> rs6000_builtin_decls_x to rs6000_builtin_decls, and rename
> rs6000_builtin_info_x to rs6000_builtin_info.
> (write_init_ovld_table): In generated code, rename
> rs6000_builtin_decls_x to rs6000_builtin_decls.
> (write_init_file): Likewise.
> * config/rs6000/rs6000.c (rs6000_builtin_vectorized_function):
> Likewise.
> (rs6000_builtin_md_vectorized_function): Likewise.
> (rs6000_builtin_reciprocal): Likewise.
> (add_condition_to_bb): Likewise.
> (rs6000_atomic_assign_expand_fenv): Likewise.
Okay.
Thanks, David
@@ -867,7 +867,7 @@ altivec_build_resolved_builtin (tree *args, int n, tree fntype, tree ret_type,
{
tree argtypes = TYPE_ARG_TYPES (fntype);
tree arg_type[MAX_OVLD_ARGS];
- tree fndecl = rs6000_builtin_decls_x[bif_id];
+ tree fndecl = rs6000_builtin_decls[bif_id];
for (int i = 0; i < n; i++)
{
@@ -1001,13 +1001,13 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
case E_SFmode:
{
/* For floats use the xvmulsp instruction directly. */
- tree call = rs6000_builtin_decls_x[RS6000_BIF_XVMULSP];
+ tree call = rs6000_builtin_decls[RS6000_BIF_XVMULSP];
return build_call_expr (call, 2, arg0, arg1);
}
case E_DFmode:
{
/* For doubles use the xvmuldp instruction directly. */
- tree call = rs6000_builtin_decls_x[RS6000_BIF_XVMULDP];
+ tree call = rs6000_builtin_decls[RS6000_BIF_XVMULDP];
return build_call_expr (call, 2, arg0, arg1);
}
/* Other types are errors. */
@@ -1066,7 +1066,7 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
vec_safe_push (params, arg0);
vec_safe_push (params, arg1);
tree call = altivec_resolve_overloaded_builtin
- (loc, rs6000_builtin_decls_x[RS6000_OVLD_VEC_CMPEQ],
+ (loc, rs6000_builtin_decls[RS6000_OVLD_VEC_CMPEQ],
params);
/* Use save_expr to ensure that operands used more than once
that may have side effects (like calls) are only evaluated
@@ -1076,7 +1076,7 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
vec_safe_push (params, call);
vec_safe_push (params, call);
return altivec_resolve_overloaded_builtin
- (loc, rs6000_builtin_decls_x[RS6000_OVLD_VEC_NOR], params);
+ (loc, rs6000_builtin_decls[RS6000_OVLD_VEC_NOR], params);
}
/* Other types are errors. */
default:
@@ -1129,9 +1129,9 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
vec_safe_push (params, arg1);
if (fcode == RS6000_OVLD_VEC_ADDE)
- add_sub_builtin = rs6000_builtin_decls_x[RS6000_OVLD_VEC_ADD];
+ add_sub_builtin = rs6000_builtin_decls[RS6000_OVLD_VEC_ADD];
else
- add_sub_builtin = rs6000_builtin_decls_x[RS6000_OVLD_VEC_SUB];
+ add_sub_builtin = rs6000_builtin_decls[RS6000_OVLD_VEC_SUB];
tree call
= altivec_resolve_overloaded_builtin (loc, add_sub_builtin,
@@ -1207,9 +1207,9 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
vec_safe_push (params, arg1);
if (fcode == RS6000_OVLD_VEC_ADDEC)
- as_c_builtin = rs6000_builtin_decls_x[RS6000_OVLD_VEC_ADDC];
+ as_c_builtin = rs6000_builtin_decls[RS6000_OVLD_VEC_ADDC];
else
- as_c_builtin = rs6000_builtin_decls_x[RS6000_OVLD_VEC_SUBC];
+ as_c_builtin = rs6000_builtin_decls[RS6000_OVLD_VEC_SUBC];
tree call1 = altivec_resolve_overloaded_builtin (loc, as_c_builtin,
params);
@@ -1218,9 +1218,9 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
vec_safe_push (params, arg1);
if (fcode == RS6000_OVLD_VEC_ADDEC)
- as_builtin = rs6000_builtin_decls_x[RS6000_OVLD_VEC_ADD];
+ as_builtin = rs6000_builtin_decls[RS6000_OVLD_VEC_ADD];
else
- as_builtin = rs6000_builtin_decls_x[RS6000_OVLD_VEC_SUB];
+ as_builtin = rs6000_builtin_decls[RS6000_OVLD_VEC_SUB];
tree call2 = altivec_resolve_overloaded_builtin (loc, as_builtin,
params);
@@ -1236,7 +1236,7 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
params = make_tree_vector ();
vec_safe_push (params, call1);
vec_safe_push (params, call2);
- tree or_builtin = rs6000_builtin_decls_x[RS6000_OVLD_VEC_OR];
+ tree or_builtin = rs6000_builtin_decls[RS6000_OVLD_VEC_OR];
return altivec_resolve_overloaded_builtin (loc, or_builtin,
params);
}
@@ -1380,34 +1380,34 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
break;
case E_V1TImode:
- call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V1TI];
+ call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V1TI];
break;
case E_V2DFmode:
- call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V2DF];
+ call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V2DF];
break;
case E_V2DImode:
- call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V2DI];
+ call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V2DI];
break;
case E_V4SFmode:
- call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V4SF];
+ call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V4SF];
break;
case E_V4SImode:
if (TARGET_DIRECT_MOVE_64BIT)
- call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V4SI];
+ call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V4SI];
break;
case E_V8HImode:
if (TARGET_DIRECT_MOVE_64BIT)
- call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V8HI];
+ call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V8HI];
break;
case E_V16QImode:
if (TARGET_DIRECT_MOVE_64BIT)
- call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V16QI];
+ call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V16QI];
break;
}
}
@@ -1422,27 +1422,27 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
break;
case E_V2DFmode:
- call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V2DF];
+ call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V2DF];
break;
case E_V2DImode:
- call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V2DI];
+ call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V2DI];
break;
case E_V4SFmode:
- call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V4SF];
+ call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V4SF];
break;
case E_V4SImode:
- call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V4SI];
+ call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V4SI];
break;
case E_V8HImode:
- call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V8HI];
+ call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V8HI];
break;
case E_V16QImode:
- call = rs6000_builtin_decls_x[RS6000_BIF_VEC_EXT_V16QI];
+ call = rs6000_builtin_decls[RS6000_BIF_VEC_EXT_V16QI];
break;
}
}
@@ -1542,9 +1542,9 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
arg2 = wide_int_to_tree (TREE_TYPE (arg2), selector);
if (mode == V2DFmode)
- call = rs6000_builtin_decls_x[RS6000_BIF_VEC_SET_V2DF];
+ call = rs6000_builtin_decls[RS6000_BIF_VEC_SET_V2DF];
else if (mode == V2DImode)
- call = rs6000_builtin_decls_x[RS6000_BIF_VEC_SET_V2DI];
+ call = rs6000_builtin_decls[RS6000_BIF_VEC_SET_V2DI];
/* Note, __builtin_vec_insert_<xxx> has vector and scalar types
reversed. */
@@ -1554,7 +1554,7 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
else if (mode == V1TImode && VECTOR_UNIT_VSX_P (mode)
&& TREE_CODE (arg2) == INTEGER_CST)
{
- tree call = rs6000_builtin_decls_x[RS6000_BIF_VEC_SET_V1TI];
+ tree call = rs6000_builtin_decls[RS6000_BIF_VEC_SET_V1TI];
wide_int selector = wi::zero(32);
arg2 = wide_int_to_tree (TREE_TYPE (arg2), selector);
@@ -1740,7 +1740,7 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
instance = instance->next;
gcc_assert (instance != NULL);
- tree fntype = rs6000_builtin_info_x[instance->bifid].fntype;
+ tree fntype = rs6000_builtin_info[instance->bifid].fntype;
tree parmtype0 = TREE_VALUE (TYPE_ARG_TYPES (fntype));
tree parmtype1 = TREE_VALUE (TREE_CHAIN (TYPE_ARG_TYPES (fntype)));
@@ -1798,7 +1798,7 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
instance = instance->next;
gcc_assert (instance != NULL);
- tree fntype = rs6000_builtin_info_x[instance->bifid].fntype;
+ tree fntype = rs6000_builtin_info[instance->bifid].fntype;
tree parmtype0 = TREE_VALUE (TYPE_ARG_TYPES (fntype));
tree parmtype1 = TREE_VALUE (TREE_CHAIN (TYPE_ARG_TYPES (fntype)));
@@ -1849,7 +1849,7 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
if (rs6000_builtin_decl (instance->bifid, false) != error_mark_node
&& supported)
{
- tree fntype = rs6000_builtin_info_x[instance->bifid].fntype;
+ tree fntype = rs6000_builtin_info[instance->bifid].fntype;
tree ret_type = TREE_TYPE (instance->fntype);
return altivec_build_resolved_builtin (args, n, fntype,
ret_type,
@@ -1876,7 +1876,7 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
/* Provide clarity of the relationship between the overload
and the instantiation. */
const char *internal_name
- = rs6000_builtin_info_x[instance->bifid].bifname;
+ = rs6000_builtin_info[instance->bifid].bifname;
rich_location richloc (line_table, input_location);
inform (&richloc,
"overloaded builtin %qs is implemented by builtin %qs",
@@ -3258,9 +3258,9 @@ void
rs6000_invalid_builtin (enum rs6000_gen_builtins fncode)
{
size_t j = (size_t) fncode;
- const char *name = rs6000_builtin_info_x[j].bifname;
+ const char *name = rs6000_builtin_info[j].bifname;
- switch (rs6000_builtin_info_x[j].enable)
+ switch (rs6000_builtin_info[j].enable)
{
case ENB_P5:
error ("%qs requires the %qs option", name, "-mcpu=power5");
@@ -3510,7 +3510,7 @@ rs6000_builtin_valid_without_lhs (enum rs6000_gen_builtins fn_code,
bool
rs6000_builtin_is_supported (enum rs6000_gen_builtins fncode)
{
- switch (rs6000_builtin_info_x[(size_t) fncode].enable)
+ switch (rs6000_builtin_info[(size_t) fncode].enable)
{
case ENB_ALWAYS:
return true;
@@ -3570,18 +3570,18 @@ rs6000_gimple_fold_mma_builtin (gimple_stmt_iterator *gsi,
gimple *stmt = gsi_stmt (*gsi);
size_t fncode = (size_t) fn_code;
- if (!bif_is_mma (rs6000_builtin_info_x[fncode]))
+ if (!bif_is_mma (rs6000_builtin_info[fncode]))
return false;
/* Each call that can be gimple-expanded has an associated built-in
function that it will expand into. If this one doesn't, we have
already expanded it! Exceptions: lxvp and stxvp. */
- if (rs6000_builtin_info_x[fncode].assoc_bif == RS6000_BIF_NONE
+ if (rs6000_builtin_info[fncode].assoc_bif == RS6000_BIF_NONE
&& fncode != RS6000_BIF_LXVP
&& fncode != RS6000_BIF_STXVP)
return false;
- bifdata *bd = &rs6000_builtin_info_x[fncode];
+ bifdata *bd = &rs6000_builtin_info[fncode];
unsigned nopnds = bd->nargs;
gimple_seq new_seq = NULL;
gimple *new_call;
@@ -3626,7 +3626,7 @@ rs6000_gimple_fold_mma_builtin (gimple_stmt_iterator *gsi,
to emit a xxmfacc instruction now, since we cannot do it later. */
if (fncode == RS6000_BIF_DISASSEMBLE_ACC)
{
- new_decl = rs6000_builtin_decls_x[RS6000_BIF_XXMFACC_INTERNAL];
+ new_decl = rs6000_builtin_decls[RS6000_BIF_XXMFACC_INTERNAL];
new_call = gimple_build_call (new_decl, 1, src);
src = create_tmp_reg_or_ssa_name (vector_quad_type_node);
gimple_call_set_lhs (new_call, src);
@@ -3635,7 +3635,7 @@ rs6000_gimple_fold_mma_builtin (gimple_stmt_iterator *gsi,
/* Copy the accumulator/pair vector by vector. */
new_decl
- = rs6000_builtin_decls_x[rs6000_builtin_info_x[fncode].assoc_bif];
+ = rs6000_builtin_decls[rs6000_builtin_info[fncode].assoc_bif];
tree dst_type = build_pointer_type_for_mode (unsigned_V16QI_type_node,
ptr_mode, true);
tree dst_base = build1 (VIEW_CONVERT_EXPR, dst_type, dst_ptr);
@@ -3693,7 +3693,7 @@ rs6000_gimple_fold_mma_builtin (gimple_stmt_iterator *gsi,
/* Convert this built-in into an internal version that uses pass-by-value
arguments. The internal built-in is found in the assoc_bif field. */
- new_decl = rs6000_builtin_decls_x[rs6000_builtin_info_x[fncode].assoc_bif];
+ new_decl = rs6000_builtin_decls[rs6000_builtin_info[fncode].assoc_bif];
tree lhs, op[MAX_MMA_OPERANDS];
tree acc = gimple_call_arg (stmt, 0);
push_gimplify_context (true);
@@ -3777,8 +3777,8 @@ rs6000_gimple_fold_builtin (gimple_stmt_iterator *gsi)
gimple *g;
size_t uns_fncode = (size_t) fn_code;
- enum insn_code icode = rs6000_builtin_info_x[uns_fncode].icode;
- const char *fn_name1 = rs6000_builtin_info_x[uns_fncode].bifname;
+ enum insn_code icode = rs6000_builtin_info[uns_fncode].icode;
+ const char *fn_name1 = rs6000_builtin_info[uns_fncode].bifname;
const char *fn_name2 = (icode != CODE_FOR_nothing)
? get_insn_name ((int) icode)
: "nothing";
@@ -4801,7 +4801,7 @@ cpu_expand_builtin (enum rs6000_gen_builtins fcode,
if (TREE_CODE (arg) != STRING_CST)
{
error ("builtin %qs only accepts a string argument",
- rs6000_builtin_info_x[(size_t) fcode].bifname);
+ rs6000_builtin_info[(size_t) fcode].bifname);
return const0_rtx;
}
@@ -4820,7 +4820,7 @@ cpu_expand_builtin (enum rs6000_gen_builtins fcode,
{
/* Invalid CPU argument. */
error ("cpu %qs is an invalid argument to builtin %qs",
- cpu, rs6000_builtin_info_x[(size_t) fcode].bifname);
+ cpu, rs6000_builtin_info[(size_t) fcode].bifname);
return const0_rtx;
}
@@ -4849,7 +4849,7 @@ cpu_expand_builtin (enum rs6000_gen_builtins fcode,
/* Invalid HWCAP argument. */
error ("%s %qs is an invalid argument to builtin %qs",
"hwcap", hwcap,
- rs6000_builtin_info_x[(size_t) fcode].bifname);
+ rs6000_builtin_info[(size_t) fcode].bifname);
return const0_rtx;
}
@@ -4877,7 +4877,7 @@ cpu_expand_builtin (enum rs6000_gen_builtins fcode,
#else
warning (0, "builtin %qs needs GLIBC (2.23 and newer) that exports hardware "
- "capability bits", rs6000_builtin_info_x[(size_t) fcode].bifname);
+ "capability bits", rs6000_builtin_info[(size_t) fcode].bifname);
/* For old LIBCs, always return FALSE. */
emit_move_insn (target, GEN_INT (0));
@@ -5479,7 +5479,7 @@ rs6000_expand_builtin (tree exp, rtx target, rtx /* subtarget */,
enum rs6000_gen_builtins fcode
= (enum rs6000_gen_builtins) DECL_MD_FUNCTION_CODE (fndecl);
size_t uns_fcode = (size_t)fcode;
- enum insn_code icode = rs6000_builtin_info_x[uns_fcode].icode;
+ enum insn_code icode = rs6000_builtin_info[uns_fcode].icode;
/* TODO: The following commentary and code is inherited from the original
builtin processing code. The commentary is a bit confusing, with the
@@ -5557,7 +5557,7 @@ rs6000_expand_builtin (tree exp, rtx target, rtx /* subtarget */,
/* In case of "#pragma target" changes, we initialize all builtins
but check for actual availability now, during expand time. For
invalid builtins, generate a normal call. */
- bifdata *bifaddr = &rs6000_builtin_info_x[uns_fcode];
+ bifdata *bifaddr = &rs6000_builtin_info[uns_fcode];
bif_enable e = bifaddr->enable;
if (!(e == ENB_ALWAYS
@@ -6260,7 +6260,7 @@ rs6000_init_builtins (void)
fprintf (stderr, "\nAutogenerated built-in functions:\n\n");
for (int i = 1; i < (int) RS6000_BIF_MAX; i++)
{
- bif_enable e = rs6000_builtin_info_x[i].enable;
+ bif_enable e = rs6000_builtin_info[i].enable;
if (e == ENB_P5 && !TARGET_POPCNTB)
continue;
if (e == ENB_P6 && !TARGET_CMPB)
@@ -6299,10 +6299,10 @@ rs6000_init_builtins (void)
continue;
if (e == ENB_MMA && !TARGET_MMA)
continue;
- tree fntype = rs6000_builtin_info_x[i].fntype;
+ tree fntype = rs6000_builtin_info[i].fntype;
tree t = TREE_TYPE (fntype);
fprintf (stderr, "%s %s (", rs6000_type_string (t),
- rs6000_builtin_info_x[i].bifname);
+ rs6000_builtin_info[i].bifname);
t = TYPE_ARG_TYPES (fntype);
while (t && TREE_VALUE (t) != void_type_node)
{
@@ -6313,7 +6313,7 @@ rs6000_init_builtins (void)
fprintf (stderr, ", ");
}
fprintf (stderr, "); %s [%4d]\n",
- rs6000_builtin_info_x[i].attr_string, (int) i);
+ rs6000_builtin_info[i].attr_string, (int) i);
}
fprintf (stderr, "\nEnd autogenerated built-in functions.\n\n\n");
}
@@ -6342,7 +6342,7 @@ rs6000_init_builtins (void)
}
altivec_builtin_mask_for_load
- = rs6000_builtin_decls_x[RS6000_BIF_MASK_FOR_LOAD];
+ = rs6000_builtin_decls[RS6000_BIF_MASK_FOR_LOAD];
#ifdef SUBTARGET_INIT_BUILTINS
SUBTARGET_INIT_BUILTINS;
@@ -6359,7 +6359,7 @@ rs6000_builtin_decl (unsigned code, bool /* initialize_p */)
if (fcode >= RS6000_OVLD_MAX)
return error_mark_node;
- return rs6000_builtin_decls_x[code];
+ return rs6000_builtin_decls[code];
}
/* Return the internal arg pointer used for function incoming
@@ -2208,7 +2208,7 @@ write_decls (void)
fprintf (header_file, " RS6000_OVLD_MAX\n};\n\n");
fprintf (header_file,
- "extern GTY(()) tree rs6000_builtin_decls_x[RS6000_OVLD_MAX];\n\n");
+ "extern GTY(()) tree rs6000_builtin_decls[RS6000_OVLD_MAX];\n\n");
fprintf (header_file,
"enum rs6000_ovld_instances\n{\n RS6000_INST_NONE,\n");
@@ -2336,9 +2336,6 @@ write_decls (void)
"#define bif_is_endian(x)\t((x).bifattrs & bif_endian_bit)\n");
fprintf (header_file, "\n");
- /* #### Note that the _x is added for now to avoid conflict with
- the existing rs6000_builtin_info[] file while testing. It will
- be removed as we progress. */
/* #### Cannot mark this as a GC root because only pointer types can
be marked as GTY((user)) and be GC roots. All trees in here are
kept alive by other globals, so not a big deal. Alternatively,
@@ -2346,7 +2343,7 @@ write_decls (void)
to avoid requiring a GTY((user)) designation, but that seems
unnecessarily gross. */
fprintf (header_file,
- "extern bifdata rs6000_builtin_info_x[RS6000_BIF_MAX];\n\n");
+ "extern bifdata rs6000_builtin_info[RS6000_BIF_MAX];\n\n");
fprintf (header_file, "struct GTY((user)) ovlddata\n");
fprintf (header_file, "{\n");
@@ -2495,12 +2492,12 @@ write_header_file (void)
return 1;
}
-/* Write the decl and initializer for rs6000_builtin_info_x[]. */
+/* Write the decl and initializer for rs6000_builtin_info[]. */
static void
write_bif_static_init (void)
{
const char *res[3];
- fprintf (init_file, "bifdata rs6000_builtin_info_x[RS6000_BIF_MAX] =\n");
+ fprintf (init_file, "bifdata rs6000_builtin_info[RS6000_BIF_MAX] =\n");
fprintf (init_file, " {\n");
fprintf (init_file, " { /* RS6000_BIF_NONE: */\n");
fprintf (init_file, " \"\", ENB_ALWAYS, 0, CODE_FOR_nothing, 0,\n");
@@ -2665,7 +2662,7 @@ write_init_bif_table (void)
for (int i = 0; i <= curr_bif; i++)
{
fprintf (init_file,
- " rs6000_builtin_info_x[RS6000_BIF_%s].fntype"
+ " rs6000_builtin_info[RS6000_BIF_%s].fntype"
"\n = %s;\n",
bifs[i].idname, bifs[i].fndecl);
@@ -2692,7 +2689,7 @@ write_init_bif_table (void)
}
fprintf (init_file,
- " rs6000_builtin_decls_x[(int)RS6000_BIF_%s] = t\n",
+ " rs6000_builtin_decls[(int)RS6000_BIF_%s] = t\n",
bifs[i].idname);
fprintf (init_file,
" = add_builtin_function (\"%s\",\n",
@@ -2733,7 +2730,7 @@ write_init_bif_table (void)
fprintf (init_file, " }\n");
fprintf (init_file, " else\n");
fprintf (init_file, " {\n");
- fprintf (init_file, " rs6000_builtin_decls_x"
+ fprintf (init_file, " rs6000_builtin_decls"
"[(int)RS6000_BIF_%s] = NULL_TREE;\n", bifs[i].idname);
fprintf (init_file, " }\n");
}
@@ -2786,7 +2783,7 @@ write_init_ovld_table (void)
}
fprintf (init_file,
- " rs6000_builtin_decls_x[(int)RS6000_OVLD_%s] = t\n",
+ " rs6000_builtin_decls[(int)RS6000_OVLD_%s] = t\n",
stanza->stanza_id);
fprintf (init_file,
" = add_builtin_function (\"%s\",\n",
@@ -2835,7 +2832,7 @@ write_init_file (void)
fprintf (init_file, "#include \"rs6000-builtins.h\"\n");
fprintf (init_file, "\n");
- fprintf (init_file, "tree rs6000_builtin_decls_x[RS6000_OVLD_MAX];\n\n");
+ fprintf (init_file, "tree rs6000_builtin_decls[RS6000_OVLD_MAX];\n\n");
write_bif_static_init ();
write_ovld_static_init ();
@@ -2851,11 +2848,11 @@ write_init_file (void)
fprintf (init_file, "\n");
fprintf (init_file,
- " rs6000_builtin_decls_x[RS6000_BIF_NONE] = NULL_TREE;\n");
+ " rs6000_builtin_decls[RS6000_BIF_NONE] = NULL_TREE;\n");
fprintf (init_file,
- " rs6000_builtin_decls_x[RS6000_BIF_MAX] = NULL_TREE;\n");
+ " rs6000_builtin_decls[RS6000_BIF_MAX] = NULL_TREE;\n");
fprintf (init_file,
- " rs6000_builtin_decls_x[RS6000_OVLD_NONE] = NULL_TREE;\n\n");
+ " rs6000_builtin_decls[RS6000_OVLD_NONE] = NULL_TREE;\n\n");
write_init_bif_table ();
write_init_ovld_table ();
@@ -5596,95 +5596,95 @@ rs6000_builtin_vectorized_function (unsigned int fn, tree type_out,
if (VECTOR_UNIT_VSX_P (V2DFmode)
&& out_mode == DFmode && out_n == 2
&& in_mode == DFmode && in_n == 2)
- return rs6000_builtin_decls_x[RS6000_BIF_CPSGNDP];
+ return rs6000_builtin_decls[RS6000_BIF_CPSGNDP];
if (VECTOR_UNIT_VSX_P (V4SFmode)
&& out_mode == SFmode && out_n == 4
&& in_mode == SFmode && in_n == 4)
- return rs6000_builtin_decls_x[RS6000_BIF_CPSGNSP];
+ return rs6000_builtin_decls[RS6000_BIF_CPSGNSP];
if (VECTOR_UNIT_ALTIVEC_P (V4SFmode)
&& out_mode == SFmode && out_n == 4
&& in_mode == SFmode && in_n == 4)
- return rs6000_builtin_decls_x[RS6000_BIF_COPYSIGN_V4SF];
+ return rs6000_builtin_decls[RS6000_BIF_COPYSIGN_V4SF];
break;
CASE_CFN_CEIL:
if (VECTOR_UNIT_VSX_P (V2DFmode)
&& out_mode == DFmode && out_n == 2
&& in_mode == DFmode && in_n == 2)
- return rs6000_builtin_decls_x[RS6000_BIF_XVRDPIP];
+ return rs6000_builtin_decls[RS6000_BIF_XVRDPIP];
if (VECTOR_UNIT_VSX_P (V4SFmode)
&& out_mode == SFmode && out_n == 4
&& in_mode == SFmode && in_n == 4)
- return rs6000_builtin_decls_x[RS6000_BIF_XVRSPIP];
+ return rs6000_builtin_decls[RS6000_BIF_XVRSPIP];
if (VECTOR_UNIT_ALTIVEC_P (V4SFmode)
&& out_mode == SFmode && out_n == 4
&& in_mode == SFmode && in_n == 4)
- return rs6000_builtin_decls_x[RS6000_BIF_VRFIP];
+ return rs6000_builtin_decls[RS6000_BIF_VRFIP];
break;
CASE_CFN_FLOOR:
if (VECTOR_UNIT_VSX_P (V2DFmode)
&& out_mode == DFmode && out_n == 2
&& in_mode == DFmode && in_n == 2)
- return rs6000_builtin_decls_x[RS6000_BIF_XVRDPIM];
+ return rs6000_builtin_decls[RS6000_BIF_XVRDPIM];
if (VECTOR_UNIT_VSX_P (V4SFmode)
&& out_mode == SFmode && out_n == 4
&& in_mode == SFmode && in_n == 4)
- return rs6000_builtin_decls_x[RS6000_BIF_XVRSPIM];
+ return rs6000_builtin_decls[RS6000_BIF_XVRSPIM];
if (VECTOR_UNIT_ALTIVEC_P (V4SFmode)
&& out_mode == SFmode && out_n == 4
&& in_mode == SFmode && in_n == 4)
- return rs6000_builtin_decls_x[RS6000_BIF_VRFIM];
+ return rs6000_builtin_decls[RS6000_BIF_VRFIM];
break;
CASE_CFN_FMA:
if (VECTOR_UNIT_VSX_P (V2DFmode)
&& out_mode == DFmode && out_n == 2
&& in_mode == DFmode && in_n == 2)
- return rs6000_builtin_decls_x[RS6000_BIF_XVMADDDP];
+ return rs6000_builtin_decls[RS6000_BIF_XVMADDDP];
if (VECTOR_UNIT_VSX_P (V4SFmode)
&& out_mode == SFmode && out_n == 4
&& in_mode == SFmode && in_n == 4)
- return rs6000_builtin_decls_x[RS6000_BIF_XVMADDSP];
+ return rs6000_builtin_decls[RS6000_BIF_XVMADDSP];
if (VECTOR_UNIT_ALTIVEC_P (V4SFmode)
&& out_mode == SFmode && out_n == 4
&& in_mode == SFmode && in_n == 4)
- return rs6000_builtin_decls_x[RS6000_BIF_VMADDFP];
+ return rs6000_builtin_decls[RS6000_BIF_VMADDFP];
break;
CASE_CFN_TRUNC:
if (VECTOR_UNIT_VSX_P (V2DFmode)
&& out_mode == DFmode && out_n == 2
&& in_mode == DFmode && in_n == 2)
- return rs6000_builtin_decls_x[RS6000_BIF_XVRDPIZ];
+ return rs6000_builtin_decls[RS6000_BIF_XVRDPIZ];
if (VECTOR_UNIT_VSX_P (V4SFmode)
&& out_mode == SFmode && out_n == 4
&& in_mode == SFmode && in_n == 4)
- return rs6000_builtin_decls_x[RS6000_BIF_XVRSPIZ];
+ return rs6000_builtin_decls[RS6000_BIF_XVRSPIZ];
if (VECTOR_UNIT_ALTIVEC_P (V4SFmode)
&& out_mode == SFmode && out_n == 4
&& in_mode == SFmode && in_n == 4)
- return rs6000_builtin_decls_x[RS6000_BIF_VRFIZ];
+ return rs6000_builtin_decls[RS6000_BIF_VRFIZ];
break;
CASE_CFN_NEARBYINT:
if (VECTOR_UNIT_VSX_P (V2DFmode)
&& flag_unsafe_math_optimizations
&& out_mode == DFmode && out_n == 2
&& in_mode == DFmode && in_n == 2)
- return rs6000_builtin_decls_x[RS6000_BIF_XVRDPI];
+ return rs6000_builtin_decls[RS6000_BIF_XVRDPI];
if (VECTOR_UNIT_VSX_P (V4SFmode)
&& flag_unsafe_math_optimizations
&& out_mode == SFmode && out_n == 4
&& in_mode == SFmode && in_n == 4)
- return rs6000_builtin_decls_x[RS6000_BIF_XVRSPI];
+ return rs6000_builtin_decls[RS6000_BIF_XVRSPI];
break;
CASE_CFN_RINT:
if (VECTOR_UNIT_VSX_P (V2DFmode)
&& !flag_trapping_math
&& out_mode == DFmode && out_n == 2
&& in_mode == DFmode && in_n == 2)
- return rs6000_builtin_decls_x[RS6000_BIF_XVRDPIC];
+ return rs6000_builtin_decls[RS6000_BIF_XVRDPIC];
if (VECTOR_UNIT_VSX_P (V4SFmode)
&& !flag_trapping_math
&& out_mode == SFmode && out_n == 4
&& in_mode == SFmode && in_n == 4)
- return rs6000_builtin_decls_x[RS6000_BIF_XVRSPIC];
+ return rs6000_builtin_decls[RS6000_BIF_XVRSPIC];
break;
default:
break;
@@ -5731,25 +5731,25 @@ rs6000_builtin_md_vectorized_function (tree fndecl, tree type_out,
if (VECTOR_UNIT_ALTIVEC_OR_VSX_P (V4SFmode)
&& out_mode == SFmode && out_n == 4
&& in_mode == SFmode && in_n == 4)
- return rs6000_builtin_decls_x[RS6000_BIF_VRSQRTFP];
+ return rs6000_builtin_decls[RS6000_BIF_VRSQRTFP];
break;
case RS6000_BIF_RSQRT:
if (VECTOR_UNIT_VSX_P (V2DFmode)
&& out_mode == DFmode && out_n == 2
&& in_mode == DFmode && in_n == 2)
- return rs6000_builtin_decls_x[RS6000_BIF_RSQRT_2DF];
+ return rs6000_builtin_decls[RS6000_BIF_RSQRT_2DF];
break;
case RS6000_BIF_RECIPF:
if (VECTOR_UNIT_ALTIVEC_OR_VSX_P (V4SFmode)
&& out_mode == SFmode && out_n == 4
&& in_mode == SFmode && in_n == 4)
- return rs6000_builtin_decls_x[RS6000_BIF_VRECIPFP];
+ return rs6000_builtin_decls[RS6000_BIF_VRECIPFP];
break;
case RS6000_BIF_RECIP:
if (VECTOR_UNIT_VSX_P (V2DFmode)
&& out_mode == DFmode && out_n == 2
&& in_mode == DFmode && in_n == 2)
- return rs6000_builtin_decls_x[RS6000_BIF_RECIP_V2DF];
+ return rs6000_builtin_decls[RS6000_BIF_RECIP_V2DF];
break;
default:
break;
@@ -5804,7 +5804,7 @@ rs6000_builtin_md_vectorized_function (tree fndecl, tree type_out,
}
if (in_mode == exp_mode && in_vmode == exp_vmode)
- return rs6000_builtin_decls_x[bif];
+ return rs6000_builtin_decls[bif];
}
return NULL_TREE;
@@ -22496,13 +22496,13 @@ rs6000_builtin_reciprocal (tree fndecl)
if (!RS6000_RECIP_AUTO_RSQRTE_P (V2DFmode))
return NULL_TREE;
- return rs6000_builtin_decls_x[RS6000_BIF_RSQRT_2DF];
+ return rs6000_builtin_decls[RS6000_BIF_RSQRT_2DF];
case RS6000_BIF_XVSQRTSP:
if (!RS6000_RECIP_AUTO_RSQRTE_P (V4SFmode))
return NULL_TREE;
- return rs6000_builtin_decls_x[RS6000_BIF_RSQRT_4SF];
+ return rs6000_builtin_decls[RS6000_BIF_RSQRT_4SF];
default:
return NULL_TREE;
@@ -25124,7 +25124,7 @@ add_condition_to_bb (tree function_decl, tree version_decl,
tree bool_zero = build_int_cst (bool_int_type_node, 0);
tree cond_var = create_tmp_var (bool_int_type_node);
- tree predicate_decl = rs6000_builtin_decls_x[(int) RS6000_BIF_CPU_SUPPORTS];
+ tree predicate_decl = rs6000_builtin_decls[(int) RS6000_BIF_CPU_SUPPORTS];
const char *arg_str = rs6000_clone_map[clone_isa].name;
tree predicate_arg = build_string_literal (strlen (arg_str) + 1, arg_str);
gimple *call_cond_stmt = gimple_build_call (predicate_decl, 1, predicate_arg);
@@ -27764,8 +27764,8 @@ rs6000_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update)
return;
}
- tree mffs = rs6000_builtin_decls_x[RS6000_BIF_MFFS];
- tree mtfsf = rs6000_builtin_decls_x[RS6000_BIF_MTFSF];
+ tree mffs = rs6000_builtin_decls[RS6000_BIF_MFFS];
+ tree mtfsf = rs6000_builtin_decls[RS6000_BIF_MTFSF];
tree call_mffs = build_call_expr (mffs, 0);
/* Generates the equivalent of feholdexcept (&fenv_var)