GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "insn-codes.h"
#include "rtl.h"
#include "tree.h"
#include "gimple.h"
#include "cfghooks.h"
#include "tree-pass.h"
#include "ssa.h"
#include "tree-ssa.h"
#include "optabs-tree.h"
#include "insn-config.h"
#include "gimple-pretty-print.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "cfganal.h"
#include "gimplify.h"
#include "gimple-iterator.h"
#include "gimplify-me.h"
#include "tree-cfg.h"
#include "tree-dfa.h"
#include "domwalk.h"
#include "cfgloop.h"
#include "tree-data-ref.h"
#include "tree-scalar-evolution.h"
#include "tree-inline.h"
#include "case-cfn-macros.h"
#include "tree-eh.h"
#include "gimple-fold.h"
#include "internal-fn.h"
#include "gimple-range.h"
#include "gimple-match.h"
#include "dbgcnt.h"
#include "tree-ssa-propagate.h"
#include "tree-ssa-dce.h"
#include "calls.h"
Data Structures | |
class | auto_flow_sensitive |
struct | ref_to_bb |
struct | refs_hasher |
class | nontrapping_dom_walker |
Macros | |
#define | INCLUDE_MEMORY |
Variables | |
static unsigned int | nt_call_phase |
#define INCLUDE_MEMORY |
Optimization of PHI nodes by converting them into straightline code. Copyright (C) 2004-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/>.
Returns true if ARG is an absorbing element for operation CODE.
References integer_all_onesp(), integer_zerop(), NULL, and tree_single_nonzero_warnv_p().
Referenced by value_replacement().
|
static |
Conditional store replacement. We already know that the recognized pattern looks like so: split: if (cond) goto THEN_BB; else goto ELSE_BB (edge E1) THEN_BB: ... X = Y; ... goto JOIN_BB; ELSE_BB: ... X = Z; ... fallthrough (edge E0) JOIN_BB: some more We check that it is safe to sink the store to JOIN_BB by verifying that there are no read-after-write or write-after-write dependencies in THEN_BB and ELSE_BB.
References chrec_dont_know, chrec_known, compute_all_dependences(), cond_if_else_store_replacement_1(), DDR_A, DDR_ARE_DEPENDENT, DDR_B, DR_IS_READ, DR_IS_WRITE, DR_STMT, find_data_references_in_bb(), free_data_refs(), free_dependence_relations(), gimple_get_lhs(), gimple_phi_result(), gimple_uid(), gsi_end_p(), gsi_next(), gsi_start_phis(), NULL, NULL_TREE, operand_equal_p(), PHI_ARG_DEF_FROM_EDGE, renumber_gimple_stmt_uids_in_blocks(), si, single_succ_edge(), single_trailing_store_in_bb(), virtual_operand_p(), and vNULL.
|
static |
Do the main work of conditional store replacement.
References add_phi_arg(), cfun, create_phi_node(), DECL_P, dump_file, dump_flags, EDGE_SUCC, get_base_address(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_single_p(), gimple_build_assign(), gimple_clobber_p(), gimple_has_volatile_ops(), gimple_location(), gimple_phi_result(), gsi_after_labels(), gsi_end_p(), gsi_for_stmt(), gsi_insert_after(), gsi_insert_before(), gsi_last_bb(), GSI_NEW_STMT, gsi_remove(), is_gimple_reg_type(), make_temp_ssa_name(), NULL, NULL_TREE, operand_equal_p(), print_gimple_stmt(), release_defs(), statistics_counter_event(), TDF_DETAILS, TDF_MEMSYMS, TDF_VOPS, TREE_CODE, TREE_TYPE, and unlink_stmt_vdef().
Referenced by cond_if_else_store_replacement().
|
static |
Optimize x ? __builtin_fun (x) : C, where C is __builtin_fun (0). Convert <bb 2> if (b_4(D) != 0) goto <bb 3> else goto <bb 4> <bb 3> _2 = (unsigned long) b_4(D); _9 = __builtin_popcountl (_2); OR _9 = __builtin_popcountl (b_4(D)); <bb 4> c_12 = PHI <0(2), _9(3)> Into <bb 2> _2 = (unsigned long) b_4(D); _9 = __builtin_popcountl (_2); OR _9 = __builtin_popcountl (b_4(D)); <bb 4> c_12 = PHI <_9(2)> Similarly for __builtin_clz or __builtin_ctz if C?Z_DEFINED_VALUE_AT_ZERO is 2, optab is present and instead of 0 above it uses the value from that macro.
References build_int_cst(), CLZ_DEFINED_VALUE_AT_ZERO, CONVERT_EXPR_CODE_P, CTZ_DEFINED_VALUE_AT_ZERO, direct_internal_fn_supported_p(), dyn_cast(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs_code(), gimple_build_call_internal(), gimple_call_arg(), gimple_call_combined_fn(), gimple_call_internal_p(), gimple_call_num_args(), gimple_call_set_lhs(), gimple_cond_code(), gimple_cond_lhs(), gimple_cond_rhs(), gimple_get_lhs(), gsi_end_p(), gsi_for_stmt(), gsi_insert_before(), gsi_last_bb(), gsi_move_before(), gsi_next_nondebug(), gsi_remove(), GSI_SAME_STMT, gsi_start_nondebug_after_labels_bb(), gsi_stmt(), integer_type_node, integer_zerop(), INTEGRAL_TYPE_P, is_gimple_call(), long_integer_type_node, long_long_integer_type_node, NULL, NULL_TREE, OPTIMIZE_FOR_BOTH, replace_phi_edge_with_variable(), reset_flow_sensitive_info(), SCALAR_INT_TYPE_MODE, wi::to_wide(), TREE_CODE, tree_fits_shwi_p(), tree_to_shwi(), TREE_TYPE, and TYPE_PRECISION.
|
static |
Do the main work of conditional store replacement. We already know that the recognized pattern looks like so: split: if (cond) goto MIDDLE_BB; else goto JOIN_BB (edge E1) MIDDLE_BB: something fallthrough (edge E0) JOIN_BB: some more We check that MIDDLE_BB contains only one store, that that store doesn't trap (not via NOTRAP, but via checking if an access to the same memory location dominates us, or the store is to a local addressable object) and that the store has a "simple" RHS.
References add_phi_arg(), build2(), build_fold_addr_expr, build_zero_cst(), cfun, hash_set< KeyId, Lazy, Traits >::contains(), create_phi_node(), DECL_P, dump_file, dump_flags, fold_convert, gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_single_p(), gimple_build_assign(), gimple_has_volatile_ops(), gimple_location(), gimple_phi_result(), gimple_seq_empty_p(), gimple_set_location(), gsi_after_labels(), gsi_end_p(), gsi_for_stmt(), gsi_insert_after(), gsi_insert_before(), gsi_insert_on_edge(), gsi_last_bb(), GSI_NEW_STMT, gsi_remove(), handled_component_p(), is_gimple_reg_type(), last_and_only_stmt(), make_temp_ssa_name(), NULL, phi_nodes(), print_gimple_stmt(), ptr_type_node, ref_can_have_store_data_races(), REFERENCE_CLASS_P, release_defs(), statistics_counter_event(), suppress_warning(), TDF_DETAILS, TDF_MEMSYMS, TDF_VOPS, TREE_CODE, tree_could_trap_p(), TREE_OPERAND, TREE_TYPE, unlink_stmt_vdef(), and unshare_expr().
|
static |
empty_bb_or_one_feeding_into_p returns true if bb was empty basic block or it has one cheap preparation statement that feeds into the PHI statement and it sets STMT to that statement.
References empty_block_p(), FOR_EACH_SSA_TREE_OPERAND, gimple_assign_lhs(), gimple_call_combined_fn(), gimple_call_lhs(), gimple_could_trap_p(), gimple_has_side_effects(), gimple_seq_empty_p(), gimple_vuse(), gsi_end_p(), gsi_next_nondebug(), gsi_start_nondebug_after_labels_bb(), gsi_stmt(), is_gimple_assign(), is_gimple_call(), phi_nodes(), single_imm_use(), single_pred_p(), ssa_name_maybe_undef_p(), SSA_OP_USE, and TREE_CODE.
Referenced by match_simplify_replacement().
|
static |
|
static |
PR66726: Factor operations out of COND_EXPR. If the arguments of the PHI stmt are Unary operator, factor out the operation and perform the operation to the result of PHI stmt. COND_STMT is the controlling predicate. Return the newly-created PHI, if any.
References add_phi_arg(), CDI_DOMINATORS, cfun, gimple_match_op::code, create_phi_node(), dominated_by_p(), drop_tree_overflow(), dump_file, dump_flags, dyn_cast(), fold_convert, gimple_assign_cast_p(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs_code(), gimple_bb(), gimple_cond_lhs(), gimple_cond_rhs(), gimple_extract_op(), gimple_location(), gimple_phi_num_args(), gimple_phi_result(), gsi_after_labels(), GSI_CONTINUE_LINKING, gsi_end_p(), gsi_for_stmt(), gsi_insert_seq_before(), gsi_next_nondebug(), gsi_prev_nondebug(), gsi_remove(), gsi_stmt(), has_single_use(), int_fits_type_p(), INTEGRAL_TYPE_P, make_ssa_name(), maybe_push_res_to_seq(), NULL, gimple_match_op::num_ops, gimple_match_op::operands_occurs_in_abnormal_phi(), gimple_match_op::ops, print_generic_expr(), release_defs(), release_ssa_name(), SSA_NAME_DEF_STMT, statistics_counter_event(), TDF_DETAILS, TREE_CODE, TREE_OVERFLOW, TREE_TYPE, TYPE_PRECISION, and types_compatible_p().
|
static |
Determine whether we should attempt to hoist adjacent loads out of diamond patterns in pass_phiopt. Always hoist loads if -fhoist-adjacent-loads is specified and the target machine has both a conditional move instruction and a defined cache line size.
This is the entry point of gathering non trapping memory accesses. It will do a dominator walk over the whole function, and it will make use of the bb->aux pointers. It returns a set of trees (the MEM_REFs itself) which can't trap.
References CDI_DOMINATORS, cfun, clear_aux_for_blocks(), nt_call_phase, and dom_walker::walk().
|
static |
gimple_simplify_phiopt is like gimple_simplify but designed for PHIOPT. Return NULL if nothing can be simplified or the resulting simplified value with parts pushed if EARLY_P was true. Also rejects non allowed tree code if EARLY_P is set. Takes the comparison from COMP_STMT and two args, ARG0 and ARG1 and tries to simplify CMP ? ARG0 : ARG1. Also try to simplify (!CMP) ? ARG1 : ARG0 if the non-inverse failed.
References annotate_all_with_location(), boolean_type_node, build2_loc(), cmp1(), dump_file, dump_flags, follow_all_ssa_edges(), gimple_cond_code(), gimple_cond_lhs(), gimple_cond_rhs(), gimple_location(), gimple_seq_add_seq_without_update(), gimple_seq_discard(), HONOR_NANS(), invert_tree_comparison(), maybe_push_res_to_seq(), NULL, phiopt_early_allow(), print_generic_expr(), print_gimple_seq(), gimple_match_op::resimplify(), TDF_FOLDING, TDF_MEMSYMS, TDF_VOPS, gimple_match_cond::UNCOND, and UNKNOWN_LOCATION.
Referenced by match_simplify_replacement().
|
static |
Given a "diamond" control-flow pattern where BB0 tests a condition, BB1 and BB2 are "then" and "else" blocks dependent on this test, and BB3 rejoins control flow following BB1 and BB2, look for opportunities to hoist loads as follows. If BB3 contains a PHI of two loads, one each occurring in BB1 and BB2, and the loads are provably of adjacent fields in the same structure, then move both loads into BB0. Of course this can only be done if there are no dependencies preventing such motion. One of the hoisted loads will always be speculative, so the transformation is currently conservative: - The fields must be strictly adjacent. - The two fields must occupy a single memory block that is guaranteed to not cross a page boundary. The last is difficult to prove, as such memory blocks should be aligned on the minimum of the stack alignment boundary and the alignment guaranteed by heap allocation interfaces. Thus we rely on a parameter for the alignment value. Provided a good value is used for the last case, the first restriction could possibly be relaxed.
References bit_position(), cfun, DECL_ALIGN, DECL_CHAIN, DECL_SIZE, dump_file, dump_flags, gimple_assign_rhs1(), gimple_assign_single_p(), gimple_bb(), gimple_has_volatile_ops(), gimple_phi_arg_def(), gimple_phi_num_args(), gimple_phi_result(), gsi_end_p(), gsi_for_stmt(), gsi_move_to_bb_end(), gsi_next(), gsi_start_phis(), basic_block_def::index, local_mem_dependence(), operand_equal_p(), optab_handler(), gphi_iterator::phi(), print_gimple_stmt(), SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, statistics_counter_event(), TDF_DETAILS, TDF_MEMSYMS, TDF_VOPS, TREE_CODE, tree_fits_uhwi_p(), TREE_OPERAND, tree_to_uhwi(), TREE_TYPE, TYPE_MODE, and virtual_operand_p().
Invert a MIN to a MAX or a MAX to a MIN expression CODE.
References gcc_unreachable.
Referenced by minmax_replacement().
Update *ARG which is defined in STMT so that it contains the computed value if that seems profitable. Return true if the statement is made dead by that rewriting.
References get_addr_base_and_unit_offset(), gimple_assign_rhs1(), gimple_assign_rhs_code(), known_eq, mem_ref_offset(), offset, TREE_CODE, and TREE_OPERAND.
Referenced by value_replacement().
|
static |
Return TRUE if STMT has a VUSE whose corresponding VDEF is in BB.
References gimple_bb(), gimple_vuse(), SSA_NAME_DEF_STMT, and data_reference::stmt.
Referenced by hoist_adjacent_loads().
gimple_opt_pass * make_pass_cselim | ( | gcc::context * | ctxt | ) |
gimple_opt_pass * make_pass_phiopt | ( | gcc::context * | ctxt | ) |
|
static |
The function match_simplify_replacement does the main work of doing the replacement using match and simplify. Return true if the replacement is done. Otherwise return false. BB is the basic block where the replacement is going to be done on. ARG0 is argument 0 from PHI. Likewise for ARG1.
References bitmap_set_bit, cfun, dump_file, dump_flags, EDGE_SUCC, empty_bb_or_one_feeding_into_p(), extract_true_false_edges_from_block(), gcc_assert, gimple_cond_lhs(), gimple_cond_rhs(), gimple_get_lhs(), gimple_phi_result(), gimple_simplify_phiopt(), GSI_CONTINUE_LINKING, gsi_end_p(), gsi_insert_seq_before(), gsi_last_bb(), gsi_next(), gsi_start(), gsi_stmt(), last_nondebug_stmt(), move_stmt(), NULL, operand_equal_for_phi_arg_p(), replace_phi_edge_with_variable(), SSA_NAME_IS_DEFAULT_DEF, ssa_name_maybe_undef_p(), SSA_NAME_VERSION, statistics_counter_event(), TDF_FOLDING, TREE_CODE, and TREE_TYPE.
|
static |
The function minmax_replacement does the main work of doing the minmax replacement. Return true if the replacement is done. Otherwise return false. BB is the basic block where the replacement is going to be done on. ARG0 is argument 0 from the PHI. Likewise for ARG1. If THREEWAY_P then expect the BB to be laid out in diamond shape with each BB containing only a MIN or MAX expression.
References wi::add(), as_a(), boolean_type_node, EDGE_PRED, EDGE_SUCC, empty_block_p(), wi::eq_p(), extract_true_false_edges_from_block(), fold_build2, gcc_assert, gimple_assign_cast_p(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), gimple_build(), gimple_cond_code(), gimple_cond_lhs(), gimple_cond_rhs(), gimple_location(), gimple_phi_result(), gimple_seq_empty_p(), gsi_insert_seq_before(), gsi_last_bb(), gsi_last_nondebug_bb(), gsi_move_before(), GSI_NEW_STMT, gsi_one_nondebug_before_end_p(), gsi_start_nondebug_after_labels_bb(), gsi_stmt(), HONOR_NANS(), HONOR_SIGNED_ZEROS(), integer_nonzerop(), integer_zerop(), INTEGRAL_TYPE_P, invert_minmax_code(), is_gimple_assign(), last_and_only_stmt(), last_nondebug_stmt(), wi::max_value(), wi::min_value(), NULL, NULL_TREE, operand_equal_for_phi_arg_p(), phi_nodes(), replace_phi_edge_with_variable(), reset_flow_sensitive_info(), single_pred_p(), SINGLE_SSA_TREE_OPERAND, SSA_NAME_DEF_STMT, SSA_OP_DEF, strip_bit_not(), wi::sub(), wi::to_wide(), TREE_CODE, TREE_TYPE, TYPE_PRECISION, TYPE_SIGN, TYPE_UNSIGNED, useless_type_conversion_p(), and wide_int_to_tree().
|
static |
Move STMT to before GSI and insert its defining name into INSERTED_EXPRS bitmap.
References bitmap_set_bit, dump_file, dump_flags, gimple_get_lhs(), gsi_for_stmt(), gsi_move_before(), inserted_exprs, print_gimple_stmt(), reset_flow_sensitive_info(), SSA_NAME_VERSION, TDF_DETAILS, TDF_MEMSYMS, and TDF_VOPS.
Referenced by match_simplify_replacement().
Returns true if ARG is a neutral element for operation CODE on the RIGHT side.
References integer_all_onesp(), integer_onep(), and integer_zerop().
Referenced by value_replacement().
|
static |
Return TRUE if arg0/arg1 are equal to the rhs/lhs or lhs/rhs of COND. Also return TRUE if arg0/arg1 are equal to the source arguments of a an EQ comparison feeding a BIT_AND_EXPR which feeds COND. Return FALSE otherwise.
References gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), gimple_cond_lhs(), gimple_cond_rhs(), integer_zerop(), is_gimple_assign(), operand_equal_for_phi_arg_p(), rhs_is_fed_for_value_replacement(), SSA_NAME_DEF_STMT, and TREE_CODE.
Referenced by value_replacement().
|
static |
Return TRUE if SEQ/OP pair should be allowed during early phiopt. Currently this is to allow MIN/MAX and ABS/NEGATE and constants.
References gimple_match_op::code, gimple_assign_lhs(), gimple_assign_rhs_code(), gimple_seq_empty_p(), gimple_seq_first_stmt(), gimple_seq_singleton_p(), is_gimple_assign(), code_helper::is_tree_code(), and gimple_match_op::ops.
Referenced by gimple_simplify_phiopt().
|
static |
Replace PHI node element whose edge is E in block BB with variable NEW. Remove the edge from COND_BLOCK which does not lead to BB (COND_BLOCK is known to have two edges, one of which must reach BB).
References profile_probability::always(), as_a(), cfun, copy_phi_arg_into_existing_phi(), dbg_cnt(), delete_basic_block(), dump_file, dump_flags, duplicate_ssa_name_range_info(), EDGE_COUNT, EDGE_SUCC, empty_block_p(), find_edge(), gcc_assert, gcc_unreachable, gimple_bb(), gimple_cond_make_false(), gimple_cond_make_true(), gimple_phi_result(), gsi_last_bb(), gsi_remove(), basic_block_def::index, INTEGRAL_TYPE_P, NULL, PHI_ARG_DEF_PTR, redirect_edge_and_branch(), SET_USE, simple_dce_from_worklist(), single_pred_p(), single_succ_p(), SSA_NAME_DEF_STMT, SSA_NAME_RANGE_INFO, statistics_counter_event(), TDF_DETAILS, TREE_CODE, and TREE_TYPE.
Referenced by cond_removal_in_builtin_zero_pattern(), match_simplify_replacement(), minmax_replacement(), and value_replacement().
|
static |
RHS is a source argument in a BIT_AND_EXPR which feeds a conditional of the form SSA_NAME NE 0. If RHS is fed by a simple EQ_EXPR comparison of two values, see if the two input values of the EQ_EXPR match arg0 and arg1. If so update *code and return TRUE. Otherwise return FALSE.
References gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), is_gimple_assign(), operand_equal_for_phi_arg_p(), SSA_NAME_DEF_STMT, and TREE_CODE.
Referenced by operand_equal_for_value_replacement().
|
static |
Return the singleton PHI in the SEQ of PHIs for edges E0 and E1.
References as_a(), gimple_phi_arg_def(), gimple_phi_result(), gsi_end_p(), gsi_next(), gsi_start(), gsi_stmt(), i, NULL, operand_equal_for_phi_arg_p(), and virtual_operand_p().
Referenced by value_replacement().
|
static |
Return the single store in BB with VDEF or NULL if there are other stores in the BB or loads following the store.
References ref_to_bb::bb, FOR_EACH_IMM_USE_FAST, gimple_bb(), gimple_vdef(), gimple_vuse(), NULL, SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, and USE_STMT.
Referenced by cond_if_else_store_replacement().
|
static |
Attempt to optimize (x <=> y) cmp 0 and similar comparisons. For strong ordering <=> try to match something like: <bb 2> : // cond3_bb (== cond2_bb) if (x_4(D) != y_5(D)) goto <bb 3>; [INV] else goto <bb 6>; [INV] <bb 3> : // cond_bb if (x_4(D) < y_5(D)) goto <bb 6>; [INV] else goto <bb 4>; [INV] <bb 4> : // middle_bb <bb 6> : // phi_bb # iftmp.0_2 = PHI <1(4), 0(2), -1(3)> _1 = iftmp.0_2 == 0; and for partial ordering <=> something like: <bb 2> : // cond3_bb if (a_3(D) == b_5(D)) goto <bb 6>; [50.00%] else goto <bb 3>; [50.00%] <bb 3> [local count: 536870913]: // cond2_bb if (a_3(D) < b_5(D)) goto <bb 6>; [50.00%] else goto <bb 4>; [50.00%] <bb 4> [local count: 268435456]: // cond_bb if (a_3(D) > b_5(D)) goto <bb 6>; [50.00%] else goto <bb 5>; [50.00%] <bb 5> [local count: 134217728]: // middle_bb <bb 6> [local count: 1073741824]: // phi_bb # SR.27_4 = PHI <0(2), -1(3), 1(4), 2(5)> _2 = SR.27_4 > 0;
References absu_hwi(), as_a(), boolean_type_node, build2(), build3(), build_debug_expr_decl(), build_int_cst(), build_one_cst(), build_zero_cst(), cfun, cmp1(), COMPARISON_CLASS_P, cond_only_block_p(), DECL_ARTIFICIAL, EDGE_COUNT, EDGE_SUCC, empty_block_p(), fold_convert, FOR_EACH_IMM_USE_FAST, g, gcc_assert, gcc_checking_assert, gcc_unreachable, gimple_assign_cast_p(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_class(), gimple_assign_rhs_code(), gimple_assign_set_rhs1(), gimple_assign_set_rhs2(), gimple_assign_set_rhs_code(), gimple_assign_set_rhs_with_ops(), gimple_bb(), GIMPLE_BINARY_RHS, gimple_build_debug_bind(), gimple_cond_code(), gimple_cond_lhs(), gimple_cond_rhs(), gimple_cond_set_code(), gimple_cond_set_lhs(), gimple_cond_set_rhs(), gimple_phi_arg_def(), gimple_phi_result(), gsi_after_labels(), gsi_for_stmt(), gsi_insert_before(), gsi_last_bb(), gsi_remove(), GSI_SAME_STMT, HONOR_NANS(), IN_RANGE, integer_minus_onep(), integer_onep(), integer_zerop(), INTEGRAL_TYPE_P, is_gimple_assign(), is_gimple_debug(), make_node(), MAY_HAVE_DEBUG_BIND_STMTS, wi::ne_p(), NULL_TREE, operand_equal_p(), basic_block_def::preds, remove_phi_node(), replace_uses_by(), safe_dyn_cast(), SET_DECL_MODE, wi::shifted_mask(), single_imm_use(), single_pred(), single_pred_p(), SSA_NAME_OCCURS_IN_ABNORMAL_PHI, statistics_counter_event(), basic_block_def::succs, wi::to_wide(), wi::to_widest(), TREE_CODE, tree_fits_shwi_p(), tree_int_cst_lt(), TREE_OPERAND, tree_to_shwi(), TREE_TYPE, TYPE_MODE, TYPE_PRECISION, TYPE_UNSIGNED, update_stmt(), and USE_STMT.
If VAR is an SSA_NAME that points to a BIT_NOT_EXPR then return the TREE for the value being inverted.
References gimple_assign_rhs1(), gimple_assign_rhs_code(), NULL_TREE, SSA_NAME_DEF_STMT, and TREE_CODE.
Referenced by minmax_replacement().
|
static |
The function value_replacement does the main work of doing the value replacement. Return non-zero if the replacement is done. Otherwise return 0. If we remove the middle basic block, return 2. BB is the basic block where the replacement is going to be done on. ARG0 is argument 0 from the PHI. Likewise for ARG1.
References absorbing_element_p(), as_a(), bb_seq(), boolean_type_node, build2(), build3(), build_debug_expr_decl(), CASE_CONVERT, cfun, CONVERT_EXPR_CODE_P, dump_file, dump_flags, EDGE_COUNT, EDGE_PRED, eni_time_weights, estimate_num_insns(), estimate_num_insns_seq(), profile_probability::even(), extract_true_false_edges_from_block(), fold_convert, FOR_EACH_IMM_USE_ON_STMT, FOR_EACH_IMM_USE_STMT, g, gcc_assert, get_global_range_query(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_class(), gimple_assign_rhs_code(), gimple_bb(), GIMPLE_BINARY_RHS, gimple_build_debug_bind(), gimple_cond_code(), gimple_cond_lhs(), gimple_cond_rhs(), gimple_phi_result(), gimple_seq_empty_p(), gsi_after_labels(), gsi_end_p(), gsi_for_stmt(), gsi_insert_before(), gsi_last_bb(), gsi_last_nondebug_bb(), gsi_move_before(), gsi_next_nondebug(), gsi_prev_nondebug(), GSI_SAME_STMT, gsi_start_nondebug_after_labels_bb(), gsi_stmt(), HONOR_SIGNED_ZEROS(), i, basic_block_def::index, int_const_binop(), INTEGRAL_TYPE_P, is_gimple_assign(), is_gimple_debug(), jump_function_from_stmt(), MAY_HAVE_DEBUG_BIND_STMTS, neutral_element_p(), NULL, NULL_TREE, operand_equal_for_phi_arg_p(), operand_equal_for_value_replacement(), optimize_bb_for_speed_p(), phi_nodes(), POINTER_TYPE_P, print_generic_expr(), PROFILE_ABSENT, profile_status_for_fn, r, replace_exp(), replace_phi_edge_with_variable(), reset_debug_uses(), reset_flow_sensitive_info(), sc, SET_PHI_ARG_DEF, set_range_info(), single_imm_use(), single_non_singleton_phi_for_edges(), single_pred_p(), single_succ_edge(), ssa_name_maybe_undef_p(), SSA_NAME_RANGE_INFO, statistics_counter_event(), tcc_comparison, TDF_DETAILS, TREE_CODE, TREE_CODE_CLASS, tree_int_cst_equal(), tree_int_cst_le(), tree_int_cst_lt(), TREE_OVERFLOW, TREE_TYPE, update_stmt(), and virtual_operand_p().
|
static |
Used for quick clearing of the hash-table when we see calls. Hash entries with phase < nt_call_phase are invalid.
Referenced by nontrapping_dom_walker::add_or_mark_expr(), nontrapping_dom_walker::before_dom_children(), and get_non_trapping().