GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
class | gimple_match_cond |
class | gimple_match_op |
Variables | |
tree(* | mprts_hook )(gimple_match_op *) |
bool associative_binary_op_p | ( | code_helper | code, |
tree | type ) |
Return true if CODE is a binary operation that is associative when operating on type TYPE.
References associated_internal_fn(), associative_binary_fn_p(), associative_tree_code(), ggc_alloc(), and code_helper::is_tree_code().
Referenced by vectorizable_reduction().
code_helper canonicalize_code | ( | code_helper | code, |
tree | type ) |
Return a canonical form for CODE when operating on TYPE. The idea is to remove redundant ways of representing the same operation so that code_helpers can be hashed and compared for equality. The only current canonicalization is to replace built-in functions with internal functions, in cases where internal-fn.def defines such an internal function. Note that the new code_helper cannot necessarily be used in place of the original code_helper. For example, the new code_helper might be an internal function that the target does not support.
References associated_internal_fn(), and code_helper::is_fn_code().
Referenced by check_reduction_path(), and vect_transform_reduction().
bool commutative_binary_op_p | ( | code_helper | code, |
tree | type ) |
Return true if CODE is a binary operation and if CODE is commutative when operating on type TYPE.
References associated_internal_fn(), commutative_binary_fn_p(), commutative_tree_code(), ggc_alloc(), and code_helper::is_tree_code().
Referenced by gimple_resimplify2(), vect_transform_reduction(), and vectorizable_reduction().
bool commutative_ternary_op_p | ( | code_helper | code, |
tree | type ) |
Return true if CODE represents a ternary operation and if the first two operands are commutative when CODE is operating on TYPE.
References associated_internal_fn(), commutative_ternary_fn_p(), commutative_ternary_tree_code(), ggc_alloc(), and code_helper::is_tree_code().
int first_commutative_argument | ( | code_helper | code, |
tree | type ) |
If CODE is commutative in two consecutive operands, return the index of the first, otherwise return -1.
References associated_internal_fn(), commutative_ternary_tree_code(), commutative_tree_code(), first_commutative_argument(), ggc_alloc(), and code_helper::is_tree_code().
Referenced by first_commutative_argument(), fold_stmt_1(), gimple_resimplify3(), gimple_resimplify4(), gimple_resimplify5(), gimple_resimplify6(), gimple_resimplify7(), and vect_get_and_check_slp_defs().
internal_fn get_conditional_internal_fn | ( | code_helper | code, |
tree | type ) |
A wrapper around the internal-fn.cc versions of get_conditional_internal_fn for a code_helper CODE operating on type TYPE.
References associated_internal_fn(), get_conditional_internal_fn(), ggc_alloc(), and code_helper::is_tree_code().
Referenced by convert_conditional_op(), convert_scalar_cond_reduction(), get_conditional_internal_fn(), ifcvt_can_predicate(), predicate_rhs_code(), vect_transform_reduction(), vectorizable_call(), vectorizable_operation(), and vectorizable_reduction().
bool gimple_extract_op | ( | gimple * | stmt, |
gimple_match_op * | res_op ) |
Try to describe STMT in RES_OP, returning true on success. For GIMPLE_CONDs, describe the condition that is being tested. For GIMPLE_ASSIGNs, describe the rhs of the assignment. For GIMPLE_CALLs, describe the call.
References ggc_alloc(), and gimple_extract().
Referenced by check_reduction_path(), vect_is_simple_reduction(), vect_mark_pattern_stmts(), vect_model_reduction_cost(), vect_transform_reduction(), and vectorizable_reduction().
|
inline |
Return whether OP is a non-expression result and a gimple value.
References gimple_match_op::code, ggc_alloc(), is_gimple_val(), code_helper::is_tree_code(), gimple_match_op::ops, and TREE_CODE_LENGTH.
Referenced by fold_build_cond_expr(), gimple_fold_stmt_to_constant_1(), maybe_fold_comparisons_from_match_pd(), maybe_push_res_to_seq(), maybe_resimplify_conditional_op(), and vn_nary_build_or_lookup_1().
bool gimple_simplify | ( | gimple * | stmt, |
gimple_match_op * | res_op, | ||
gimple_seq * | seq, | ||
tree(*)(tree) | valueize, | ||
tree(*)(tree) | top_valueize ) |
The main STMT based simplification entry. It is used by the fold_stmt and the fold_stmt_to_constant APIs.
References build2(), do_valueize(), ggc_alloc(), gimple_extract(), gimple_resimplify2(), tcc_comparison, TREE_CODE, TREE_CODE_CLASS, TREE_OPERAND, TREE_TYPE, try_conditional_simplification(), and valueize_op().
void maybe_build_generic_op | ( | gimple_match_op * | res_op | ) |
If in GIMPLE the operation described by RES_OP should be single-rhs, build a GENERIC tree for that expression and update RES_OP accordingly.
References build1(), build3(), ggc_alloc(), and REF_REVERSE_STORAGE_ORDER.
Referenced by maybe_push_res_to_seq(), and replace_stmt_with_simplification().
tree maybe_push_res_to_seq | ( | gimple_match_op * | res_op, |
gimple_seq * | seq, | ||
tree | res ) |
Push the exploded expression described by RES_OP as a statement to SEQ if necessary and return a gimple value denoting the value of the expression. If RES is not NULL then the result will be always RES and even gimple values are pushed to SEQ.
References as_builtin_fn(), as_internal_fn(), build_call_internal(), builtin_decl_implicit(), cfun, COMPARISON_CLASS_P, create_tmp_reg(), ECF_CONST, flags_from_decl_or_type(), gcc_assert, ggc_alloc(), gimple_build_assign(), gimple_build_call(), gimple_call_set_lhs(), gimple_in_ssa_p(), gimple_seq_add_stmt_without_update(), gimple_simplified_result_is_gimple_val(), i, internal_fn_p(), make_ssa_name(), maybe_build_generic_op(), mprts_hook, NULL, NULL_TREE, SSA_NAME_OCCURS_IN_ABNORMAL_PHI, TREE_CODE, and TREE_OPERAND.
Referenced by gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify_phiopt(), replace_stmt_with_simplification(), tree_vec_extract(), and vn_nary_build_or_lookup_1().
|
extern |
Helpers for the autogenerated gimple-match.cc file. Copyright (C) 2023-2024 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/>.
Referenced by gimple_fold_stmt_to_constant_1(), maybe_push_res_to_seq(), try_to_simplify(), vn_lookup_simplify_result(), and vn_nary_build_or_lookup_1().