|
GCC Middle and Back End API Reference
|
#include "config.h"#include "system.h"#include "coretypes.h"#include "backend.h"#include "target.h"#include "rtl.h"#include "tree.h"#include "gimple.h"#include "ssa.h"#include "cgraph.h"#include "vec-perm-indices.h"#include "fold-const.h"#include "fold-const-call.h"#include "stor-layout.h"#include "gimple-iterator.h"#include "gimple-fold.h"#include "calls.h"#include "tree-dfa.h"#include "builtins.h"#include "gimple-match.h"#include "tree-pass.h"#include "internal-fn.h"#include "case-cfn-macros.h"#include "gimplify.h"#include "optabs-tree.h"#include "tree-eh.h"#include "dbgcnt.h"#include "tm.h"#include "gimple-range.h"#include "langhooks.h"
Variables | |
| tree(*) | mprts_hook (gimple_match_op *) |
Returns true if the array ARGS (size NUM_ARGS) are all ssa names.
References all_ssa_names_p(), i, and TREE_CODE.
Referenced by all_ssa_names_p(), and factor_operation_ok().
| 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_binary_op_p(), and associative_tree_code().
Referenced by associative_binary_op_p(), and vectorizable_reduction().
|
static |
Try to build RES_OP, which is known to be a call to FN. Return null if the target doesn't support the function.
References BITINT_TYPE_P, build_call_internal(), cfun, direct_internal_fn_p(), direct_internal_fn_supported_p(), direct_internal_fn_types(), gimple_build_call_internal(), MAX_FIXED_MODE_SIZE, NULL, gimple_match_op::num_ops, gimple_match_op::op_or_null(), gimple_match_op::ops, OPTIMIZE_FOR_BOTH, PROP_gimple_lbitint, TREE_TYPE, gimple_match_op::type, and TYPE_PRECISION.
Referenced by build_call_internal(), and maybe_push_res_to_seq().
| 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 canonicalize_code().
Referenced by canonicalize_code(), 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_binary_op_p(), and commutative_tree_code().
Referenced by commutative_binary_op_p(), gimple_resimplify2(), 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_op_p(), and commutative_ternary_tree_code().
Referenced by commutative_ternary_op_p().
Return whether T is a constant that we'll dispatch to fold to evaluate fully constant expressions.
References CONSTANT_CLASS_P, constant_for_folding(), TREE_CODE, and TREE_OPERAND.
Referenced by constant_for_folding(), gimple_resimplify1(), gimple_resimplify2(), gimple_resimplify3(), gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify(), and gimple_simplify().
|
static |
Try to convert conditional operation ORIG_OP into an IFN_COND_* operation. Return true on success, storing the new operation in NEW_OP.
References as_combined_fn(), as_internal_fn(), gimple_match_cond::bias, gimple_match_op::code, gimple_match_cond::cond, gimple_match_op::cond, convert_conditional_op(), gimple_match_cond::else_value, get_conditional_internal_fn(), get_len_internal_fn(), i, internal_fn_p(), code_helper::is_tree_code(), gimple_match_cond::len, gimple_match_op::num_ops, gimple_match_op::ops, gimple_match_op::set_op(), targetm, TREE_TYPE, gimple_match_op::type, and types_compatible_p().
Referenced by convert_conditional_op(), and maybe_resimplify_conditional_op().
| bool directly_supported_p | ( | code_helper | code, |
| tree | otype, | ||
| tree | itype, | ||
| optab_subtype | query_type ) |
As above, overloading the function for conversion-type optabs.
References associated_internal_fn(), convert_optab_handler(), direct_internal_fn_p(), direct_internal_fn_supported_p(), directly_supported_p(), gcc_assert, optab_default, optab_for_tree_code(), optab_scalar, optab_vector, OPTIMIZE_FOR_SPEED, TYPE_MODE, unknown_optab, and VECTOR_TYPE_P.
| bool directly_supported_p | ( | code_helper | code, |
| tree | type, | ||
| optab_subtype | query_type ) |
Return true if the target directly supports operation CODE on type TYPE. QUERY_TYPE acts as for optab_for_tree_code.
References associated_internal_fn(), direct_internal_fn_p(), direct_internal_fn_supported_p(), directly_supported_p(), gcc_assert, optab_default, optab_for_tree_code(), optab_handler(), optab_scalar, optab_vector, OPTIMIZE_FOR_SPEED, TYPE_MODE, unknown_optab, and VECTOR_TYPE_P.
Referenced by directly_supported_p(), directly_supported_p(), vect_build_slp_tree_3(), vect_create_epilog_for_reduction(), vect_find_reusable_accumulator(), vect_is_emulated_mixed_dot_prod(), vect_model_reduction_cost(), vect_supportable_conv_optab_p(), vectorizable_nonlinear_induction(), and vectorizable_reduction().
Helper for the autogenerated code, valueize OP.
References do_valueize(), and TREE_CODE.
Helper for gimple_simplify valueizing OP using VALUEIZE and setting VALUEIZED to true if valueization changed OP.
Preamble and helpers for the autogenerated gimple-match.cc file. Copyright (C) 2014-2026 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/>.
References do_valueize(), and TREE_CODE.
Referenced by do_valueize(), do_valueize(), do_valueize(), gimple_bitwise_inverted_equal_p(), gimple_simplify(), gimple_simplify(), and object_sizes_execute().
| bool factor_operation_ok | ( | code_helper | code, |
| int | opnum, | ||
| tree * | args, | ||
| location_t * | locs, | ||
| size_t | num_args, | ||
| bool | divconstok, | ||
| bool | ptrplusconstok ) |
Some factoring of operations including some builtins need to be stop from happening in some cases. factor_operation_ok returns true when the factoring is ok for CODE where OPNUM is operand was and the ARGS are the operands of the original operation. DIVCONSTOK says if an integer division with a constant is ok to be factored out. PTRPLUSCONSTOK says if a POINTER_PLUS_EXPR can be factored out. When opnum < 0, args is allowed to be null.
References all_ssa_names_p(), factor_operation_ok(), fn_arg_must_be_const_p(), i, int_divide_or_mod_p(), TREE_TYPE, true, and types_compatible_p().
Referenced by factor_operation_ok(), factor_out_conditional_operation(), factor_out_operators(), and merge_stmts_p().
| int find_different_opnum | ( | const gimple_match_op & | arg0_op, |
| const gimple_match_op & | arg1_op, | ||
| tree * | new_arg0, | ||
| tree * | new_arg1 ) |
Find the operand which is different between ARG0_OP and ARG1_OP. Returns the operand num where the difference is. Set NEWARG0 and NEWARG1 from the different argument. Returns -1 if none is found. If ARG0_OP/ARG1_OP is commutative also try swapping the two commutative operands and return the operand number where the difference happens in ARG0_OP.
Handle commutative operations.
References gimple_match_op::code, find_different_opnum(), first_commutative_argument(), gcc_assert, i, gimple_match_op::num_ops, operand_equal_for_phi_arg_p(), gimple_match_op::ops, and gimple_match_op::type.
Referenced by factor_out_conditional_operation(), factor_out_operators(), and find_different_opnum().
| 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(), and first_commutative_argument().
Referenced by find_different_opnum(), first_commutative_argument(), first_commutative_argument(), fold_stmt_1(), gimple_resimplify3(), gimple_resimplify4(), gimple_resimplify5(), gimple_resimplify6(), gimple_resimplify7(), vect_build_slp_tree_2(), vect_build_slp_tree_3(), and vect_get_and_check_slp_defs().
|
static |
Returns true if CFN requires a constant at ARGNO argument.
References as_builtin_fn(), as_internal_fn(), fn_arg_must_be_const_p(), gcc_checking_assert, and internal_fn_p().
Referenced by factor_operation_ok(), and fn_arg_must_be_const_p().
| 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(), and get_conditional_internal_fn().
Referenced by convert_conditional_op(), convert_scalar_cond_reduction(), get_conditional_internal_fn(), get_conditional_internal_fn(), get_conditional_internal_fn(), ifcvt_can_predicate(), predicate_rhs_code(), vect_reduction_update_partial_vector_usage(), vect_transform_reduction(), vectorizable_call(), and vectorizable_operation().
|
inline |
Common subroutine of gimple_extract_op and gimple_simplify. Try to describe STMT in RES_OP, returning true on success. Before recording an operand, call: - VALUEIZE_OP for all top-level operand This routine takes a tree argument and returns a tree.
References as_combined_fn(), boolean_type_node, BUILT_IN_NORMAL, DECL_BUILT_IN_CLASS, DECL_FUNCTION_CODE(), gcc_unreachable, gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs3(), gimple_assign_rhs_class(), gimple_assign_rhs_code(), GIMPLE_BINARY_RHS, gimple_builtin_call_types_compatible_p(), gimple_call_arg(), gimple_call_fn(), gimple_call_internal_fn(), gimple_call_internal_p(), gimple_call_lhs(), gimple_call_num_args(), gimple_cond_code(), gimple_cond_lhs(), gimple_cond_rhs(), gimple_extract(), GIMPLE_SINGLE_RHS, GIMPLE_TERNARY_RHS, GIMPLE_UNARY_RHS, i, is_gimple_min_invariant(), NULL_TREE, gimple_match_op::ops, REF_REVERSE_STORAGE_ORDER, gimple_match_op::set_op(), TREE_CODE, TREE_OPERAND, and TREE_TYPE.
Referenced by gimple_extract(), gimple_extract_op(), and gimple_simplify().
| 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 gimple_extract(), and gimple_extract_op().
Referenced by check_reduction_path(), factor_out_conditional_operation(), factor_out_operators(), gimple_extract_op(), vect_analyze_slp_reduc_chain(), vect_is_simple_reduction(), vect_mark_pattern_stmts(), vect_model_reduction_cost(), vect_transform_reduction(), and vectorizable_reduction().
|
static |
Forward declarations of the private auto-generated matchers. They expect valueized operands in canonical order and do not perform simplification of all-constant operands.
Helper that matches and simplifies the toplevel result from a gimple_simplify run (where we don't want to build a stmt in case it's used in in-place folding). Replaces RES_OP with a simplified and/or canonicalized result and returns whether any change was made.
References gimple_match_op::code, const_unop(), CONSTANT_CLASS_P, constant_for_folding(), drop_tree_overflow(), dump_file, dump_flags, fold_const_call(), gimple_resimplify1(), gimple_simplify(), IS_EXPR_CODE_CLASS, code_helper::is_tree_code(), maybe_resimplify_conditional_op(), NULL_TREE, gimple_match_op::ops, gimple_match_op::set_value(), TDF_FOLDING, TREE_CODE_CLASS, TREE_CODE_LENGTH, TREE_OVERFLOW_P, and gimple_match_op::type.
Referenced by gimple_resimplify1(), gimple_simplify(), gimple_match_op::resimplify(), and try_conditional_simplification().
|
static |
Helper that matches and simplifies the toplevel result from a gimple_simplify run (where we don't want to build a stmt in case it's used in in-place folding). Replaces RES_OP with a simplified and/or canonicalized result and returns whether any change was made.
References gimple_match_op::code, commutative_binary_op_p(), const_binop(), CONSTANT_CLASS_P, constant_for_folding(), drop_tree_overflow(), dump_file, dump_flags, fold_const_call(), gimple_resimplify2(), gimple_simplify(), IS_EXPR_CODE_CLASS, code_helper::is_tree_code(), maybe_resimplify_conditional_op(), NULL_TREE, gimple_match_op::ops, gimple_match_op::set_value(), swap_tree_comparison(), tcc_comparison, TDF_FOLDING, TREE_CODE_CLASS, TREE_CODE_LENGTH, TREE_OVERFLOW_P, tree_swap_operands_p(), and gimple_match_op::type.
Referenced by gimple_resimplify2(), gimple_simplify(), gimple_match_op::resimplify(), and try_conditional_simplification().
|
static |
Helper that matches and simplifies the toplevel result from a gimple_simplify run (where we don't want to build a stmt in case it's used in in-place folding). Replaces RES_OP with a simplified and/or canonicalized result and returns whether any change was made.
References gimple_match_op::code, CONSTANT_CLASS_P, constant_for_folding(), drop_tree_overflow(), dump_file, dump_flags, first_commutative_argument(), fold_const_call(), fold_ternary, gimple_resimplify3(), gimple_simplify(), IS_EXPR_CODE_CLASS, code_helper::is_tree_code(), maybe_resimplify_conditional_op(), NULL_TREE, gimple_match_op::ops, gimple_match_op::set_value(), TDF_FOLDING, TREE_CODE_CLASS, TREE_CODE_LENGTH, TREE_OVERFLOW_P, tree_swap_operands_p(), and gimple_match_op::type.
Referenced by gimple_resimplify3(), gimple_simplify(), maybe_resimplify_conditional_op(), gimple_match_op::resimplify(), and try_conditional_simplification().
|
static |
Helper that matches and simplifies the toplevel result from a gimple_simplify run (where we don't want to build a stmt in case it's used in in-place folding). Replaces RES_OP with a simplified and/or canonicalized result and returns whether any change was made.
References gimple_match_op::code, dump_file, dump_flags, first_commutative_argument(), gimple_resimplify4(), gimple_simplify(), maybe_resimplify_conditional_op(), gimple_match_op::ops, TDF_FOLDING, tree_swap_operands_p(), and gimple_match_op::type.
Referenced by gimple_resimplify4(), gimple_simplify(), and gimple_match_op::resimplify().
|
static |
Helper that matches and simplifies the toplevel result from a gimple_simplify run (where we don't want to build a stmt in case it's used in in-place folding). Replaces RES_OP with a simplified and/or canonicalized result and returns whether any change was made.
References gimple_match_op::code, first_commutative_argument(), gimple_resimplify5(), gimple_simplify(), maybe_resimplify_conditional_op(), gimple_match_op::ops, tree_swap_operands_p(), and gimple_match_op::type.
Referenced by gimple_resimplify5(), gimple_simplify(), and gimple_match_op::resimplify().
|
static |
Helper that matches and simplifies the toplevel result from a gimple_simplify run (where we don't want to build a stmt in case it's used in in-place folding). Replaces RES_OP with a simplified and/or canonicalized result and returns whether any change was made.
References gimple_match_op::code, first_commutative_argument(), gimple_resimplify6(), gimple_simplify(), maybe_resimplify_conditional_op(), gimple_match_op::ops, tree_swap_operands_p(), and gimple_match_op::type.
Referenced by gimple_resimplify6(), gimple_simplify(), and gimple_match_op::resimplify().
|
static |
Helper that matches and simplifies the toplevel result from a gimple_simplify run (where we don't want to build a stmt in case it's used in in-place folding). Replaces RES_OP with a simplified and/or canonicalized result and returns whether any change was made.
References gimple_match_op::code, first_commutative_argument(), gimple_resimplify7(), gimple_simplify(), maybe_resimplify_conditional_op(), gimple_match_op::ops, tree_swap_operands_p(), and gimple_match_op::type.
Referenced by gimple_resimplify7(), gimple_simplify(), and gimple_match_op::resimplify().
| tree gimple_simplify | ( | combined_fn | fn, |
| tree | type, | ||
| tree | arg0, | ||
| gimple_seq * | seq, | ||
| tree(* | valueize )(tree) ) |
Builtin or internal function with one argument.
References CONSTANT_CLASS_P, constant_for_folding(), fold_const_call(), gimple_simplify(), maybe_push_res_to_seq(), and NULL_TREE.
| tree gimple_simplify | ( | combined_fn | fn, |
| tree | type, | ||
| tree | arg0, | ||
| tree | arg1, | ||
| gimple_seq * | seq, | ||
| tree(* | valueize )(tree) ) |
Builtin or internal function with two arguments.
References CONSTANT_CLASS_P, constant_for_folding(), fold_const_call(), gimple_simplify(), maybe_push_res_to_seq(), and NULL_TREE.
| tree gimple_simplify | ( | combined_fn | fn, |
| tree | type, | ||
| tree | arg0, | ||
| tree | arg1, | ||
| tree | arg2, | ||
| gimple_seq * | seq, | ||
| tree(* | valueize )(tree) ) |
Builtin or internal function with three arguments.
References CONSTANT_CLASS_P, constant_for_folding(), fold_const_call(), gimple_simplify(), maybe_push_res_to_seq(), and NULL_TREE.
| tree gimple_simplify | ( | enum tree_code | code, |
| tree | type, | ||
| tree | op0, | ||
| gimple_seq * | seq, | ||
| tree(* | valueize )(tree) ) |
Functions that are needed by gimple-match but that are exported and used in other places in the compiler.
Public API overloads follow for operation being tree_code or built_in_function and for one to three operands or arguments. They return NULL_TREE if nothing could be simplified or the resulting simplified value with parts pushed to SEQ. If SEQ is NULL then if the simplification needs to create new stmts it will fail. If VALUEIZE is non-NULL then all SSA names will be valueized using that hook prior to applying simplifications.
Unary ops.
In gimple-match.cc.
Public API overloads follow for operation being tree_code or built_in_function and for one to three operands or arguments. They return NULL_TREE if nothing could be simplified or the resulting simplified value with parts pushed to SEQ. If SEQ is NULL then if the simplification needs to create new stmts it will fail. If VALUEIZE is non-NULL then all SSA names will be valueized using that hook prior to applying simplifications.
Unary ops.
References const_unop(), CONSTANT_CLASS_P, constant_for_folding(), gimple_simplify(), maybe_push_res_to_seq(), and NULL_TREE.
Referenced by cleanup_control_expr_graph(), fold_stmt_1(), gimple_build(), gimple_build(), gimple_build(), gimple_build(), gimple_build(), gimple_build(), gimple_fold_stmt_to_constant_1(), gimple_resimplify1(), gimple_resimplify2(), gimple_resimplify3(), gimple_resimplify4(), gimple_resimplify5(), gimple_resimplify6(), gimple_resimplify7(), gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify(), and process_bb().
| tree gimple_simplify | ( | enum tree_code | code, |
| tree | type, | ||
| tree | op0, | ||
| tree | op1, | ||
| tree | op2, | ||
| gimple_seq * | seq, | ||
| tree(* | valueize )(tree) ) |
Ternary ops.
References commutative_ternary_tree_code(), CONSTANT_CLASS_P, constant_for_folding(), fold_ternary, gimple_simplify(), maybe_push_res_to_seq(), NULL_TREE, and tree_swap_operands_p().
| bool gimple_simplify | ( | gimple * | stmt, |
| gimple_match_op * | res_op, | ||
| gimple_seq * | seq, | ||
| tree(* | valueize )(tree), | ||
| tree(* | top_valueize )(tree) ) |
The main STMT based simplification entry. It is used by the fold_stmt and the fold_stmt_to_constant APIs.
References gimple_match_op::code, do_valueize(), gimple_extract(), gimple_simplify(), code_helper::is_internal_fn(), gimple_match_op::num_ops, gimple_match_op::resimplify(), gimple_match_op::reverse, and try_conditional_simplification().
|
extern |
References gimple_simplify().
|
extern |
References gimple_simplify().
|
extern |
References gimple_simplify().
|
extern |
References gimple_simplify().
|
extern |
References gimple_simplify().
|
extern |
References gimple_simplify().
|
extern |
| 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(), gimple_match_op::code, maybe_build_generic_op(), gimple_match_op::ops, REF_REVERSE_STORAGE_ORDER, gimple_match_op::reverse, gimple_match_op::set_value(), and gimple_match_op::type.
Referenced by maybe_build_generic_op(), 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, gimple_match_op::code, gimple_match_cond::cond, gimple_match_op::cond, create_tmp_reg(), ECF_CONST, flags_from_decl_or_type(), gcc_assert, 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_flags(), internal_fn_p(), code_helper::is_tree_code(), make_ssa_name(), maybe_build_generic_op(), maybe_push_res_to_seq(), mprts_hook, NULL, NULL_TREE, gimple_match_op::num_ops, gimple_match_op::op_or_null(), gimple_match_op::ops, SSA_NAME_OCCURS_IN_ABNORMAL_PHI, TREE_CODE, and gimple_match_op::type.
Referenced by factor_out_conditional_operation(), factor_out_operators(), gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify(), gimple_simplify_phiopt(), maybe_push_res_to_seq(), replace_stmt_with_simplification(), tree_vec_extract(), and vn_nary_build_or_lookup_1().
|
static |
RES_OP is the result of a simplification. If it is conditional, try to replace it with the equivalent UNCOND form, such as an IFN_COND_* call or a VEC_COND_EXPR. Also try to resimplify the result of the replacement if appropriate, adding any new statements to SEQ and using VALUEIZE as the valueization function. Return true if this resimplification occurred and resulted in at least one change.
References gimple_match_cond::bias, gimple_match_op::code, gimple_match_cond::cond, gimple_match_op::cond, convert_conditional_op(), gimple_match_cond::else_value, FLOAT_TYPE_P, generic_expr_could_trap_p(), gimple_resimplify3(), gimple_simplified_result_is_gimple_val(), INTEGRAL_TYPE_P, code_helper::is_tree_code(), gimple_match_cond::len, maybe_resimplify_conditional_op(), NULL_TREE, gimple_match_op::op_or_null(), operation_could_trap_p(), gimple_match_op::ops, gimple_match_op::set_op(), gimple_match_op::type, TYPE_OVERFLOW_TRAPS, and VECTOR_TYPE_P.
Referenced by gimple_resimplify1(), gimple_resimplify2(), gimple_resimplify3(), gimple_resimplify4(), gimple_resimplify5(), gimple_resimplify6(), gimple_resimplify7(), maybe_resimplify_conditional_op(), and try_conditional_simplification().
|
static |
If RES_OP is a call to a conditional internal function, try simplifying the associated unconditional operation and using the result to build a new conditional operation. For example, if RES_OP is: IFN_COND_ADD (COND, A, B, ELSE) try simplifying (plus A B) and using the result to build a replacement for the whole IFN_COND_ADD. Return true if this approach led to a simplification, otherwise leave RES_OP unchanged (and so suitable for other simplifications). When returning true, add any new statements to SEQ and use VALUEIZE as the valueization function. RES_OP is known to be a call to IFN.
References as_combined_fn(), conditional_internal_fn_code(), gcc_unreachable, get_unconditional_internal_fn(), gimple_resimplify1(), gimple_resimplify2(), gimple_resimplify3(), internal_fn_len_index(), maybe_resimplify_conditional_op(), NULL_TREE, gimple_match_op::num_ops, gimple_match_op::ops, try_conditional_simplification(), and gimple_match_op::type.
Referenced by gimple_simplify(), and try_conditional_simplification().
| tree(*) mprts_hook(gimple_match_op *) | ( | gimple_match_op * | ) |
Helpers for the autogenerated gimple-match.cc file. Copyright (C) 2023-2026 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().