|
GCC Middle and Back End API Reference
|

Go to the source code of this file.
Data Structures | |
| struct | imm_use_iterator |
| struct | auto_end_imm_use_stmt_traverse |
| struct | ssa_op_iter |
Macros | |
| #define | FOR_EACH_IMM_USE_FAST(DEST, ITER, SSAVAR) |
| #define | FOR_EACH_IMM_USE_STMT(STMT, ITER, SSAVAR) |
| #define | FOR_EACH_IMM_USE_ON_STMT(DEST, ITER) |
| #define | SSA_OP_USE 0x01 /* Real USE operands. @endverbatim */ |
| #define | SSA_OP_DEF 0x02 /* Real DEF operands. @endverbatim */ |
| #define | SSA_OP_VUSE 0x04 /* VUSE operands. @endverbatim */ |
| #define | SSA_OP_VDEF 0x08 /* VDEF operands. @endverbatim */ |
| #define | SSA_OP_VIRTUAL_USES (SSA_OP_VUSE) |
| #define | SSA_OP_VIRTUAL_DEFS (SSA_OP_VDEF) |
| #define | SSA_OP_ALL_VIRTUALS (SSA_OP_VIRTUAL_USES | SSA_OP_VIRTUAL_DEFS) |
| #define | SSA_OP_ALL_USES (SSA_OP_VIRTUAL_USES | SSA_OP_USE) |
| #define | SSA_OP_ALL_DEFS (SSA_OP_VIRTUAL_DEFS | SSA_OP_DEF) |
| #define | SSA_OP_ALL_OPERANDS (SSA_OP_ALL_USES | SSA_OP_ALL_DEFS) |
| #define | FOR_EACH_SSA_TREE_OPERAND(TREEVAR, STMT, ITER, FLAGS) |
| #define | FOR_EACH_SSA_USE_OPERAND(USEVAR, STMT, ITER, FLAGS) |
| #define | FOR_EACH_SSA_DEF_OPERAND(DEFVAR, STMT, ITER, FLAGS) |
| #define | FOR_EACH_PHI_ARG(USEVAR, STMT, ITER, FLAGS) |
| #define | FOR_EACH_PHI_OR_STMT_USE(USEVAR, STMT, ITER, FLAGS) |
| #define | FOR_EACH_PHI_OR_STMT_DEF(DEFVAR, STMT, ITER, FLAGS) |
| #define | SINGLE_SSA_TREE_OPERAND(STMT, FLAGS) |
| #define | SINGLE_SSA_USE_OPERAND(STMT, FLAGS) |
| #define | SINGLE_SSA_DEF_OPERAND(STMT, FLAGS) |
| #define | ZERO_SSA_OPERANDS(STMT, FLAGS) |
| #define | NUM_SSA_OPERANDS(STMT, FLAGS) |
Enumerations | |
| enum | ssa_op_iter_type { ssa_op_iter_none = 0 , ssa_op_iter_tree , ssa_op_iter_use , ssa_op_iter_def } |
| #define FOR_EACH_IMM_USE_FAST | ( | DEST, | |
| ITER, | |||
| SSAVAR ) |
Use this iterator when simply looking at stmts. Adding, deleting or modifying stmts will cause this iterator to malfunction.
Referenced by add_ssa_edge(), all_immediate_uses_same_place(), all_uses_feed_or_dominated_by_stmt(), loop_cand::analyze_iloop_reduction_var(), loop_cand::analyze_oloop_reduction_var(), back_propagate_equivalences(), check_forbidden_calls(), check_loop_closed_ssa_def(), check_scan_store(), cleanup_empty_eh_merge_phis(), compute_added_num_insns(), convert_mult_to_fma(), create_rdg_edges_for_scalar(), do_warn_nonnull_compare(), dse_classify_store(), dump_immediate_uses_for(), execute_cse_reciprocals_1(), expand_gimple_basic_block(), crc_optimization::find_shift_after_xor(), find_tail_calls(), find_uninit_use(), fully_replaceable(), gather_imm_use_stmts(), get_reassociation_width(), gimple_lower_bitint(), ifcvt_local_dce(), insert_debug_temp_for_var_def(), is_cond_scalar_reduction(), is_factor_profitable(), is_feasible_trace(), ipa_param_body_adjustments::mark_clobbers_dead(), ipa_param_body_adjustments::mark_dead_statements(), mark_ssa_maybe_undefs(), match_arith_overflow(), match_uaddc_usubc(), maybe_duplicate_comparison(), maybe_optimize_arith_overflow(), maybe_optimize_mod_cmp(), maybe_warn_operand(), nearest_common_dominator_of_uses(), no_side_effect_bb(), optimize_mask_stores(), optimize_successive_divisions_p(), optimize_vector_load(), parloops_is_simple_reduction(), prepare_use_sites_for(), propagate_bias_p(), propagate_with_phi(), infer_range_manager::register_all_uses(), remove_unreachable::remove_and_update_globals(), set_var_live_on_entry(), simple_dce_from_worklist(), pcom_worker::single_nonlooparound_use(), single_use_in_loop(), sink_common_stores_to_bb(), spaceship_replacement(), ssa_name_any_use_dominates_bb_p(), ssa_name_has_uses_outside_loop_p(), statement_sink_location(), stmt_local_def(), trivially_conflicts_p(), try_create_reduction_list(), unroll_jam_possible_p(), use_in_zero_equality(), used_outside_loop_p(), uses_in_bb(), var_is_used_for_virtual_call_p(), vect_analyze_slp_reduc_chain(), vect_create_epilog_for_reduction(), vect_determine_min_output_precision_1(), vect_is_simple_reduction(), vect_phi_first_order_recurrence_p(), vect_stmt_relevant_p(), vectorizable_induction(), vectorizable_scan_store(), and warn_uninit_phi_uses().
| #define FOR_EACH_IMM_USE_ON_STMT | ( | DEST, | |
| ITER ) |
Use this iterator in combination with FOR_EACH_IMM_USE_STMT to
get access to each occurrence of ssavar on the stmt returned by
that iterator.. for instance:
FOR_EACH_IMM_USE_STMT (stmt, iter, ssavar)
{
FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
{
SET_USE (use_p, blah);
}
update_stmt (stmt);
}
Referenced by adjust_debug_stmts_now(), check_reduction_path(), clean_up_loop_closed_phi(), combine_blocks(), execute_cse_reciprocals_1(), expand_gimple_basic_block(), fold_loop_internal_call(), generate_reduction_builtin_1(), gimple_lower_bitint(), gimple_merge_blocks(), insert_backedge_copies(), insert_debug_temp_for_var_def(), insert_phi_nodes(), ipa_analyze_controlled_uses(), make_new_ssa_for_def(), tree_loop_interchange::map_inductions_to_loop(), mark_virtual_operand_for_renaming(), maybe_optimize_range_tests(), move_block_to_fn(), move_early_exit_stmts(), record_equivalences_from_phis(), remove_dead_phis(), remove_unused_ivs(), replace_uses_by(), replace_uses_in_bb_by(), ipa_param_body_adjustments::reset_debug_stmts(), shrink_wrap_one_built_in_call_with_conds(), simd_clone_adjust(), sink_clobbers(), sink_code_in_bb(), loop_cand::undo_simple_reduction(), unlink_stmt_vdef(), unsplit_eh(), value_replacement(), vect_create_epilog_for_reduction(), vect_update_ivs_after_vectorizer(), vectorizable_live_operation(), and verify_bb_vtables().
| #define FOR_EACH_IMM_USE_STMT | ( | STMT, | |
| ITER, | |||
| SSAVAR ) |
Use this iterator to visit each stmt which has a use of SSAVAR. The destructor of the auto_end_imm_use_stmt_traverse object deals with removing ITER from SSAVAR's IMM_USE list even when leaving the scope early.
Referenced by adjust_debug_stmts_now(), asan_expand_poison_ifn(), base_names_in_chain_on(), check_reduction_path(), check_retval_uses(), clean_up_loop_closed_phi(), combine_blocks(), compute_dependence_clique(), convert_mult_to_fma_1(), convert_to_divmod(), do_simple_agr_dse(), dse_optimize_call(), dse_optimize_redundant_stores(), eliminate_unnecessary_stmts(), execute_cse_conv_1(), execute_cse_reciprocals_1(), execute_cse_sincos_1(), expand_gimple_basic_block(), final_value_replacement_loop(), find_implicit_erroneous_behavior(), fold_loop_internal_call(), generate_reduction_builtin_1(), gimple_lower_bitint(), gimple_merge_blocks(), handle_return_addr_local_phi_arg(), insert_backedge_copies(), insert_clobber_before_stack_restore(), insert_debug_temp_for_var_def(), insert_phi_nodes(), ipa_analyze_controlled_uses(), crc_symbolic_execution::is_used_outside_the_loop(), make_new_ssa_for_def(), tree_loop_interchange::map_inductions_to_loop(), mark_virtual_operand_for_renaming(), match_arith_overflow(), maybe_optimize_arith_overflow(), maybe_optimize_range_tests(), move_block_to_fn(), move_early_exit_stmts(), neuter_worker_single(), note_simd_array_uses(), optimize_aggr_zeroprop(), optimize_agr_copyprop(), optimize_recip_sqrt(), optimize_vector_load(), predicate_rhs_code(), propagate_with_phi(), purge_all_uses(), record_equivalences_from_phis(), release_defs_bitset(), remove_dead_phis(), remove_unused_ivs(), replace_uses_by(), replace_uses_in_bb_by(), ipa_param_body_adjustments::reset_debug_stmts(), reset_debug_uses(), sese_reset_debug_liveouts(), shrink_wrap_one_built_in_call_with_conds(), simd_clone_adjust(), simplify_builtin_call(), sink_clobbers(), sink_code_in_bb(), loop_cand::undo_simple_reduction(), unlink_stmt_vdef(), unsplit_eh(), uses_consumed_by_stmt(), value_replacement(), vec_slp_has_scalar_use(), vect_bb_slp_mark_live_stmts(), vect_bb_slp_scalar_cost(), vect_create_epilog_for_reduction(), vect_do_peeling(), vect_update_ivs_after_vectorizer(), vectorizable_live_operation(), and verify_bb_vtables().
| #define FOR_EACH_PHI_ARG | ( | USEVAR, | |
| STMT, | |||
| ITER, | |||
| FLAGS ) |
This macro will execute a loop over all the arguments of a PHI which match FLAGS. A use_operand_p is always returned via USEVAR. FLAGS can be either SSA_OP_USE or SSA_OP_VIRTUAL_USES or SSA_OP_ALL_USES.
Referenced by check_all_va_list_escapes(), determine_max_movement(), find_deriving_biv_for_expr(), find_ssa_names_to_propagate(), ifcombine_replace_cond(), last_fma_candidate_feeds_initial_phi(), link_use_stmts_after(), move_block_to_fn(), optimize_va_list_gpr_fpr_size(), propagate_with_phi(), remove_gimple_phi_args(), remove_unused_locals(), and sese_build_liveouts_bb().
| #define FOR_EACH_PHI_OR_STMT_DEF | ( | DEFVAR, | |
| STMT, | |||
| ITER, | |||
| FLAGS ) |
This macro will execute a loop over a stmt, regardless of whether it is a real stmt or a PHI node, looking at the DEF nodes matching FLAGS.
Referenced by create_rdg_flow_edges(), insert_debug_temps_for_defs(), reset_debug_uses(), separate_decls_in_region_stmt(), vect_bb_slp_mark_live_stmts(), vect_bb_slp_scalar_cost(), and vect_stmt_relevant_p().
| #define FOR_EACH_PHI_OR_STMT_USE | ( | USEVAR, | |
| STMT, | |||
| ITER, | |||
| FLAGS ) |
This macro will execute a loop over a stmt, regardless of whether it is a real stmt or a PHI node, looking at the USE nodes matching FLAGS.
Referenced by compute_added_num_insns(), convert_mult_to_fma(), delink_stmt_imm_use(), find_interesting_uses_stmt(), find_invariants_stmt(), ifcvt_local_dce(), tree_loop_interchange::map_inductions_to_loop(), movement_possibility(), ipa_param_body_adjustments::prepare_debug_expressions(), separate_decls_in_region_debug(), separate_decls_in_region_stmt(), simple_dce_from_worklist(), update_debug_stmt(), and vect_mark_stmts_to_be_vectorized().
| #define FOR_EACH_SSA_DEF_OPERAND | ( | DEFVAR, | |
| STMT, | |||
| ITER, | |||
| FLAGS ) |
This macro executes a loop over the operands of STMT specified in FLAG, returning each operand as a 'def_operand_p' in the variable DEFVAR. ITER is an ssa_op_iter structure used to control the loop.
Referenced by defs_to_varying(), gimple_duplicate_bb(), insert_phi_nodes(), ipa_param_body_adjustments::modify_cfun_body(), prepare_block_for_update_1(), release_defs_bitset(), rewrite_stmt(), rewrite_update_stmt(), stmt_has_scalar_dependences_outside_loop(), and vect_do_peeling().
| #define FOR_EACH_SSA_TREE_OPERAND | ( | TREEVAR, | |
| STMT, | |||
| ITER, | |||
| FLAGS ) |
This macro executes a loop over the operands of STMT specified in FLAG, returning each operand as a 'tree' in the variable TREEVAR. ITER is an ssa_op_iter structure used to control the loop.
Referenced by auto_flow_sensitive::auto_flow_sensitive(), bb_no_side_effects_p(), build_bitint_stmt_ssa_conflicts(), build_ssa_conflict_graph(), ccp_initialize(), check_all_va_list_escapes(), check_loop_closed_ssa_bb(), combine_blocks(), compute_avail(), determine_max_movement(), eliminate_dom_walker::eliminate_stmt(), empty_bb_or_one_feeding_into_p(), empty_bb_without_guard_p(), expand_gimple_basic_block(), expand_simple_operations(), find_loop_guard(), find_necessary_statements(), find_replaceable_in_bb(), find_unswitching_predicates_for_bb(), find_uses_to_rename_stmt(), fp_expression_p(), get_rank(), gimple_lower_bitint(), has_use_on_stmt(), hoist_defs_of_uses(), ifcombine_replace_cond(), init_copy_prop(), is_simple_and_all_uses_invariant(), simplify_using_ranges::legacy_fold_cond(), likely_value(), mark_def_sites(), back_threader::maybe_thread_block(), num_ssa_operands(), process_bb(), process_replaceable(), propagate_necessity(), release_defs(), reset_flow_sensitive_info_in_bb(), should_duplicate_loop_header_p(), split_function(), stmt_semi_invariant_p_1(), verify_ssa(), verify_ssaname_freelists(), visit_bb(), ccp_propagate::visit_stmt(), copy_prop::visit_stmt(), will_be_nonconstant_predicate(), and worker_single_simple().
| #define FOR_EACH_SSA_USE_OPERAND | ( | USEVAR, | |
| STMT, | |||
| ITER, | |||
| FLAGS ) |
This macro executes a loop over the operands of STMT specified in FLAG, returning each operand as a 'use_operand_p' in the variable USEVAR. ITER is an ssa_op_iter structure used to control the loop.
Referenced by add_scope_conflicts_1(), adjust_before_returns_twice_call(), avoid_deep_ter_for_debug(), bump_vector_ptr(), cprop_into_stmt(), eliminate_dom_walker::eliminate_stmt(), eliminate_unnecessary_stmts(), estimate_threading_killed_stmts(), find_deps_in_bb_for_stmt(), find_ssa_names_to_propagate(), gimple_lower_bitint(), hoist_defs_of_uses(), invariant_in_sese_p_rec(), link_use_stmts_after(), mark_def_sites(), prepare_block_for_update_1(), jt_state::register_equivs_stmt(), rename_variables_in_bb(), reorder_operands(), replace_abnormal_ssa_names(), substitute_and_fold_engine::replace_uses_in(), rewrite_debug_stmt_uses(), rewrite_stmt(), rewrite_update_stmt(), sese_build_liveouts_bb(), ssa_propagation_engine::simulate_stmt(), split_function(), statement_sink_location(), stmt_references_abnormal_ssa_name(), stmt_update_dep_bb(), update_ssa(), vect_loop_versioning(), verify_ssa(), operands_scanner::verify_ssa_operands(), and warn_uninitialized_vars().
| #define NUM_SSA_OPERANDS | ( | STMT, | |
| FLAGS ) |
This macro counts the number of operands in STMT matching FLAGS.
Referenced by collect_dfa_stats(), and jt_state::register_equivs_stmt().
| #define SINGLE_SSA_DEF_OPERAND | ( | STMT, | |
| FLAGS ) |
This macro returns an operand in STMT as a def_operand_p if it is the ONLY operand matching FLAGS. If there are 0 or more than 1 operand matching FLAGS, then NULL_DEF_OPERAND_P is returned.
Referenced by expand_gimple_basic_block(), and stmt_local_def().
| #define SINGLE_SSA_TREE_OPERAND | ( | STMT, | |
| FLAGS ) |
This macro returns an operand in STMT as a tree if it is the ONLY operand matching FLAGS. If there are 0 or more than 1 operand matching FLAGS, then NULL_TREE is returned.
Referenced by chain_of_csts_start(), expr_coherent_p(), process_replaceable(), ssa_is_replaceable_p(), and ter_is_replaceable_p().
| #define SINGLE_SSA_USE_OPERAND | ( | STMT, | |
| FLAGS ) |
This macro returns an operand in STMT as a use_operand_p if it is the ONLY operand matching FLAGS. If there are 0 or more than 1 operand matching FLAGS, then NULL_USE_OPERAND_P is returned.
Referenced by find_replaceable_in_bb().
| #define SSA_OP_ALL_DEFS (SSA_OP_VIRTUAL_DEFS | SSA_OP_DEF) |
Referenced by ccp_initialize(), check_loop_closed_ssa_bb(), defs_to_varying(), eliminate_dom_walker::eliminate_stmt(), gimple_duplicate_bb(), init_copy_prop(), mark_def_sites(), op_iter_init_use(), process_bb(), _slp_tree::push_vec_def(), release_defs(), rewrite_stmt(), rewrite_update_stmt(), simple_dce_from_worklist(), statement_sink_location(), verify_ssa(), ccp_propagate::visit_stmt(), and copy_prop::visit_stmt().
| #define SSA_OP_ALL_OPERANDS (SSA_OP_ALL_USES | SSA_OP_ALL_DEFS) |
Referenced by gimple_lower_bitint(), and verify_ssaname_freelists().
| #define SSA_OP_ALL_USES (SSA_OP_VIRTUAL_USES | SSA_OP_USE) |
Referenced by check_all_va_list_escapes(), delink_stmt_imm_use(), mark_def_sites(), op_iter_init_def(), jt_state::register_equivs_stmt(), remove_unused_locals(), rename_variables_in_bb(), rewrite_into_loop_closed_ssa(), rewrite_stmt(), rewrite_update_stmt(), statement_sink_location(), and update_ssa().
| #define SSA_OP_ALL_VIRTUALS (SSA_OP_VIRTUAL_USES | SSA_OP_VIRTUAL_DEFS) |
| #define SSA_OP_DEF 0x02 /* Real DEF operands. @endverbatim */ |
Referenced by auto_flow_sensitive::auto_flow_sensitive(), build_bitint_stmt_ssa_conflicts(), build_ssa_conflict_graph(), collect_dfa_stats(), combine_blocks(), compute_avail(), create_rdg_flow_edges(), eliminate_dom_walker::eliminate_stmt(), empty_bb_without_guard_p(), expand_gimple_basic_block(), find_replaceable_in_bb(), fp_expression_p(), gsi_advance_bw_nondebug_nonlocal(), hoist_defs_of_uses(), ifcombine_replace_cond(), insert_debug_temps_for_defs(), insert_phi_nodes(), ipa_param_body_adjustments::modify_cfun_body(), op_iter_init(), op_iter_init_def(), op_iter_init_phidef(), op_iter_next_def(), op_iter_next_tree(), prepare_block_for_update_1(), process_bb(), process_replaceable(), release_defs_bitset(), reset_debug_uses(), reset_flow_sensitive_info_in_bb(), separate_decls_in_region_stmt(), single_phi_def(), ssa_is_replaceable_p(), stmt_has_scalar_dependences_outside_loop(), stmt_local_def(), ter_is_replaceable_p(), vect_bb_slp_mark_live_stmts(), vect_bb_slp_scalar_cost(), vect_do_peeling(), vect_stmt_relevant_p(), visit_bb(), and worker_single_simple().
| #define SSA_OP_USE 0x01 /* Real USE operands. @endverbatim */ |
NOTE: Keep these in sync with doc/tree-ssa.texi.
These flags are used to determine which operands are returned during execution of the loop.
Referenced by add_scope_conflicts_1(), adjust_before_returns_twice_call(), avoid_deep_ter_for_debug(), bb_no_side_effects_p(), build_bitint_stmt_ssa_conflicts(), build_ssa_conflict_graph(), bump_vector_ptr(), chain_of_csts_start(), check_all_va_list_escapes(), check_reduction_path(), collect_dfa_stats(), compute_added_num_insns(), compute_avail(), convert_mult_to_fma(), cprop_into_stmt(), determine_max_movement(), eliminate_dom_walker::eliminate_stmt(), eliminate_unnecessary_stmts(), empty_bb_or_one_feeding_into_p(), estimate_threading_killed_stmts(), expand_gimple_basic_block(), expand_simple_operations(), expr_coherent_p(), find_deps_in_bb_for_stmt(), find_deriving_biv_for_expr(), find_interesting_uses_stmt(), find_invariants_stmt(), find_loop_guard(), find_necessary_statements(), find_replaceable_in_bb(), find_ssa_names_to_propagate(), find_unswitching_predicates_for_bb(), find_uses_to_rename_bb(), fp_expression_p(), get_rank(), gimple_lower_bitint(), has_use_on_stmt(), hoist_defs_of_uses(), ifcombine_replace_cond(), ifcvt_local_dce(), invariant_in_sese_p_rec(), is_simple_and_all_uses_invariant(), last_fma_candidate_feeds_initial_phi(), simplify_using_ranges::legacy_fold_cond(), likely_value(), link_use_stmts_after(), tree_loop_interchange::map_inductions_to_loop(), mark_def_sites(), mark_stmt_if_obviously_necessary(), back_threader::maybe_thread_block(), move_block_to_fn(), movement_possibility(), op_iter_init(), op_iter_init_phiuse(), op_iter_init_use(), optimize_va_list_gpr_fpr_size(), prepare_block_for_update_1(), ipa_param_body_adjustments::prepare_debug_expressions(), process_replaceable(), propagate_necessity(), propagate_with_phi(), remove_gimple_phi_args(), reorder_operands(), replace_abnormal_ssa_names(), substitute_and_fold_engine::replace_uses_in(), rewrite_debug_stmt_uses(), rewrite_update_stmt(), separate_decls_in_region_debug(), separate_decls_in_region_stmt(), sese_build_liveouts_bb(), should_duplicate_loop_header_p(), simple_dce_from_worklist(), ssa_propagation_engine::simulate_stmt(), split_function(), stmt_may_generate_copy(), stmt_references_abnormal_ssa_name(), stmt_semi_invariant_p_1(), stmt_update_dep_bb(), update_debug_stmt(), vect_loop_versioning(), vect_mark_stmts_to_be_vectorized(), vect_transform_slp_perm_load_1(), verify_ssa(), operands_scanner::verify_ssa_operands(), visit_bb(), warn_uninitialized_vars(), and will_be_nonconstant_predicate().
| #define SSA_OP_VDEF 0x08 /* VDEF operands. @endverbatim */ |
Referenced by op_iter_init(), op_iter_next_def(), and op_iter_next_tree().
| #define SSA_OP_VIRTUAL_DEFS (SSA_OP_VDEF) |
Referenced by op_iter_init_phidef(), and single_phi_def().
| #define SSA_OP_VIRTUAL_USES (SSA_OP_VUSE) |
These are commonly grouped operand flags.
Referenced by find_uses_to_rename_bb(), find_uses_to_rename_stmt(), link_use_stmts_after(), and op_iter_init_phiuse().
| #define SSA_OP_VUSE 0x04 /* VUSE operands. @endverbatim */ |
Referenced by op_iter_init(), and verify_ssa().
| #define ZERO_SSA_OPERANDS | ( | STMT, | |
| FLAGS ) |
This macro returns TRUE if there are no operands matching FLAGS in STMT.
Referenced by gsi_advance_bw_nondebug_nonlocal().
| enum ssa_op_iter_type |
|
inline |
This functions clears the iterator PTR, and marks it done. This is normally used to prevent warnings in the compile about might be uninitialized components.
References ssa_op_iter::done, ssa_op_iter::flags, ssa_op_iter::i, ssa_op_iter::iter_type, NULL, ssa_op_iter::numops, ssa_op_iter_none, ssa_op_iter::stmt, and ssa_op_iter::uses.
Referenced by op_iter_init_phidef(), and op_iter_init_phiuse().
|
inline |
Delink an immediate_uses node from its chain.
References gcc_assert, ssa_use_operand_t::loc, ssa_use_operand_t::next, NULL, ssa_use_operand_t::prev, ssa_use_operand_t::stmt, TREE_CODE, and USE_FROM_PTR.
Referenced by delink_stmt_imm_use(), operands_scanner::finalize_ssa_uses(), free_stmt_operands(), move_use_after_head(), release_phi_node(), release_ssa_name_fn(), remove_phi_arg_num(), and set_ssa_use_from_ptr().
|
inline |
Delink all immediate_use information for STMT.
References cfun, delink_imm_use(), FOR_EACH_PHI_OR_STMT_USE, SSA_OP_ALL_USES, and ssa_operands_active().
Referenced by add_bb_predicate_gimplified_stmts(), expand_gimple_basic_block(), gsi_remove(), and gsi_replace().
|
inline |
Return TRUE if the last use on the stmt IMM refers to has been visited.
References imm_use_iterator::imm_use, and imm_use_iterator::next_stmt_use.
Referenced by next_imm_use_on_stmt().
|
inline |
Return true is IMM has reached the end of the immediate use stmt list.
References imm_use_iterator::end_p, and imm_use_iterator::imm_use.
Referenced by first_imm_use_stmt(), next_imm_use_stmt(), and vec_slp_has_scalar_use().
|
inline |
Forward declare for use in the class below.
Referenced by auto_end_imm_use_stmt_traverse::~auto_end_imm_use_stmt_traverse().
|
inline |
Finished the traverse of an immediate use stmt list IMM by removing the placeholder node from the list.
References NULL.
|
inline |
Return true is IMM has reached the end of the immediate use list.
References imm_use_iterator::end_p, and imm_use_iterator::imm_use.
Referenced by first_readonly_imm_use(), and next_readonly_imm_use().
|
inline |
This routine will return the first use on the stmt IMM currently refers to.
References imm_use_iterator::imm_use, ssa_use_operand_t::next, and imm_use_iterator::next_imm_name.
|
inline |
Initialize IMM to traverse over uses of VAR. Return the first statement.
References end_imm_use_stmt_p(), imm_use_iterator::end_p, gcc_assert, imm_use_iterator::imm_use, link_use_stmts_after(), imm_use_iterator::name, ssa_use_operand_t::next, imm_use_iterator::next_imm_name, imm_use_iterator::next_stmt_use, NULL, NULL_USE_OPERAND_P, ssa_use_operand_t::ssa_name, SSA_NAME_IMM_USE_NODE, and USE_STMT.
|
inline |
Initialize iterator IMM to process the list for VAR.
References imm_use_iterator::end_p, end_readonly_imm_use_p(), imm_use_iterator::imm_use, imm_use_iterator::name, ssa_use_operand_t::next, imm_use_iterator::next_stmt_use, NULL_USE_OPERAND_P, ssa_use_operand_t::ssa_name, and SSA_NAME_IMM_USE_NODE.
Use this to get a vector of all gimple stmts using SSAVAR without duplicates. It's cheaper than FOR_EACH_IMM_USE_STMT and has no constraints on what you are allowed to do inside an iteration over the vector.
Gather all stmts SSAVAR is used on, eliminating duplicates.
References FOR_EACH_IMM_USE_FAST, gimple::ilf, and USE_STMT.
Referenced by forward_propagate_addr_expr().
|
inline |
Return true if VAR has a single nondebug use.
References is_gimple_debug(), ssa_use_operand_t::next, SSA_NAME_IMM_USE_NODE, and USE_STMT.
Referenced by strlen_pass::adjust_last_stmt(), attempt_builtin_copysign(), ccmp_candidate_p(), cleanup_empty_eh_merge_phis(), compute_invariantness(), convert_expand_mult_copysign(), convert_mult_to_fma(), convert_mult_to_highpart(), convert_plusminus_to_widen(), create_add_imm_cand(), create_add_ssa_cand(), create_coalesce_list_for_region(), create_mul_imm_cand(), create_mul_ssa_cand(), dump_immediate_uses_for(), edge_forwards_cmp_to_conditional_jump_through_empty_bb_p(), factor_out_conditional_operation(), factor_out_operators(), fold_strstr_to_strncmp(), follow_single_use_edges(), forward_propagate_addr_expr(), get_name_for_bit_test(), get_ops(), get_prop_source_stmt(), gimple_lower_bitint(), is_cond_scalar_reduction(), is_reassociable_op(), match_single_bit_test(), match_uaddc_usubc(), maybe_optimize_range_tests(), negate_value(), oacc_entry_exit_ok_1(), optimize_stack_restore(), propagate_op_to_single_use(), recognise_vec_perm_simplify_seq(), record_equality(), rewrite_bittest(), simplify_permutation(), simplify_rotate(), slsr_process_cast(), slsr_process_copy(), split_constant_offset_1(), try_special_add_to_ops(), uaddc_cast(), uaddc_ne0(), update_ops(), vect_look_through_possible_promotion(), vect_recog_popcount_clz_ctz_ffs_pattern(), vect_slp_check_for_roots(), and zero_one_operation().
|
inline |
Return true if VAR has no nondebug uses.
References is_gimple_debug(), ssa_use_operand_t::next, SSA_NAME_IMM_USE_NODE, and USE_STMT.
Referenced by equiv_oracle::add_partial_equiv(), asan_expand_poison_ifn(), coalesce_with_default(), compute_avail(), convert_mult_to_fma(), dse_classify_store(), dump_immediate_uses_for(), eliminate_dom_walker::eliminate_cleanup(), eliminate_dom_walker::eliminate_stmt(), eliminate_useless_phis(), expand_debug_expr(), factor_out_operators(), forward_propagate_addr_expr(), ipa_param_body_adjustments::get_ddef_if_exists_and_is_used(), get_undefined_value_partitions(), ipa_analyze_controlled_uses(), match_arith_overflow(), maybe_remove_forwarder_block(), ompdevlow_adjust_simt_enter(), optimize_mask_stores(), parloops_is_simple_reduction(), partition_view_init(), populate_coalesce_list_for_outofssa(), process_bb(), reassociate_bb(), remove_gimple_phi_args(), remove_prop_source_from_use(), remove_visited_stmt_chain(), replace_uses_by(), simd_clone_adjust(), simple_dce_from_worklist(), statement_sink_location(), vect_is_simple_reduction(), and verify_live_on_entry().
|
inline |
Link ssa_imm_use node LINKNODE into the chain for DEF.
References gcc_checking_assert, link_imm_use_to_list(), NULL, ssa_use_operand_t::prev, SSA_NAME_IMM_USE_NODE, TREE_CODE, and ssa_use_operand_t::use.
Referenced by link_imm_use_stmt(), relink_imm_use_stmt(), and set_ssa_use_from_ptr().
|
inline |
Link ssa_imm_use node LINKNODE into the chain for DEF, with use occurring in STMT.
References link_imm_use(), ssa_use_operand_t::loc, NULL, and ssa_use_operand_t::stmt.
Referenced by add_use_op(), and lower_emutls_phi_arg().
|
inline |
Link ssa_imm_use node LINKNODE into the chain for LIST.
References ssa_use_operand_t::next, and ssa_use_operand_t::prev.
Referenced by link_imm_use(), and move_use_after_head().
|
inline |
This routine will relink all uses with the same stmt as HEAD into the list immediately following HEAD for iterator IMM and returns the last use on that stmt.
References dyn_cast(), FOR_EACH_PHI_ARG, FOR_EACH_SSA_USE_OPERAND, gimple_vuse_op(), is_gimple_reg(), move_use_after_head(), NULL_USE_OPERAND_P, SSA_OP_USE, SSA_OP_VIRTUAL_USES, USE_FROM_PTR, and USE_STMT.
Referenced by first_imm_use_stmt(), and next_imm_use_stmt().
|
inline |
Immediate use traversal of uses within a stmt require that all the uses on a stmt be sequentially listed. This routine is used to build up this sequential list by adding USE_P to the end of the current list currently delimited by HEAD and LAST_P. The new LAST_P value is returned.
References delink_imm_use(), gcc_checking_assert, link_imm_use_to_list(), ssa_use_operand_t::next, and USE_FROM_PTR.
Referenced by link_use_stmts_after().
|
inline |
Bump to the next use on the stmt IMM refers to, return NULL if done.
References end_imm_use_on_stmt_p(), imm_use_iterator::imm_use, ssa_use_operand_t::next, imm_use_iterator::next_imm_name, and NULL_USE_OPERAND_P.
|
inline |
Bump IMM to the next stmt which has a use of var.
References end_imm_use_stmt_p(), imm_use_iterator::imm_use, link_use_stmts_after(), imm_use_iterator::name, ssa_use_operand_t::next, imm_use_iterator::next_stmt_use, NULL, and USE_STMT.
|
inline |
Bump IMM to the next use in the list.
References end_readonly_imm_use_p(), gcc_assert, imm_use_iterator::imm_use, ssa_use_operand_t::next, imm_use_iterator::next_stmt_use, and NULL_USE_OPERAND_P.
|
inline |
Return the number of nondebug immediate uses of VAR.
References is_gimple_debug(), MAY_HAVE_DEBUG_BIND_STMTS, ssa_use_operand_t::next, SSA_NAME_IMM_USE_NODE, and USE_STMT.
Referenced by dump_immediate_uses_for(), match_uaddc_usubc(), recognise_vec_perm_simplify_seq(), and simplify_permutation().
|
inline |
Return the number of operands matching FLAGS in STMT.
References FOR_EACH_SSA_TREE_OPERAND, and gcc_checking_assert.
|
inline |
-----------------------------------------------------------------------
The following set of routines are used to iterator over various type of SSA operands.
Return true if PTR is finished iterating.
References ssa_op_iter::done.
Referenced by single_ssa_def_operand(), single_ssa_tree_operand(), single_ssa_use_operand(), and zero_ssa_operands().
|
inline |
Initialize the iterator PTR to the virtual defs in STMT.
References as_a(), ssa_op_iter::done, ssa_op_iter::flags, gcc_checking_assert, gimple_asm_noutputs(), gimple_use_ops(), gimple_vuse(), ssa_op_iter::i, use_optype_d::next, NULL, NULL_TREE, ssa_op_iter::numops, SSA_OP_DEF, SSA_OP_USE, SSA_OP_VDEF, SSA_OP_VUSE, ssa_op_iter::stmt, and ssa_op_iter::uses.
Referenced by op_iter_init_def(), op_iter_init_tree(), and op_iter_init_use().
|
inline |
Initialize iterator PTR to the def operands in STMT based on FLAGS. Return the first def.
References gcc_checking_assert, ssa_op_iter::iter_type, op_iter_init(), op_iter_next_def(), SSA_OP_ALL_USES, SSA_OP_DEF, and ssa_op_iter_def.
Referenced by single_ssa_def_operand().
|
inline |
Start an iterator for a PHI definition.
References clear_and_done_ssa_iter(), comp, ssa_op_iter::done, gcc_checking_assert, gimple_phi_result(), gimple_phi_result_ptr(), is_gimple_reg(), ssa_op_iter::iter_type, NULL_DEF_OPERAND_P, SSA_OP_DEF, ssa_op_iter_def, and SSA_OP_VIRTUAL_DEFS.
|
inline |
Initialize the iterator PTR for uses matching FLAGS in PHI. FLAGS should be either SSA_OP_USES or SSA_OP_VIRTUAL_USES.
References clear_and_done_ssa_iter(), comp, ssa_op_iter::done, ssa_op_iter::flags, gcc_checking_assert, gimple_phi_num_args(), gimple_phi_result(), is_gimple_reg(), ssa_op_iter::iter_type, NULL_USE_OPERAND_P, ssa_op_iter::numops, op_iter_next_use(), ssa_op_iter_use, SSA_OP_USE, SSA_OP_VIRTUAL_USES, and ssa_op_iter::stmt.
Referenced by check_reduction_path().
|
inline |
Initialize iterator PTR to the operands in STMT based on FLAGS. Return the first operand as a tree.
References ssa_op_iter::iter_type, op_iter_init(), op_iter_next_tree(), and ssa_op_iter_tree.
Referenced by single_ssa_tree_operand(), and zero_ssa_operands().
|
inline |
Initialize iterator PTR to the use operands in STMT based on FLAGS. Return the first use.
References gcc_checking_assert, ssa_op_iter::iter_type, op_iter_init(), op_iter_next_use(), SSA_OP_ALL_DEFS, ssa_op_iter_use, and SSA_OP_USE.
Referenced by check_reduction_path(), and single_ssa_use_operand().
|
inline |
Get the next iterator def value for PTR.
References ssa_op_iter::done, ssa_op_iter::flags, gcc_checking_assert, gimple_op_ptr(), gimple_vdef_ptr(), ssa_op_iter::i, is_gimple_reg(), ssa_op_iter::iter_type, NULL_DEF_OPERAND_P, ssa_op_iter::numops, SSA_OP_DEF, ssa_op_iter_def, SSA_OP_VDEF, ssa_op_iter::stmt, TREE_CODE, and TREE_VALUE.
Referenced by op_iter_init_def(), and single_ssa_def_operand().
|
inline |
Get the next iterator tree value for PTR.
References ssa_op_iter::done, ssa_op_iter::flags, gcc_checking_assert, gimple_op(), gimple_vdef(), ssa_op_iter::i, is_gimple_reg(), ssa_op_iter::iter_type, use_optype_d::next, NULL_TREE, ssa_op_iter::numops, SSA_OP_DEF, ssa_op_iter_tree, SSA_OP_VDEF, ssa_op_iter::stmt, TREE_CODE, TREE_VALUE, USE_OP, and ssa_op_iter::uses.
Referenced by op_iter_init_tree(), and single_ssa_tree_operand().
|
inline |
Get the next iterator use value for PTR.
References ssa_op_iter::done, gcc_checking_assert, ssa_op_iter::i, ssa_op_iter::iter_type, use_optype_d::next, NULL_USE_OPERAND_P, ssa_op_iter::numops, PHI_ARG_DEF_PTR, ssa_op_iter_use, ssa_op_iter::stmt, USE_OP_PTR, and ssa_op_iter::uses.
Referenced by check_reduction_path(), op_iter_init_phiuse(), op_iter_init_use(), and single_ssa_use_operand().
|
inline |
Relink a new node in place of an old node in the list.
References gcc_checking_assert, ssa_use_operand_t::next, NULL, ssa_use_operand_t::prev, and ssa_use_operand_t::use.
Referenced by relink_imm_use_stmt(), and remove_phi_arg_num().
|
inline |
Relink ssa_imm_use node LINKNODE into the chain for OLD, with use occurring in STMT.
References link_imm_use(), ssa_use_operand_t::loc, NULL, relink_imm_use(), and ssa_use_operand_t::stmt.
Referenced by resize_phi_node().
|
inline |
Set the value of a use pointed to by USE to VAL.
References delink_imm_use(), and link_imm_use().
|
inline |
If VAR has only a single immediate nondebug use, return true, and set USE_P and STMT to the use pointer and stmt of occurrence.
References is_gimple_debug(), ssa_use_operand_t::loc, ssa_use_operand_t::next, NULL, NULL_USE_OPERAND_P, return_false, single_imm_use_1(), SSA_NAME_IMM_USE_NODE, ssa_use_operand_t::stmt, and USE_STMT.
Referenced by all_uses_feed_or_dominated_by_stmt(), loop_cand::analyze_iloop_reduction_var(), loop_cand::analyze_oloop_reduction_var(), arith_overflow_check_p(), branch_fixup(), check_scan_store(), convert_mult_to_fma(), convert_mult_to_fma_1(), create_call_for_reduction_1(), do_simple_agr_dse(), dse_classify_store(), empty_bb_or_one_feeding_into_p(), expand_call_inline(), expand_mul_overflow(), final_range_test_p(), find_foldable_builtin_expect(), find_uninit_use(), gather_scalar_reductions(), get_single_immediate_use(), gimple_lower_bitint(), vec_info::lookup_single_use(), match_arith_overflow(), maybe_optimize_range_tests(), maybe_remove_forwarder_block(), oacc_entry_exit_ok_1(), ompdevlow_adjust_simt_enter(), phi_rank(), propagate_op_to_single_use(), propagate_with_phi(), rewrite_bittest(), sanopt_optimize_walker(), simplify_using_ranges::simplify(), simplify_builtin_call(), simplify_builtin_memcpy_memset(), spaceship_replacement(), ssa_is_replaceable_p(), ter_is_replaceable_p(), trailing_store_in_bb(), value_replacement(), vect_build_slp_tree_2(), vect_create_epilog_for_reduction(), vect_recog_bitfield_ref_pattern(), vect_slp_check_for_roots(), vect_slp_linearize_chain(), and vectorizable_reduction().
|
extern |
Return true if the var whose chain of uses starts at PTR has a single nondebug use. Set USE_P and STMT to that single nondebug use, if so, or to NULL otherwise.
References is_gimple_debug(), ssa_use_operand_t::next, NULL, single_use(), and USE_STMT.
Referenced by single_imm_use().
If there is a single DEF in the PHI node which matches FLAG, return it. Otherwise return NULL_DEF_OPERAND_P.
References gimple_phi_result(), is_gimple_reg(), NULL_TREE, SSA_OP_DEF, and SSA_OP_VIRTUAL_DEFS.
|
inline |
If there is a single operand in STMT matching FLAGS, return it. Otherwise return NULL.
References NULL_DEF_OPERAND_P, op_iter_done(), op_iter_init_def(), and op_iter_next_def().
Referenced by hoist_defs_of_uses(), _slp_tree::push_vec_def(), simple_dce_from_worklist(), and statement_sink_location().
If there is a single operand in STMT matching FLAGS, return it. Otherwise return NULL.
References NULL_TREE, op_iter_done(), op_iter_init_tree(), and op_iter_next_tree().
Referenced by stmt_may_generate_copy(), and vect_transform_slp_perm_load_1().
|
inline |
If there is a single operand in STMT matching FLAGS, return it. Otherwise return NULL.
References NULL_USE_OPERAND_P, op_iter_done(), op_iter_init_use(), and op_iter_next_use().
|
inline |
Return the single virtual use operand in STMT if present. Otherwise return NULL.
References gimple_use_ops(), gimple_vuse(), NULL_USE_OPERAND_P, and USE_OP_PTR.
Referenced by combine_blocks().
Return true if there are zero operands in STMT matching the type given in FLAGS.
References op_iter_done(), and op_iter_init_tree().
Referenced by mark_stmt_if_obviously_necessary(), and vect_stmt_relevant_p().