|
GCC Middle and Back End API Reference
|
#include "config.h"#include "system.h"#include "coretypes.h"#include "backend.h"#include "tree.h"#include "gimple.h"#include "tree-pass.h"#include "ssa.h"#include "gimple-pretty-print.h"#include "gimple-iterator.h"#include "stor-layout.h"#include "tree-into-ssa.h"#include "tree-ssa.h"#include "cfgloop.h"#include "tree-scalar-evolution.h"#include "value-query.h"#include "value-range-storage.h"
Macros | |
| #define | UNUSED_NAME_VERSION 0 |
| #define | FREE_SSANAMES(fun) |
| #define | FREE_SSANAMES_QUEUE(fun) |
Variables | |
| unsigned int | ssa_name_nodes_reused |
| unsigned int | ssa_name_nodes_created |
| #define FREE_SSANAMES | ( | fun | ) |
Referenced by fini_ssanames(), flush_ssaname_freelist(), init_ssanames(), make_ssa_name_fn(), release_free_names_and_compact_live_names(), and verify_ssaname_freelists().
| #define FREE_SSANAMES_QUEUE | ( | fun | ) |
Referenced by fini_ssanames(), flush_ssaname_freelist(), init_ssanames(), release_ssa_name_fn(), and verify_ssaname_freelists().
| #define UNUSED_NAME_VERSION 0 |
Generic routines for manipulating SSA_NAME expressions Copyright (C) 2003-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/>.
Rewriting a function into SSA form can create a huge number of SSA_NAMEs, many of which may be thrown away shortly after their creation if jumps were threaded through PHI nodes. While our garbage collection mechanisms will handle this situation, it is extremely wasteful to create nodes and throw them away, especially when the nodes can be reused. For PR 8361, we can significantly reduce the number of nodes allocated and thus the total amount of memory allocated by managing SSA_NAMEs a little. This additionally helps reduce the amount of work done by the garbage collector. Similar results have been seen on a wider variety of tests (such as the compiler itself). Right now we maintain our free list on a per-function basis. It may or may not make sense to maintain the free list for the duration of a compilation unit. External code should rely solely upon HIGHEST_SSA_VERSION and the externally defined functions. External code should not know about the details of the free list management. External code should also not assume the version number on nodes is monotonically increasing. We reuse the version number when we reuse an SSA_NAME expression. This helps keep arrays and bitmaps more compact.
Version numbers with special meanings. We start allocating new version numbers after the special ones.
Referenced by verify_ssaname_freelists().
|
static |
Return the bitmask expressing byte alignment ALIGN with byte offset MISALIGN for a pointer of type TYPE.
References alignment_to_bitmask(), irange_bitmask::irange_bitmask(), TYPE_PRECISION, and wi::uhwi().
Referenced by alignment_to_bitmask(), and set_ptr_info_alignment().
|
static |
if BM contains usable alignment info, return the byte alignment and offset in ALIGNP and MISALIGNP. Otherwise return FALSE.
References bitmask_to_alignment(), wi::ctz(), wi::extract_uhwi(), wide_int_storage::get_precision(), HOST_BITS_PER_INT, irange_bitmask::mask(), irange_bitmask::unknown_p(), and irange_bitmask::value().
Referenced by bitmask_to_alignment(), and get_ptr_info_alignment().
Creates a new SSA name using the template NAME tobe defined by statement STMT in function FN.
References copy_ssa_name_fn(), make_ssa_name_fn(), SET_SSA_NAME_VAR_OR_IDENTIFIER, SSA_NAME_IDENTIFIER, SSA_NAME_VAR, and TREE_TYPE.
Referenced by copy_ssa_name(), copy_ssa_name_fn(), duplicate_ssa_name_fn(), and replace_ssa_name().
Creates a duplicate of a ssa name NAME tobe defined by statement STMT in function FN.
References copy_ssa_name_fn(), duplicate_ssa_name_fn(), duplicate_ssa_name_range_info(), and SSA_NAME_RANGE_INFO.
Referenced by duplicate_ssa_name(), and duplicate_ssa_name_fn().
| void duplicate_ssa_name_ptr_info | ( | tree | dest, |
| const pt_solution * | pt ) |
Give DEST its own copy of the points-to and alignment information of the SSA name SRC. SRC may be NULL_TREE or carry no information, in which case DEST is left alone.
References duplicate_ssa_name_ptr_info(), gcc_assert, ggc_alloc(), POINTER_TYPE_P, set_pt_solution(), ssa_name_pt_solution(), and TREE_TYPE.
Referenced by bump_vector_ptr(), copy_ref_info(), duplicate_ssa_name_ptr_info(), duplicate_ssa_name_ptr_info(), duplicate_ssa_name_range_info(), issue_prefetch_ref(), rewrite_use_nonlinear_expr(), and vect_duplicate_ssa_name_ptr_info().
Give DEST its own copy of the points-to and alignment information of the SSA name SRC. SRC may be NULL_TREE or carry no information, in which case DEST is left alone.
References duplicate_ssa_name_ptr_info(), and ssa_name_pt_solution().
Copy any global range and aliasing information from SRC to NAME.
References duplicate_ssa_name_ptr_info(), duplicate_ssa_name_range_info(), gcc_checking_assert, get_ptr_info_alignment(), POINTER_TYPE_P, range_info_get_range(), range_info_set_range(), set_ptr_info_alignment(), SSA_NAME_RANGE_INFO, and TREE_TYPE.
Referenced by duplicate_ssa_name_fn(), duplicate_ssa_name_range_info(), maybe_duplicate_ssa_info_at_copy(), remap_ssa_name(), and replace_phi_edge_with_variable().
| void fini_ssanames | ( | struct function * | fn | ) |
Finalize management of SSA_NAMEs.
References fini_ssanames(), FOR_EACH_VEC_SAFE_ELT, FREE_SSANAMES, FREE_SSANAMES_QUEUE, i, NULL, SSA_NAME_DEF_STMT, SSANAMES, and vec_free().
Referenced by delete_tree_ssa(), and fini_ssanames().
| void flush_ssaname_freelist | ( | void | ) |
Move all SSA_NAMEs from FREE_SSA_NAMES_QUEUE to FREE_SSA_NAMES. We do not, but should have a mode to verify the state of the SSA_NAMEs lists. In particular at this point every name must be in the IL, on the free list or in the queue. Anything else is an error.
References cfun, flush_ssaname_freelist(), FREE_SSANAMES, FREE_SSANAMES_QUEUE, scev_reset_htab(), vec_safe_is_empty(), vec_safe_splice(), and vec_safe_truncate().
Referenced by execute_todo(), and flush_ssaname_freelist().
| wide_int get_known_nonzero_bits | ( | const_tree | name | ) |
Return a wide_int with known non-zero bits in SSA_NAME NAME, the constant for INTEGER_CST, or 0 if unknown. In addition to what get_known_nonzero_bits_1 handles, this handles one level of BIT_IOR_EXPR, either as a def_stmt or tree directly.
References g, get_known_nonzero_bits(), get_known_nonzero_bits_1(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), is_gimple_assign(), SSA_NAME_DEF_STMT, TREE_CODE, and TREE_OPERAND.
Referenced by get_known_nonzero_bits().
|
static |
Return a wide_int with known non-zero bits in SSA_NAME NAME (bits whose values aren't known are also clear), the constant for INTEGER_CST, or 0 if unknown.
References wi::bit_and_not(), element_precision(), irange::get_bitmask(), get_known_nonzero_bits_1(), irange_bitmask::mask(), POINTER_TYPE_P, range_info_get_range(), wi::shwi(), SSA_NAME_RANGE_INFO, irange::supports_p(), wi::to_wide(), TREE_CODE, TREE_TYPE, vrange::undefined_p(), and irange_bitmask::value().
Referenced by get_known_nonzero_bits(), and get_known_nonzero_bits_1().
| wide_int get_nonzero_bits | ( | const_tree | name | ) |
Return a wide_int with potentially non-zero bits in SSA_NAME NAME, the constant for INTEGER_CST, or -1 if unknown. In addition to what get_nonzero_bits_1 handles, this handles one level of BIT_AND_EXPR, either as a def_stmt or tree directly.
References g, get_nonzero_bits(), get_nonzero_bits_1(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), is_gimple_assign(), SSA_NAME_DEF_STMT, TREE_CODE, and TREE_OPERAND.
Referenced by evaluate_stmt(), expand_expr_real_2(), expr_not_equal_to(), get_default_value(), get_nonzero_bits(), range_query::get_tree_range(), ipcp_bits_lattice::get_value_and_mask(), handle_builtin_alloca(), maybe_set_nonzero_bits(), optimize_range_tests_var_bound(), split_constant_offset(), ssa_name_has_boolean_range(), tree_ctz(), tree_nonzero_bits(), validate_test_and_branch(), and vect_get_range_info().
|
static |
Return a wide_int with potentially non-zero bits in SSA_NAME NAME, the constant for INTEGER_CST, or -1 if unknown.
References element_precision(), prange::get_bitmask(), irange_bitmask::get_nonzero_bits(), vrange::get_nonzero_bits(), get_nonzero_bits_1(), POINTER_TYPE_P, POLY_INT_CST_P, range_info_get_range(), wi::shwi(), SSA_NAME_RANGE_INFO, irange::supports_p(), wi::to_poly_wide(), wi::to_wide(), TREE_CODE, TREE_TYPE, uniform_vector_p(), and VECTOR_TYPE_P.
Referenced by get_nonzero_bits(), and get_nonzero_bits_1().
|
static |
Return NAME's solution, creating an unknown solution if necessary.
References gcc_assert, get_pt_solution(), ggc_cleared_alloc(), POINTER_TYPE_P, pt_solution_reset(), set_pt_solution(), ssa_name_prange_storage(), and TREE_TYPE.
Referenced by get_pt_solution(), set_ptr_nonnull(), set_range_info(), and set_ssa_name_pt_solution().
| bool get_ptr_info_alignment | ( | const_tree | name, |
| unsigned int * | alignp, | ||
| unsigned int * | misalignp ) |
Extract useful alignment information from NAME's global range. Return false if no alignment beyond byte alignment is known.
References bitmask_to_alignment(), gcc_checking_assert, get_ptr_info_alignment(), POINTER_TYPE_P, r, range_info_get_range(), ssa_name_prange_storage(), SSA_NAME_RANGE_INFO, and TREE_TYPE.
Referenced by dump_ssaname_info(), duplicate_ssa_name_range_info(), get_pointer_alignment_1(), get_ptr_info_alignment(), ipcp_update_vr(), and maybe_set_nonzero_bits().
| void init_ssa_name_imm_use | ( | tree | name | ) |
Initialize SSA_NAME_IMM_USE_NODE of a SSA NAME.
References init_ssa_name_imm_use(), ssa_use_operand_t::loc, ssa_use_operand_t::next, NULL, ssa_use_operand_t::prev, SSA_NAME_IMM_USE_NODE, and ssa_use_operand_t::use.
Referenced by init_ssa_name_imm_use(), make_ssa_name_fn(), and maybe_fold_comparisons_from_match_pd().
| void init_ssanames | ( | struct function * | fn, |
| int | size ) |
Initialize management of SSA_NAMEs to default SIZE. If SIZE is zero use default.
References FREE_SSANAMES, FREE_SSANAMES_QUEUE, function::gimple_df, init_ssanames(), NULL, NULL_TREE, gimple_df::rename_vops, gimple_df::ssa_renaming_needed, SSANAMES, vec_alloc(), and vec_safe_reserve().
Referenced by init_ssanames(), and init_tree_ssa().
| gimple_opt_pass * make_pass_release_ssa_names | ( | gcc::context * | ctxt | ) |
References make_pass_release_ssa_names().
Referenced by make_pass_release_ssa_names(), and make_pass_rtl_seqabstr().
Return an SSA_NAME node for variable VAR defined in statement STMT in function FN. STMT may be an empty statement for artificial references (e.g., default definitions created when a variable is used without a preceding definition). If VERISON is not zero then allocate the SSA name with that version.
References FREE_SSANAMES, gcc_assert, init_ssa_name_imm_use(), is_gimple_reg_type(), make_node(), make_ssa_name_fn(), NULL, NULL_TREE, SET_SSA_NAME_VAR_OR_IDENTIFIER, tree_node::ssa_name, SSA_NAME_DEF_STMT, SSA_NAME_IN_FREE_LIST, SSA_NAME_IS_DEFAULT_DEF, ssa_name_nodes_created, ssa_name_nodes_reused, SSA_NAME_RANGE_INFO, SSA_NAME_VERSION, SSANAMES, TREE_CODE, TREE_TYPE, TYPE_MAIN_VARIANT, TYPE_P, VAR_P, vec_safe_grow_cleared(), vec_safe_is_empty(), and vec_safe_push().
Referenced by copy_ssa_name_fn(), get_or_create_ssa_default_def(), input_ssa_names(), make_ssa_name(), make_ssa_name_fn(), make_temp_ssa_name(), move_sese_region_to_fn(), and replace_ssa_name().
| void mark_ptr_info_alignment_unknown | ( | tree | name | ) |
Clear NAME's known bits independently of the legacy alignment fields.
References prange_storage::align, mark_ptr_info_alignment_unknown(), prange_storage::misalign, r, range_info_get_range(), range_info_set_range(), ssa_name_prange_storage(), SSA_NAME_RANGE_INFO, TREE_TYPE, and TYPE_PRECISION.
Referenced by mark_ptr_info_alignment_unknown().
For a SSA copy DEST = SRC duplicate SSA info present on DEST to SRC to preserve it in case DEST is eliminated to SRC.
References duplicate_ssa_name_range_info(), gimple_bb(), maybe_duplicate_ssa_info_at_copy(), SSA_NAME_DEF_STMT, and SSA_NAME_RANGE_INFO.
Referenced by substitute_and_fold_dom_walker::before_dom_children(), eliminate_dom_walker::eliminate_stmt(), fini_copy_prop(), fwprop_set_lattice_val(), maybe_duplicate_ssa_info_at_copy(), and scc_copy_prop::replace_scc_by_value().
|
inline |
Allocate a new global range for NAME and set it to R. Return the allocation slot.
References ggc_alloc_vrange_storage(), r, range_info_alloc(), and SSA_NAME_RANGE_INFO.
Referenced by range_info_alloc(), and range_info_set_range().
Return TRUE if R fits in the global range of NAME.
References vrange_storage::fits_p(), gcc_checking_assert, r, range_info_fits_p(), and SSA_NAME_RANGE_INFO.
Referenced by range_info_fits_p(), and range_info_set_range().
|
inline |
Free storage allocated for the global range for NAME.
References ggc_free(), range_info_free(), and SSA_NAME_RANGE_INFO.
Referenced by range_info_free(), and range_info_set_range().
|
inline |
Return the global range for NAME in R.
References r, range_info_get_range(), SSA_NAME_RANGE_INFO, and TREE_TYPE.
Referenced by duplicate_ssa_name_range_info(), get_known_nonzero_bits_1(), get_nonzero_bits_1(), get_ptr_info_alignment(), mark_ptr_info_alignment_unknown(), range_info_get_range(), set_ptr_info_alignment(), and set_range_info().
Set the global range for NAME from R. Return TRUE if successful, or FALSE if we can't set a range of NAME's type.
References gcc_checking_assert, vrange_storage::m_discriminator, NULL, r, range_info_alloc(), range_info_fits_p(), range_info_free(), range_info_set_range(), ssa_name_prange_storage(), SSA_NAME_RANGE_INFO, and VR_PRANGE.
Referenced by duplicate_ssa_name_range_info(), mark_ptr_info_alignment_unknown(), range_info_set_range(), set_ptr_info_alignment(), and set_range_info().
| void release_defs | ( | gimple * | stmt | ) |
Release all the SSA_NAMEs created by STMT.
References FOR_EACH_SSA_TREE_OPERAND, release_defs(), release_ssa_name(), SSA_OP_ALL_DEFS, and TREE_CODE.
Referenced by strlen_pass::adjust_last_stmt(), adjust_simduid_builtins(), cancel_fma_deferring(), cond_if_else_store_replacement_1(), cond_store_replacement(), cond_store_replacement_limited(), convert_mult_to_fma_1(), convert_scalar_cond_reduction(), delete_dead_or_redundant_assignment(), delete_dead_or_redundant_call(), do_simple_agr_dse(), eliminate_dom_walker::eliminate_cleanup(), eliminate_tail_call(), execute_cse_conv_1(), execute_early_expand_coro_ifns(), expand_omp_atomic_fetch_op(), expand_omp_atomic_pipeline(), factor_out_conditional_load(), factor_out_conditional_operation(), factor_out_operators(), finish_long_mul_low_half(), forward_propagate_addr_expr(), generate_loops_for_partition(), gimple_fold_builtin_stdarg(), gimple_fold_partial_load_store(), gimple_seq_discard(), gimplify_and_update_call_from_tree(), strlen_pass::handle_assign(), strlen_pass::handle_builtin_memset(), strlen_pass::handle_store(), hoist_memory_references(), ifcvt_local_dce(), input_function(), linearize_expr(), lower_long_mul_high_chain(), match_single_bit_test(), match_uaddc_usubc(), maybe_remove_writeonly_store(), optimize_clobbers(), optimize_mask_stores(), optimize_recip_sqrt(), dom_opt_dom_walker::optimize_stmt(), optimize_vector_load(), predicate_statements(), propagate_op_to_single_use(), reassociate_bb(), release_defs(), release_defs_bitset(), remove_bb(), remove_dead_stmt(), remove_indirect_clobbers(), remove_prop_source_from_use(), pcom_worker::remove_stmt(), vec_info::remove_stmt(), remove_unused_locals(), remove_visited_stmt_chain(), repropagate_negates(), ipa_param_body_adjustments::reset_debug_stmts(), rewrite_bittest(), simple_dce_from_worklist(), simplify_builtin_memcpy_memset(), sink_clobbers(), sink_code_in_bb(), sink_common_stores_to_bb(), sra_modify_assign(), sra_modify_constructor_assign(), sra_modify_deferred_init(), vect_transform_loop(), and vect_transform_slp_perm_load_1().
|
static |
Release the vector of free SSA_NAMEs and compact the vector of SSA_NAMEs that are live.
References dump_file, FREE_SSANAMES, function::gimple_df, i, num_ssa_names, release_free_names_and_compact_live_names(), ssa_name, SSA_NAME_VERSION, gimple_df::ssa_names, statistics_counter_event(), vec_free(), and vec_safe_length().
Referenced by release_free_names_and_compact_live_names().
We no longer need the SSA_NAME expression VAR, release it so that it may be reused. Note it is assumed that no calls to make_ssa_name will be made until all uses of the ssa name are released and that the only use of the SSA_NAME expression is to check its SSA_NAME_VAR. All other fields must be assumed clobbered.
References delink_imm_use(), error_mark_node, FREE_SSANAMES_QUEUE, insert_debug_temp_for_var_def(), ssa_use_operand_t::loc, MAY_HAVE_DEBUG_BIND_STMTS, name_registered_for_update_p(), ssa_use_operand_t::next, NULL, NULL_TREE, ssa_use_operand_t::prev, release_ssa_name_after_update_ssa(), release_ssa_name_fn(), SSA_NAME_IMM_USE_NODE, SSA_NAME_IN_FREE_LIST, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VERSION, SSANAMES, TREE_SET_CODE, tree_size(), TREE_TYPE, vec_safe_push(), and verify_imm_links().
Referenced by expand_ifn_va_arg_1(), operands_scanner::finalize_ssa_defs(), release_ssa_name(), and release_ssa_name_fn().
Replace the symbol associated with SSA_NAME with SYM.
References replace_ssa_name_symbol(), SET_SSA_NAME_VAR_OR_IDENTIFIER, ssa_name, and TREE_TYPE.
Referenced by base_names_in_chain_on(), replace_ssa_name_symbol(), separate_decls_in_region_name(), and set_component_ssa_name().
| void reset_flow_sensitive_info | ( | tree | name | ) |
Reset all flow sensitive data on NAME such as range-info, nonzero bits and alignment.
References cfun, get_range_query(), NULL, pt_solution::null, reset_flow_sensitive_info(), range_query::reset_range_info(), set_pt_solution(), ssa_name_prange_storage(), and SSA_NAME_RANGE_INFO.
Referenced by combine_blocks(), cond_removal_in_builtin_zero_pattern(), copy_ref_info(), hoist_adjacent_loads(), ifcombine_replace_cond(), move_computations_worker(), move_stmt(), reset_flow_sensitive_info(), reset_flow_sensitive_info_in_bb(), flow_sensitive_info_storage::save_and_clear(), simple_dce_from_worklist(), simplify_phi_result_movdiv(), and value_replacement().
| void reset_flow_sensitive_info_in_bb | ( | basic_block | bb | ) |
Clear all flow sensitive data from all statements and PHI definitions in BB.
References FOR_EACH_SSA_TREE_OPERAND, gimple_phi_result(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), i, reset_flow_sensitive_info(), reset_flow_sensitive_info_in_bb(), and SSA_OP_DEF.
Referenced by ifcombine_replace_cond(), maybe_optimize_guarding_check(), maybe_optimize_range_tests(), replace_block_by(), and reset_flow_sensitive_info_in_bb().
Update the known bits of NAME. Zero bits in MASK cover constant values. Set bits in MASK cover unknown values. VALUE are the known bits.
References gcc_assert, POINTER_TYPE_P, r, set_bitmask(), set_range_info(), and TREE_TYPE.
Referenced by ccp_finalize(), and set_bitmask().
Update the non-zero bits bitmask of NAME.
References gcc_assert, POINTER_TYPE_P, r, set_nonzero_bits(), set_range_info(), and TREE_TYPE.
Referenced by maybe_set_nonzero_bits(), and set_nonzero_bits().
|
static |
Attach PT to NAME, creating range storage if necessary.
References gcc_checking_assert, ggc_alloc_vrange_storage(), POINTER_TYPE_P, prange_storage::pt, set_pt_solution(), ssa_name_prange_storage(), SSA_NAME_RANGE_INFO, and TREE_TYPE.
Referenced by duplicate_ssa_name_ptr_info(), get_pt_solution(), reset_flow_sensitive_info(), and set_pt_solution().
| void set_ptr_info_alignment | ( | tree | name, |
| unsigned int | align, | ||
| unsigned int | misalign ) |
Refine NAME's bitmask with ALIGN and MISALIGN. Preserve the existing information if the requested alignment conflicts with known bits.
References alignment_to_bitmask(), gcc_assert, gcc_checking_assert, irange_bitmask::intersect(), POINTER_TYPE_P, r, range_info_get_range(), range_info_set_range(), set_ptr_info_alignment(), ssa_name_prange_storage(), SSA_NAME_RANGE_INFO, TREE_TYPE, and irange_bitmask::unknown_p().
Referenced by ccp_finalize(), create_array_ref(), create_expression_by_pieces(), duplicate_ssa_name_range_info(), ipcp_update_vr(), lower_builtin_assume_aligned(), maybe_set_nonzero_bits(), set_ptr_info_alignment(), vectorizable_load(), and vectorizable_store().
| void set_ptr_nonnull | ( | tree | name | ) |
Set nonnull attribute to pointer NAME.
References gcc_assert, get_pt_solution(), pt_solution::null, POINTER_TYPE_P, set_ptr_nonnull(), and TREE_TYPE.
Referenced by find_what_p_points_to(), set_ptr_nonnull(), and set_range_info().
Update the range information for NAME, intersecting into an existing range if applicable. Return TRUE if the range was updated.
Sets the value range to SSA.
References cfun, value_range::contains_zero_p(), value_range::dump(), dump_file, fputc(), get_pt_solution(), get_range_query(), gimple_range_global(), value_range::intersect(), pt_solution::null, POINTER_TYPE_P, print_generic_expr(), r, range_info_get_range(), range_info_set_range(), set_ptr_nonnull(), set_range_info(), value_range::set_varying(), SSA_NAME_RANGE_INFO, TDF_SLIM, TREE_TYPE, value_range::undefined_p(), and range_query::update_range_info().
Referenced by assume_query::assume_query(), gimple_ranger::export_global_ranges(), strlen_pass::handle_builtin_string_cmp(), remove_unreachable::handle_early(), strlen_pass::handle_integral_assign(), insert_into_preds_of_block(), ipcp_update_vr(), optimize_spaceship(), dom_ranger::range_of_stmt(), gimple_ranger::register_inferred_ranges(), remove_unreachable::remove(), remove_unreachable::remove_and_update_globals(), set_bitmask(), dom_opt_dom_walker::set_global_ranges_from_unreachable_edges(), set_nonzero_bits(), set_range_info(), set_strlen_range(), simplify_using_ranges::simplify_truth_ops_using_ranges(), value_replacement(), vect_do_peeling(), and vect_gen_vector_loop_niters().
| void set_ssa_name_pt_solution | ( | tree | name, |
| const pt_solution & | pt ) |
Make PT the points-to solution for NAME.
Make PT the points-to solution for NAME, which must have pointer type.
References get_pt_solution(), and set_ssa_name_pt_solution().
Referenced by copy_ref_info(), find_what_p_points_to(), remap_ssa_name(), set_ssa_name_pt_solution(), update_alias_info_with_stack_vars(), and vect_duplicate_ssa_name_ptr_info().
Return TRUE is OP, an SSA_NAME has a range of values [0..1] at the STMT, false otherwise. This can be because it is a boolean type, any unsigned integral type with a single bit of precision, or has known range of [0..1] via range analysis.
References cfun, wi::eq_p(), gcc_assert, get_nonzero_bits(), get_range_query(), INTEGRAL_TYPE_P, r, range_true_and_false(), ssa_name_has_boolean_range(), TREE_CODE, TREE_TYPE, TYPE_PRECISION, and TYPE_UNSIGNED.
Referenced by associate_equivalences_with_edges(), edge_info::derive_equivalences(), expr_has_boolean_range(), get_len_nonzero_value(), record_edge_info(), and ssa_name_has_boolean_range().
|
inlinestatic |
Return NAME's pointer range storage, or NULL if none exists.
References vrange_storage::m_discriminator, NULL, ssa_name_prange_storage(), SSA_NAME_RANGE_INFO, and VR_PRANGE.
Referenced by get_pt_solution(), get_ptr_info_alignment(), mark_ptr_info_alignment_unknown(), range_info_set_range(), reset_flow_sensitive_info(), flow_sensitive_info_storage::restore(), set_pt_solution(), set_ptr_info_alignment(), ssa_name_prange_storage(), and ssa_name_pt_solution().
| const pt_solution * ssa_name_pt_solution | ( | const_tree | name | ) |
Return NAME's points-to solution, or NULL if none exists.
SSA name expresssons routines Copyright (C) 2013-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/>.
Return NAME's points-to solution, or NULL if it has none. Returns NULL for a non pointer type.
References NULL, ssa_name_prange_storage(), and ssa_name_pt_solution().
Referenced by call_may_clobber_ref_p_1(), copy_ref_info(), default_ref_may_alias_errno(), dr_analyze_alias(), dump_alias_info(), dump_points_to_info_for(), dump_ssaname_info(), duplicate_ssa_name_ptr_info(), duplicate_ssa_name_ptr_info(), ipa_icf::sem_item_optimizer::fixup_points_to_sets(), fold_builtin_alloca_with_align(), get_ssa_name_ptr_info_nonnull(), predicate_load_or_store(), ptr_deref_may_alias_auto_p(), ptr_deref_may_alias_decl_p(), ptr_deref_may_alias_global_p(), ptr_derefs_may_alias_p(), ptrs_compare_unequal(), ref_maybe_used_by_call_p_1(), remap_ssa_name(), same_addr_size_stores_p(), flow_sensitive_info_storage::save(), ssa_name_pt_solution(), update_alias_info_with_stack_vars(), vect_create_addr_base_for_vector_ref(), vect_duplicate_ssa_name_ptr_info(), and verify_ssa().
| void ssanames_print_statistics | ( | void | ) |
Dump some simple statistics regarding the re-use of SSA_NAME nodes.
References PRsa, SIZE_AMOUNT, ssa_name_nodes_created, ssa_name_nodes_reused, and ssanames_print_statistics().
Referenced by dump_tree_statistics(), and ssanames_print_statistics().
| DEBUG_FUNCTION void verify_ssaname_freelists | ( | struct function * | fun | ) |
Verify the state of the SSA_NAME lists. There must be no duplicates on the free list. Every name on the free list must be marked as on the free list. Any name on the free list must not appear in the IL. No names can be leaked.
References bitmap_bit_p, bitmap_intersect_p(), bitmap_ior_into(), bitmap_set_bit, bitmap_set_range(), EXECUTE_IF_AND_COMPL_IN_BITMAP, FOR_EACH_BB_FN, FOR_EACH_SSA_TREE_OPERAND, FREE_SSANAMES, FREE_SSANAMES_QUEUE, gcc_assert, gimple_in_ssa_p(), gimple_phi_arg_def(), gimple_phi_num_args(), gimple_phi_result(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), i, names_to_release, num_ssa_names, ssa_name, SSA_NAME_IN_FREE_LIST, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VERSION, SSA_OP_ALL_OPERANDS, TREE_CODE, UNUSED_NAME_VERSION, and verify_ssaname_freelists().
Referenced by verify_ssaname_freelists().
| unsigned int ssa_name_nodes_created |
Referenced by make_ssa_name_fn(), and ssanames_print_statistics().
| unsigned int ssa_name_nodes_reused |
Referenced by make_ssa_name_fn(), and ssanames_print_statistics().