GCC Middle and Back End API Reference
|
Typedefs | |
typedef tree(* | elem_op_func )(gimple_stmt_iterator *, tree, tree, tree, tree, tree, enum tree_code) |
Variables | |
static tree | vector_inner_type |
static tree | vector_last_type |
static int | vector_last_nunits |
|
static |
Helper function of expand_vector_divmod. Gimplify a RSHIFT_EXPR in type of OP0 with shift counts in SHIFTCNTS array and return the temporary holding the result if successful, otherwise return NULL_TREE.
References build_int_cst(), gimplify_build2(), optab_for_tree_code(), optab_handler(), optab_scalar, optab_vector, and unknown_optab.
Referenced by expand_vector_divmod().
|
static |
Build a constant of type TYPE, made of VALUE's bits replicated every TYPE_SIZE (INNER_TYPE) bits to fit TYPE's precision.
References build_int_cst_wide(), HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, and tree_low_cst().
Referenced by do_negate(), and do_plus_minus().
|
static |
Return a suitable vector types made of SUBPARTS units each of mode "word_mode" (the global variable).
References build_vector_type(), lang_hooks_for_types::type_for_mode, type_hash_canon(), lang_hooks::types, vector_last_type, and word_mode.
Referenced by expand_vector_parallel().
|
static |
References gimplify_build2(), and tree_vec_extract().
Referenced by descr_info_loc(), expand_vector_operation(), loc_list_from_tree(), and mem_loc_descriptor().
|
static |
Construct expression (A[BITPOS] code B[BITPOS]) ? -1 : 0 INNER_TYPE is the type of A and B elements returned expression is of signed integer type with the size equal to the size of INNER_TYPE.
References build_int_cst(), build_nonstandard_integer_type(), gimplify_build3(), and tree_vec_extract().
Referenced by expand_vector_comparison().
|
static |
References build_replicated_const(), gimplify_build1(), gimplify_build2(), HOST_WIDE_INT, and tree_vec_extract().
Referenced by expand_vector_operation().
|
static |
Expand vector addition to scalars. This does bit twiddling in order to increase parallelism: a + b = (((int) a & 0x7f7f7f7f) + ((int) b & 0x7f7f7f7f)) ^ (a ^ b) & 0x80808080 a - b = (((int) a | 0x80808080) - ((int) b & 0x7f7f7f7f)) ^ (a ^ ~b) & 0x80808080 -b = (0x80808080 - ((int) b & 0x7f7f7f7f)) ^ (~b & 0x80808080) This optimization should be done only if 4 vector items or more fit into a word.
References build_replicated_const(), gimplify_build1(), gimplify_build2(), HOST_WIDE_INT, and tree_vec_extract().
Referenced by expand_vector_operation().
|
static |
References gimplify_build1(), and tree_vec_extract().
Referenced by expand_vector_operation(), loc_list_from_tree(), and mem_loc_descriptor().
|
static |
Expand a vector operation to scalars; for integer types we can use special bit twiddling tricks to do the sums a word at a time, using function F_PARALLEL instead of F. These tricks are done only if they can process at least four items, that is, only if the vector holds at least four items and if a word can hold four items.
References expand_vector_parallel(), expand_vector_piecewise(), and tree_low_cst().
Referenced by expand_vector_operation().
|
static |
Try to expand vector comparison expression OP0 CODE OP1 by querying optab if the following expression: VEC_COND_EXPR< OP0 CODE OP1, {-1,...}, {0,...}> can be expanded.
References do_compare(), expand_vec_cond_expr_p(), and expand_vector_piecewise().
Referenced by expand_vector_operation().
|
static |
Expand a vector condition to scalars, by using many conditions on the vector's elements.
References build_constructor(), expand_vec_cond_expr_p(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs3(), gimple_assign_set_rhs_from_tree(), gimple_expr_type(), gimple_location(), gimplify_build3(), gsi_stmt(), int_const_binop(), is_gimple_val(), tree_vec_extract(), update_stmt(), vec_alloc(), and warning_at().
Referenced by expand_vector_operations_1().
|
static |
Try to expand integer vector division by constant using widening multiply, shifts and additions.
References add_rshift(), build_int_cst(), build_nonstandard_integer_type(), build_vector_type(), build_zero_cst(), can_mult_highpart_p(), choose_multiplier(), d2, expand_vec_cond_expr_p(), floor_log2(), gimple_build_assign_with_ops(), gimplify_build1(), gimplify_build2(), gsi_insert_before(), GSI_SAME_STMT, HOST_BITS_PER_WIDE_INT, host_integerp(), HOST_WIDE_INT, integer_pow2p(), integer_zerop(), make_ssa_name(), optab_default, optab_for_tree_code(), optab_handler(), optab_vector, tree_int_cst_sgn(), tree_log2(), tree_low_cst(), and unknown_optab.
Referenced by expand_vector_operation().
|
static |
|
static |
@verbatim Lower vector operations to scalar operations.
Copyright (C) 2004-2013 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.
Need to include rtl.h, expr.h, etc. for optabs.
Referenced by expand_vector_operations().
|
static |
Process one statement. If we identify a vector operation, expand it.
References can_mult_highpart_p(), expand_vector_condition(), expand_vector_operation(), first, get_gimple_rhs_class(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), gimple_assign_set_rhs2(), gimple_assign_set_rhs_from_tree(), gimple_assign_single_p(), GIMPLE_BINARY_RHS, gimple_expr_type(), GIMPLE_UNARY_RHS, gimplify_build1(), gsi_stmt(), lower_vec_perm(), optab_default, optab_for_tree_code(), optab_handler(), optab_scalar, optab_vector, type(), type_for_widest_vector_mode(), uniform_vector_p(), unknown_optab, update_stmt(), and useless_type_conversion_p().
|
static |
Expand a vector operation to scalars with the freedom to use a scalar integer type, or to use a different size for the items in the vector type.
References build_word_mode_vector_type(), expand_vector_piecewise(), force_gimple_operand_gsi(), gimple_location(), GSI_SAME_STMT, gsi_stmt(), mode_for_size(), tree_low_cst(), lang_hooks_for_types::type_for_mode, lang_hooks::types, warning_at(), and word_mode.
Referenced by expand_vector_addition(), and expand_vector_operation().
|
static |
Expand a vector operation to scalars, by using many operations whose type is the vector type's inner type.
References build_constructor(), gimple_expr_type(), gimple_location(), gsi_stmt(), int_const_binop(), tree_low_cst(), types_compatible_p(), vec_alloc(), and warning_at().
Referenced by expand_vector_addition(), expand_vector_comparison(), expand_vector_operation(), and expand_vector_parallel().
|
static |
Use this to lower vector operations introduced by the vectorizer, if it may need the bit-twiddling tricks implemented in this file.
References cfun, and function::curr_properties.
|
static |
Check if VEC_PERM_EXPR within the given setting is supported by hardware, or lower it piecewise. When VEC_PERM_EXPR has the same first and second operands: VEC_PERM_EXPR <v0, v0, mask> the lowered version would be {v0[mask[0]], v0[mask[1]], ...} MASK and V0 must have the same number of elements. Otherwise VEC_PERM_EXPR <v0, v1, mask> is lowered to {mask[0] < len(v0) ? v0[mask[0]] : v1[mask[0]], ...} V0 and V1 must have the same type. MASK, V0, V1 must have the same number of arguments.
References build_constructor(), build_int_cst(), build_zero_cst(), can_vec_perm_p(), force_gimple_operand_gsi(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs3(), gimple_assign_rhs_code(), gimple_assign_set_rhs3(), gimple_assign_set_rhs_from_tree(), gimple_location(), GSI_SAME_STMT, gsi_stmt(), host_integerp(), HOST_WIDE_INT, is_gimple_assign(), operand_equal_p(), si, update_stmt(), vec_alloc(), vector_element(), and warning_at().
Referenced by expand_vector_operations_1().
gimple_opt_pass* make_pass_lower_vector | ( | ) |
gimple_opt_pass* make_pass_lower_vector_ssa | ( | ) |
|
inlinestatic |
References gimplify_build1(), and gimplify_build3().
Referenced by do_binop(), do_compare(), do_negate(), do_plus_minus(), do_unop(), and expand_vector_condition().
|
static |
Return a type for the widest vector mode whose components are of type TYPE, or NULL_TREE if none is found.
References build_vector_type_for_mode(), and optab_handler().
Referenced by expand_vector_operations_1().
|
static |
Build a reference to the element of the vector VECT. Function returns either the element itself, either BIT_FIELD_REF, or an ARRAY_REF expression. GSI is required to insert temporary variables while building a refernece to the element of the vector VECT. PTMPVEC is a pointer to the temporary variable for caching purposes. In case when PTMPVEC is NULL new temporary variable will be created.
References build_array_type_nelts(), build_int_cst(), build_zero_cst(), create_tmp_var(), gimple_assign_rhs1(), gimple_assign_rhs_code(), gsi_insert_before(), GSI_SAME_STMT, host_integerp(), HOST_WIDE_INT, and is_gimple_assign().
Referenced by lower_vec_perm().
|
static |
|
static |
|
static |
Referenced by build_word_mode_vector_type().