|
tree | create_tmp_reg_or_ssa_name (tree, gimple *stmt=NULL) |
|
tree | canonicalize_constructor_val (tree, tree) |
|
tree | get_symbol_constant_value (tree) |
|
bool | get_range_strlen (tree, c_strlen_data *, unsigned eltsize) |
|
void | gimplify_and_update_call_from_tree (gimple_stmt_iterator *, tree) |
|
bool | update_gimple_call (gimple_stmt_iterator *, tree, int,...) |
|
bool | fold_stmt (gimple_stmt_iterator *) |
|
bool | fold_stmt (gimple_stmt_iterator *, tree(*)(tree)) |
|
bool | fold_stmt_inplace (gimple_stmt_iterator *) |
|
tree | maybe_fold_and_comparisons (tree, enum tree_code, tree, tree, enum tree_code, tree, tree, basic_block=nullptr) |
|
tree | maybe_fold_or_comparisons (tree, enum tree_code, tree, tree, enum tree_code, tree, tree, basic_block=nullptr) |
|
bool | optimize_atomic_compare_exchange_p (gimple *) |
|
void | fold_builtin_atomic_compare_exchange (gimple_stmt_iterator *) |
|
tree | no_follow_ssa_edges (tree) |
|
tree | follow_single_use_edges (tree) |
|
tree | follow_all_ssa_edges (tree) |
|
tree | gimple_fold_stmt_to_constant_1 (gimple *, tree(*)(tree), tree(*)(tree)=no_follow_ssa_edges) |
|
tree | gimple_fold_stmt_to_constant (gimple *, tree(*)(tree)) |
|
tree | fold_ctor_reference (tree, tree, const poly_uint64 &, const poly_uint64 &, tree, unsigned HOST_WIDE_INT *=NULL) |
|
tree | fold_const_aggregate_ref_1 (tree, tree(*)(tree)) |
|
tree | fold_const_aggregate_ref (tree) |
|
tree | gimple_get_virt_method_for_binfo (HOST_WIDE_INT, tree, bool *can_refer=NULL) |
|
tree | gimple_get_virt_method_for_vtable (HOST_WIDE_INT, tree, unsigned HOST_WIDE_INT, bool *can_refer=NULL) |
|
tree | gimple_fold_indirect_ref (tree) |
|
bool | gimple_fold_builtin_sprintf (gimple_stmt_iterator *) |
|
bool | gimple_fold_builtin_snprintf (gimple_stmt_iterator *) |
|
bool | arith_code_with_undefined_signed_overflow (tree_code) |
|
void | rewrite_to_defined_overflow (gimple_stmt_iterator *) |
|
gimple_seq | rewrite_to_defined_overflow (gimple *) |
|
void | replace_call_with_value (gimple_stmt_iterator *, tree) |
|
tree | tree_vec_extract (gimple_stmt_iterator *, tree, tree, tree, tree) |
|
void | gsi_replace_with_seq_vops (gimple_stmt_iterator *, gimple_seq) |
|
tree | gimple_build (gimple_stmt_iterator *, bool, enum gsi_iterator_update, location_t, enum tree_code, tree, tree) |
|
tree | gimple_build (gimple_stmt_iterator *, bool, enum gsi_iterator_update, location_t, enum tree_code, tree, tree, tree) |
|
tree | gimple_build (gimple_stmt_iterator *, bool, enum gsi_iterator_update, location_t, enum tree_code, tree, tree, tree, tree) |
|
template<class ... Args> |
tree | gimple_build (gimple_seq *seq, location_t loc, enum tree_code code, tree type, Args ...ops) |
|
template<class ... Args> |
tree | gimple_build (gimple_seq *seq, enum tree_code code, tree type, Args ...ops) |
|
tree | gimple_build (gimple_stmt_iterator *, bool, enum gsi_iterator_update, location_t, combined_fn, tree) |
|
tree | gimple_build (gimple_stmt_iterator *, bool, enum gsi_iterator_update, location_t, combined_fn, tree, tree) |
|
tree | gimple_build (gimple_stmt_iterator *, bool, enum gsi_iterator_update, location_t, combined_fn, tree, tree, tree) |
|
tree | gimple_build (gimple_stmt_iterator *, bool, enum gsi_iterator_update, location_t, combined_fn, tree, tree, tree, tree) |
|
template<class ... Args> |
tree | gimple_build (gimple_seq *seq, location_t loc, combined_fn fn, tree type, Args ...args) |
|
template<class ... Args> |
tree | gimple_build (gimple_seq *seq, combined_fn fn, tree type, Args ...args) |
|
tree | gimple_build (gimple_stmt_iterator *, bool, enum gsi_iterator_update, location_t, code_helper, tree, tree) |
|
tree | gimple_build (gimple_stmt_iterator *, bool, enum gsi_iterator_update, location_t, code_helper, tree, tree, tree) |
|
tree | gimple_build (gimple_stmt_iterator *, bool, enum gsi_iterator_update, location_t, code_helper, tree, tree, tree, tree) |
|
template<class ... Args> |
tree | gimple_build (gimple_seq *seq, location_t loc, code_helper code, tree type, Args ...ops) |
|
template<class ... Args> |
tree | gimple_build (gimple_seq *seq, code_helper code, tree type, Args ...ops) |
|
tree | gimple_convert (gimple_stmt_iterator *, bool, enum gsi_iterator_update, location_t, tree, tree) |
|
tree | gimple_convert (gimple_seq *seq, location_t loc, tree type, tree op) |
|
tree | gimple_convert (gimple_seq *seq, tree type, tree op) |
|
tree | gimple_convert_to_ptrofftype (gimple_stmt_iterator *, bool, enum gsi_iterator_update, location_t, tree) |
|
tree | gimple_convert_to_ptrofftype (gimple_seq *seq, location_t loc, tree op) |
|
tree | gimple_convert_to_ptrofftype (gimple_seq *seq, tree op) |
|
tree | gimple_build_vector_from_val (gimple_stmt_iterator *, bool, enum gsi_iterator_update, location_t, tree, tree) |
|
tree | gimple_build_vector_from_val (gimple_seq *seq, location_t loc, tree type, tree op) |
|
tree | gimple_build_vector_from_val (gimple_seq *seq, tree type, tree op) |
|
tree | gimple_build_vector (gimple_stmt_iterator *, bool, enum gsi_iterator_update, location_t, tree_vector_builder *) |
|
tree | gimple_build_vector (gimple_seq *seq, location_t loc, tree_vector_builder *builder) |
|
tree | gimple_build_vector (gimple_seq *seq, tree_vector_builder *builder) |
|
tree | gimple_build_round_up (gimple_stmt_iterator *, bool, enum gsi_iterator_update, location_t, tree, tree, unsigned HOST_WIDE_INT) |
|
tree | gimple_build_round_up (gimple_seq *seq, location_t loc, tree type, tree old_size, unsigned HOST_WIDE_INT align) |
|
tree | gimple_build_round_up (gimple_seq *seq, tree type, tree old_size, unsigned HOST_WIDE_INT align) |
|
bool | gimple_stmt_nonnegative_warnv_p (gimple *, bool *, int=0) |
|
bool | gimple_stmt_integer_valued_real_p (gimple *, int=0) |
|
tree | gimple_simplify (enum tree_code, tree, tree, gimple_seq *, tree(*)(tree)) |
|
tree | gimple_simplify (enum tree_code, tree, tree, tree, gimple_seq *, tree(*)(tree)) |
|
tree | gimple_simplify (enum tree_code, tree, tree, tree, tree, gimple_seq *, tree(*)(tree)) |
|
tree | gimple_simplify (combined_fn, tree, tree, gimple_seq *, tree(*)(tree)) |
|
tree | gimple_simplify (combined_fn, tree, tree, tree, gimple_seq *, tree(*)(tree)) |
|
tree | gimple_simplify (combined_fn, tree, tree, tree, tree, gimple_seq *, tree(*)(tree)) |
|
Gimple folding definitions.
Copyright (C) 2011-2024 Free Software Foundation, Inc.
Contributed by Richard Guenther <rguenther@suse.de>
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/>.
Create a temporary for TYPE for a statement STMT. If the current function
is in SSA form, a SSA name is created. Otherwise a temporary register
is made.
References cfun, create_tmp_reg(), gimple_in_ssa_p(), and make_ssa_name().
Referenced by copy_bb(), gimple_build(), gimple_build(), gimple_build(), gimple_build(), gimple_build(), gimple_build(), gimple_build(), gimple_fold_builtin_memory_op(), gimple_fold_builtin_strcat(), gimple_fold_builtin_strchr(), gimple_fold_builtin_string_compare(), and gimple_load_first_char().
Fold
r = __atomic_compare_exchange_N (p, &e, d, w, s, f);
into
_Complex uintN_t t = ATOMIC_COMPARE_EXCHANGE (p, e, d, w * 256 + N, s, f);
i = IMAGPART_EXPR <t>;
r = (_Bool) i;
e = REALPART_EXPR <t>;
References build1(), build_complex_type(), build_int_cst(), cfun, find_fallthru_edge(), g, ggc_alloc(), gimple_assign_lhs(), gimple_build_assign(), gimple_build_call_internal(), gimple_call_arg(), gimple_call_fndecl(), gimple_call_lhs(), gimple_call_nothrow_p(), gimple_call_set_lhs(), gimple_call_set_nothrow(), gimple_move_vops(), gsi_bb(), gsi_for_stmt(), gsi_insert_after(), gsi_insert_before(), gsi_insert_on_edge_immediate(), GSI_NEW_STMT, gsi_replace(), GSI_SAME_STMT, gsi_stmt(), int_size_in_bytes(), integer_onep(), integer_type_node, make_ssa_name(), NULL, NULL_TREE, stmt_can_throw_internal(), basic_block_def::succs, TREE_CHAIN, TREE_OPERAND, TREE_TYPE, TREE_VALUE, TYPE_ARG_TYPES, and useless_type_conversion_p().
Referenced by execute_update_addresses_taken().
Return the tree representing the element referenced by T if T is an
ARRAY_REF or COMPONENT_REF into constant aggregates valuezing SSA
names using VALUEIZE. Return NULL_TREE otherwise.
References array_ref_element_size(), array_ref_low_bound(), build_zero_cst(), DECL_BIT_FIELD, DECL_BIT_FIELD_REPRESENTATIVE, DECL_FIELD_BIT_OFFSET, DECL_FIELD_OFFSET, DECL_P, DECL_SIZE, error_mark_node, EXPR_LOCATION, fold_build1_loc(), fold_const_aggregate_ref_1(), fold_ctor_reference(), fold_read_from_constant_string(), get_base_constructor(), get_ref_base_and_extent(), get_symbol_constant_value(), ggc_alloc(), INTEGRAL_TYPE_P, poly_int< N, C >::is_constant(), wi::lrshift(), NULL_TREE, offset, poly_int_tree_p(), wi::sext(), sizetype, wi::to_poly_offset(), wi::to_wide(), TREE_CODE, tree_fits_uhwi_p(), TREE_OPERAND, TREE_THIS_VOLATILE, tree_to_uhwi(), TREE_TYPE, TYPE_PRECISION, and wide_int_to_tree().
Referenced by fold_const_aggregate_ref(), fold_const_aggregate_ref_1(), and gimple_fold_stmt_to_constant_1().
CTOR is a value initializing memory. Fold a reference of TYPE and
bit size POLY_SIZE to the memory at bit POLY_OFFSET. When POLY_SIZE
is zero, attempt to fold a reference to the entire subobject
which OFFSET refers to. This is used when folding accesses to
string members of aggregates. When non-null, set *SUBOFF to
the bit offset of the accessed subobject.
References AGGREGATE_TYPE_P, can_native_interpret_type_p(), canonicalize_constructor_val(), CONSTANT_CLASS_P, fold_array_ctor_reference(), fold_nonarray_ctor_reference(), fold_unary, ggc_alloc(), INT_MAX, known_eq, native_encode_expr(), native_encode_initializer(), native_interpret_expr(), NULL_TREE, offset, STRIP_USELESS_TYPE_CONVERSION, wi::to_poly_widest(), TREE_CODE, TREE_TYPE, TYPE_REVERSE_STORAGE_ORDER, TYPE_SIZE, unshare_expr(), and useless_type_conversion_p().
Referenced by constant_byte_string(), fold_array_ctor_reference(), fold_const_aggregate_ref_1(), fold_nonarray_ctor_reference(), and fully_constant_vn_reference_p().
Perform the minimal folding on statement *GSI. Only operations like
*&x created by constant propagation are handled. The statement cannot
be replaced with a new one. Return true if the statement was
changed, false otherwise.
The statement *GSI should be in valid gimple form but may
be in unfolded state as resulting from for example constant propagation
which can produce *&x = 0.
References changed, fold_stmt_1(), gcc_assert, gsi_stmt(), and no_follow_ssa_edges().
Referenced by create_expression_by_pieces(), forward_propagate_addr_expr_1(), insert_debug_temp_for_var_def(), optimize_recip_sqrt(), replace_reciprocal(), replace_reciprocal_squares(), and update_ops().
Try to obtain the range of the lengths of the string(s) referenced
by ARG, or the size of the largest array ARG refers to if the range
of lengths cannot be determined, and store all in *PDATA which must
be zero-initialized on input except PDATA->MAXBOUND may be set to
a non-null tree node other than INTEGER_CST to request to have it
set to the length of the longest string in a PHI. ELTSIZE is
the expected size of the string element in bytes: 1 for char and
some power of 2 for wide characters.
Return true if the range [PDATA->MINLEN, PDATA->MAXLEN] is suitable
for optimization. Returning false means that a nonzero PDATA->MINLEN
doesn't reflect the true lower bound of the range when PDATA->MAXLEN
is -1 (in that case, the actual range is indeterminate, i.e.,
[0, PTRDIFF_MAX - 2].
References build_all_ones_cst(), get_range_strlen(), ggc_alloc(), integer_all_onesp(), size_type_node, SRK_LENRANGE, ssize_int, and visited.
Simplify a call to the snprintf builtin with arguments DEST, DESTSIZE,
FMT, and ORIG. ORIG may be null if this is a 3-argument call. We don't
attempt to simplify calls with more than 4 arguments.
Return true if simplification was possible, otherwise false.
References build_int_cstu(), builtin_decl_implicit(), c_getstr(), fold_convert, fold_stmt(), get_maxval_strlen(), ggc_alloc(), gimple_build_assign(), gimple_build_call(), gimple_call_arg(), gimple_call_lhs(), gimple_call_num_args(), gimple_seq_add_stmt_without_update(), gsi_prev(), gsi_replace_with_seq_vops(), gsi_stmt(), init_target_chars(), known_lower(), NULL, NULL_TREE, SRK_STRLEN, target_percent, target_percent_s, TREE_TYPE, and useless_type_conversion_p().
Simplify a call to the sprintf builtin with arguments DEST, FMT, and ORIG.
ORIG may be null if this is a 2-argument call. We don't attempt to
simplify calls with more than 3 arguments.
Return true if simplification was possible, otherwise false.
References build_int_cst(), builtin_decl_implicit(), c_getstr(), copy_warning(), fold_convert, fold_stmt(), get_maxval_strlen(), ggc_alloc(), gimple_build_assign(), gimple_build_call(), gimple_call_arg(), gimple_call_lhs(), gimple_call_num_args(), gimple_seq_add_stmt_without_update(), gsi_prev(), gsi_replace_with_seq_vops(), gsi_stmt(), init_target_chars(), NULL, NULL_TREE, POINTER_TYPE_P, SRK_STRLEN, target_percent, target_percent_s, TREE_TYPE, and useless_type_conversion_p().
Given a pointer value T, return a simplified version of an
indirection through T, or NULL_TREE if no simplification is
possible. Note that the resulting type may be different from
the type pointed to in the sense that it is still compatible
from the langhooks point of view.
References bitsize_int, build1(), build4(), DECL_P, fold_build1, fold_build2, fold_build3, ggc_alloc(), gimple_fold_indirect_ref(), known_lt, NULL_TREE, offset, POINTER_TYPE_P, size_zero_node, STRIP_NOPS, wi::to_wide(), TREE_CODE, tree_fits_uhwi_p(), tree_int_cst_equal(), TREE_OPERAND, tree_to_shwi(), tree_to_uhwi(), TREE_TYPE, TYPE_DOMAIN, TYPE_MIN_VALUE, TYPE_REF_CAN_ALIAS_ALL, TYPE_SIZE, TYPE_SIZE_UNIT, TYPE_VECTOR_SUBPARTS(), useless_type_conversion_p(), and wide_int_to_tree().
Referenced by copy_tree_body_r(), expand_thunk(), gimple_fold_indirect_ref(), gimple_fold_indirect_ref_rhs(), and maybe_make_indirect().
Fold STMT to a constant using VALUEIZE to valueize SSA names.
Either NULL_TREE, a simplified but non-constant or a constant
is returned.
??? This should go into a gimple-fold-inline.h file to be eventually
privatized with the single valueize function used in the various TUs
to avoid the indirect function call overhead.
References build1_loc(), build_invariant_address(), build_zero_cst(), CONSTANT_CLASS_P, CONSTRUCTOR_ELTS, CONSTRUCTOR_NELTS, decl_address_invariant_p(), dump_file, dump_flags, EXPR_LOCATION, fndecl_built_in_p(), fold_binary_loc(), fold_build2, fold_builtin_call_array(), fold_const_aggregate_ref_1(), fold_convert, fold_ternary_loc(), fold_unary_loc(), FOR_EACH_CONSTRUCTOR_VALUE, gcc_unreachable, get_addr_base_and_unit_offset_1(), get_gimple_rhs_class(), get_symbol_constant_value(), ggc_alloc(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs3(), 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_num_args(), gimple_call_return_type(), gimple_location(), gimple_simplified_result_is_gimple_val(), gimple_simplify(), GIMPLE_SINGLE_RHS, GIMPLE_TERNARY_RHS, GIMPLE_UNARY_RHS, i, integer_onep(), integer_zerop(), is_gimple_min_invariant(), known_eq, mprts_hook, NULL, NULL_TREE, OBJ_TYPE_REF_EXPR, offset, operand_equal_p(), print_generic_expr(), print_gimple_expr(), ptr_type_node, STRIP_NOPS, tcc_declaration, tcc_reference, TDF_DETAILS, TDF_SLIM, TREE_CODE, TREE_CODE_CLASS, TREE_OPERAND, TREE_OVERFLOW, TREE_TYPE, TYPE_VECTOR_SUBPARTS(), unshare_expr(), and useless_type_conversion_p().
Referenced by back_propagate_equivalences(), ccp_fold(), copy_prop_visit_assignment(), gimple_fold_stmt_to_constant(), jt_state::register_equivs_stmt(), try_to_simplify(), pointer_equiv_analyzer::visit_stmt(), and visit_stmt().
Lookup virtual method with index TOKEN in a virtual table V
at OFFSET.
Set CAN_REFER if non-NULL to false if method
is not referable or if the virtual table is ill-formed (such as rewriten
by non-C++ produced symbol). Otherwise just return NULL in that calse.
References builtin_decl_unreachable(), can_refer_decl_in_current_unit_p(), CONSTRUCTOR_ELT, CONSTRUCTOR_NELTS, ctor_for_folding(), DECL_VIRTUAL_P, error_mark_node, gcc_assert, gcc_checking_assert, cgraph_node::get_create(), ggc_alloc(), integer_zerop(), NULL, NULL_TREE, offset, STRIP_NOPS, TREE_CODE, TREE_OPERAND, tree_to_uhwi(), TREE_TYPE, TYPE_DOMAIN, TYPE_MIN_VALUE, TYPE_SIZE, TYPE_SIZE_UNIT, and VAR_P.
Referenced by gimple_get_virt_method_for_binfo(), ipa_get_indirect_edge_target_1(), and try_make_edge_direct_virtual_call().
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.
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.
References const_unop(), CONSTANT_CLASS_P, constant_for_folding(), ggc_alloc(), 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(), and process_bb().
Convert EXPR into a GIMPLE value suitable for substitution on the
RHS of an assignment. Insert the necessary statements before
iterator *SI_P. The statement at *SI_P, which must be a GIMPLE_CALL
is replaced. If the call is expected to produces a result, then it
is replaced by an assignment of the new RHS to the result variable.
If the result is to be ignored, then the call is replaced by a
GIMPLE_NOP. A proper VDEF chain is retained by making the first
VUSE and the last VDEF of the whole sequence be the same as the replaced
statement and using new SSA names for stores in between.
References CALL_EXPR_ARG, CALL_EXPR_FN, call_expr_nargs, cfun, finish_update_gimple_call(), force_gimple_operand(), gcc_assert, ggc_alloc(), gimple_build_assign(), gimple_build_call_vec(), gimple_build_nop(), gimple_call_lhs(), gimple_in_ssa_p(), gimple_seq_empty_p(), gimplify_and_add(), GSI_CONTINUE_LINKING, gsi_insert_after_without_update(), gsi_last(), gsi_replace(), gsi_replace_with_seq_vops(), gsi_stmt(), i, is_gimple_call(), NULL, NULL_TREE, pop_gimplify_context(), push_gimplify_context(), release_defs(), unlink_stmt_vdef(), valid_gimple_call_p(), and vNULL.
Referenced by dynamic_object_sizes_execute_one(), ccp_folder::fold_stmt(), gimple_fold_builtin(), gimple_fold_call(), strlen_pass::handle_builtin_memcmp(), strlen_pass::handle_builtin_strchr(), strlen_pass::handle_builtin_strlen(), maybe_optimize_arith_overflow(), and simplify_builtin_call().
Replace a statement at *SI_P with a sequence of statements in STMTS,
adjusting the replacement stmts location and virtual operands.
If the statement has a lhs the last stmt in the sequence is expected
to assign to that lhs.
References annotate_all_with_location(), cfun, ECF_CONST, ECF_NORETURN, ECF_NOVOPS, ECF_PURE, ggc_alloc(), gimple_assign_lhs(), gimple_assign_single_p(), gimple_call_flags(), gimple_has_location(), gimple_has_mem_ops(), gimple_location(), gimple_set_modified(), gimple_set_vdef(), gimple_set_vuse(), gimple_vdef(), gimple_vop(), gimple_vuse(), gsi_end_p(), gsi_last(), gsi_next(), gsi_prev(), gsi_replace_with_seq(), gsi_start(), gsi_stmt(), i, is_gimple_call(), is_gimple_reg(), make_ssa_name(), NULL, release_ssa_name(), SSA_NAME_DEF_STMT, TREE_CODE, and unlink_stmt_vdef().
Referenced by gimple_fold_builtin_bzero(), gimple_fold_builtin_memchr(), gimple_fold_builtin_snprintf(), gimple_fold_builtin_sprintf(), gimple_fold_builtin_strcat(), gimple_fold_builtin_strchr(), gimple_fold_builtin_string_compare(), gimple_fold_builtin_strstr(), gimplify_and_update_call_from_tree(), and replace_stmt_with_simplification().
Try to simplify the AND of two comparisons, specified by
(OP1A CODE1 OP1B) and (OP2B CODE2 OP2B), respectively.
If this can be simplified to a single expression (without requiring
introducing more SSA variables to hold intermediate values),
return the resulting tree. Otherwise return NULL_TREE.
If the result expression is non-null, it has boolean type.
References and_comparisons_1(), ggc_alloc(), maybe_fold_comparisons_from_match_pd(), and NULL_TREE.
Referenced by and_var_with_comparison_1(), eliminate_redundant_comparison(), ifcombine_ifandif(), optimize_vec_cond_expr(), and simplify_1b().
Try to simplify the OR of two comparisons, specified by
(OP1A CODE1 OP1B) and (OP2B CODE2 OP2B), respectively.
If this can be simplified to a single expression (without requiring
introducing more SSA variables to hold intermediate values),
return the resulting tree. Otherwise return NULL_TREE.
If the result expression is non-null, it has boolean type.
References ggc_alloc(), maybe_fold_comparisons_from_match_pd(), NULL_TREE, and or_comparisons_1().
Referenced by eliminate_redundant_comparison(), fold_or_predicates(), optimize_vec_cond_expr(), and or_var_with_comparison_1().
bool optimize_atomic_compare_exchange_p |
( |
gimple * | stmt | ) |
|
|
extern |
Return true if stmt is __atomic_compare_exchange_N call which is suitable
for conversion into ATOMIC_COMPARE_EXCHANGE if the second argument is
&var where var is only addressable because of such calls.
References auto_var_in_fn_p(), BUILT_IN_NORMAL, current_function_decl, DECL_FUNCTION_CODE(), direct_optab_handler(), GET_MODE_BITSIZE(), GET_MODE_SIZE(), ggc_alloc(), gimple_call_arg(), gimple_call_builtin_p(), gimple_call_fndecl(), gimple_call_num_args(), gimple_vdef(), gimple_vuse(), int_size_in_bytes(), integer_onep(), integer_zerop(), is_gimple_reg_type(), optab_handler(), SANITIZE_ADDRESS, sanitize_flags_p(), SANITIZE_THREAD, SCALAR_FLOAT_TYPE_P, SSA_VAR_P, TREE_CHAIN, TREE_CODE, TREE_OPERAND, TREE_THIS_VOLATILE, TREE_TYPE, TREE_VALUE, TYPE_ARG_TYPES, TYPE_MODE, TYPE_PRECISION, and VECTOR_TYPE_P.
Referenced by execute_update_addresses_taken().