diff options
author | Richard Biener <rguenther@suse.de> | 2021-07-16 13:26:20 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-07-19 09:15:18 +0200 |
commit | 3ce20b6be543824a07c3367253188d754b58667e (patch) | |
tree | 62caf65c46628be85e43d4a5eb401ecd21c02459 /gcc/tree-vect-generic.c | |
parent | 4a21a8c34a707e88f450375e3c7d593be75162f4 (diff) | |
download | gcc-3ce20b6be543824a07c3367253188d754b58667e.zip gcc-3ce20b6be543824a07c3367253188d754b58667e.tar.gz gcc-3ce20b6be543824a07c3367253188d754b58667e.tar.bz2 |
Remove last gimple_expr_type uses
This removes the last uses of gimple_expr_type.
2021-07-16 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.c (vn_reference_eq): Handle NULL vr->type.
(ao_ref_init_from_vn_reference): Likewise.
(fully_constant_reference): Likewise.
(vn_reference_lookup_call): Do not set vr->type to random
values.
* tree-ssa-pre.c (compute_avail): Do not try to PRE calls
without a value.
* tree-vect-generic.c (expand_vector_piecewise): Pass in
whether we expanded parallel.
(expand_vector_parallel): Adjust.
(expand_vector_addition): Likewise.
(expand_vector_comparison): Likewise.
(expand_vector_operation): Likewise.
(expand_vector_scalar_condition): Likewise.
(expand_vector_conversion): Likewise.
Diffstat (limited to 'gcc/tree-vect-generic.c')
-rw-r--r-- | gcc/tree-vect-generic.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c index a1257db..2e00b3e 100644 --- a/gcc/tree-vect-generic.c +++ b/gcc/tree-vect-generic.c @@ -307,7 +307,7 @@ static tree expand_vector_piecewise (gimple_stmt_iterator *gsi, elem_op_func f, tree type, tree inner_type, tree a, tree b, enum tree_code code, - tree ret_type = NULL_TREE) + bool parallel_p, tree ret_type = NULL_TREE) { vec<constructor_elt, va_gc> *v; tree part_width = TYPE_SIZE (inner_type); @@ -317,8 +317,7 @@ expand_vector_piecewise (gimple_stmt_iterator *gsi, elem_op_func f, int i; location_t loc = gimple_location (gsi_stmt (*gsi)); - if (ret_type - || types_compatible_p (gimple_expr_type (gsi_stmt (*gsi)), type)) + if (ret_type || !parallel_p) warning_at (loc, OPT_Wvector_operation_performance, "vector operation will be expanded piecewise"); else @@ -364,13 +363,13 @@ expand_vector_parallel (gimple_stmt_iterator *gsi, elem_op_func f, tree type, if (TYPE_MODE (TREE_TYPE (type)) == word_mode) return expand_vector_piecewise (gsi, f, type, TREE_TYPE (type), - a, b, code); + a, b, code, true); else if (n_words > 1) { tree word_type = build_word_mode_vector_type (n_words); result = expand_vector_piecewise (gsi, f, word_type, TREE_TYPE (word_type), - a, b, code); + a, b, code, true); result = force_gimple_operand_gsi (gsi, result, true, NULL, true, GSI_SAME_STMT); } @@ -410,7 +409,7 @@ expand_vector_addition (gimple_stmt_iterator *gsi, else return expand_vector_piecewise (gsi, f, type, TREE_TYPE (type), - a, b, code); + a, b, code, false); } static bool @@ -501,7 +500,7 @@ expand_vector_comparison (gimple_stmt_iterator *gsi, tree type, tree op0, else t = expand_vector_piecewise (gsi, do_compare, type, TREE_TYPE (TREE_TYPE (op0)), op0, op1, - code); + code, false); } else t = NULL_TREE; @@ -1248,11 +1247,11 @@ expand_vector_operation (gimple_stmt_iterator *gsi, tree type, tree compute_type if (TREE_CODE_CLASS (code) == tcc_unary) return expand_vector_piecewise (gsi, do_unop, type, compute_type, gimple_assign_rhs1 (assign), - NULL_TREE, code); + NULL_TREE, code, false); else return expand_vector_piecewise (gsi, do_binop, type, compute_type, gimple_assign_rhs1 (assign), - gimple_assign_rhs2 (assign), code); + gimple_assign_rhs2 (assign), code, false); } /* Try to optimize @@ -1762,7 +1761,7 @@ expand_vector_scalar_condition (gimple_stmt_iterator *gsi) COND_EXPR); else new_rhs = expand_vector_piecewise (gsi, do_cond, type, compute_type, - rhs2, rhs3, COND_EXPR); + rhs2, rhs3, COND_EXPR, false); if (!useless_type_conversion_p (TREE_TYPE (lhs), TREE_TYPE (new_rhs))) new_rhs = gimplify_build1 (gsi, VIEW_CONVERT_EXPR, TREE_TYPE (lhs), new_rhs); @@ -1885,7 +1884,7 @@ expand_vector_conversion (gimple_stmt_iterator *gsi) { new_rhs = expand_vector_piecewise (gsi, do_vec_conversion, ret_type, arg1_type, arg, - NULL_TREE, code1); + NULL_TREE, code1, false); g = gimple_build_assign (lhs, new_rhs); gsi_replace (gsi, g, false); return; @@ -1953,7 +1952,7 @@ expand_vector_conversion (gimple_stmt_iterator *gsi) do_vec_narrow_conversion, arg_type, dcompute_type, arg, NULL_TREE, code1, - ret_type); + false, ret_type); g = gimple_build_assign (lhs, new_rhs); gsi_replace (gsi, g, false); return; @@ -2065,7 +2064,7 @@ expand_vector_conversion (gimple_stmt_iterator *gsi) new_rhs = expand_vector_piecewise (gsi, do_vec_conversion, arg_type, TREE_TYPE (arg_type), arg, - NULL_TREE, code, ret_type); + NULL_TREE, code, false, ret_type); g = gimple_build_assign (lhs, new_rhs); gsi_replace (gsi, g, false); } |