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 "cfghooks.h"
#include "ssa.h"
#include "cgraph.h"
#include "tree-eh.h"
#include "gimple-iterator.h"
#include "tree-cfg.h"
#include "tree-ssa.h"
#include "value-prof.h"
#include "gimplify.h"
Helper function for gsi_safe_insert_before and gsi_safe_insert_seq_before. Replace SSA_NAME uses in G if they are PHI results of PHIs on E->dest bb with the corresponding PHI argument from E edge.
References FOR_EACH_SSA_USE_OPERAND, g, gimple_bb(), gimple_phi_arg_def_from_edge(), r, SET_USE, SSA_NAME_DEF_STMT, SSA_OP_USE, unshare_expr(), update_stmt(), and USE_FROM_PTR.
Referenced by gsi_safe_insert_before(), and gsi_safe_insert_seq_before().
|
static |
Helper function for gsi_safe_insert_before and gsi_safe_insert_seq_before. Find edge to insert statements before returns_twice call at the start of BB, if there isn't just one, split the bb and adjust PHIs to ensure that.
References add_phi_arg(), CDI_DOMINATORS, copy_ssa_name(), create_phi_node(), dom_info_available_p(), ECF_RETURNS_TWICE, FOR_EACH_EDGE, gcc_checking_assert, gimple_call_flags(), gimple_call_internal_p(), gimple_phi_arg_def_from_edge(), gimple_phi_arg_location_from_edge(), gimple_phi_result(), gimple_phi_set_result(), gsi_end_p(), gsi_next(), gsi_start_nondebug_after_labels_bb(), gsi_start_nondebug_bb(), gsi_start_phis(), gsi_stmt(), is_gimple_call(), make_edge(), NULL, basic_block_def::preds, recompute_dominator(), remove_edge(), set_immediate_dominator(), split_block_after_labels(), and UNKNOWN_LOCATION.
Referenced by gsi_safe_insert_before(), and gsi_safe_insert_seq_before().
|
static |
Insert the statement pointed-to by GSI into edge E. Every attempt is made to place the statement in an existing basic block, but sometimes that isn't possible. When it isn't possible, the edge is split and the statement is added to the new block. In all cases, the returned *GSI points to the correct location. The return value is true if insertion should be done after the location, or false if it should be done before the location. If a new basic block has to be created, it is stored in *NEW_BB.
References cfun, EDGE_COUNT, EDGE_SUCC, ENTRY_BLOCK_PTR_FOR_FN, EXIT_BLOCK_PTR_FOR_FN, gimple_seq_empty_p(), gsi_end_p(), gsi_last_bb(), gsi_next(), gsi_prev_nondebug(), gsi_start_bb(), gsi_stmt(), is_gimple_debug(), phi_nodes(), si, single_pred_edge(), single_pred_p(), single_succ_p(), split_edge(), stmt_ends_bb_p(), and basic_block_def::succs.
Referenced by gsi_commit_one_edge_insert(), gsi_insert_on_edge_immediate(), and gsi_insert_seq_on_edge_immediate().
void gsi_commit_edge_inserts | ( | void | ) |
This routine will commit all pending edge insertions, creating any new basic blocks which are necessary.
References cfun, ENTRY_BLOCK_PTR_FOR_FN, FOR_EACH_BB_FN, FOR_EACH_EDGE, gsi_commit_one_edge_insert(), NULL, single_succ_edge(), and basic_block_def::succs.
Referenced by analyze_candidates_and_replace(), branch_prob(), create_empty_loop_on_edge(), execute_tm_mark(), gimple_flow_call_edges_add(), gimple_lower_bitint(), loop_invariant_motion_in_fun(), lower_emutls_function_body(), sra_modify_function_body(), and tree_lower_complex().
void gsi_commit_one_edge_insert | ( | edge | e, |
basic_block * | new_bb ) |
Commit insertions pending at edge E. If a new block is created, set NEW_BB to this block, otherwise set it to NULL.
References gimple_stmt_iterator::bb, gimple_find_edge_insert_loc(), gimple_seq_first(), gsi_insert_seq_after(), gsi_insert_seq_before(), GSI_NEW_STMT, NULL, PENDING_STMT, and update_call_edge_frequencies().
Referenced by copy_phis_for_bb(), gsi_commit_edge_inserts(), and hoist_memory_references().
gphi_iterator gsi_for_phi | ( | gphi * | phi | ) |
Finds iterator for PHI.
References gimple_bb(), gsi_start_phis(), and i.
Referenced by ifcombine_replace_cond().
gimple_stmt_iterator gsi_for_stmt | ( | gimple * | stmt | ) |
Finds iterator for STMT.
References gimple_bb(), gsi_start_bb(), gsi_start_phis(), and i.
Referenced by adjust_iv_update_pos(), strlen_pass::adjust_last_stmt(), asan_expand_poison_ifn(), attempt_builtin_powi(), avoid_deep_ter_for_debug(), branch_fixup(), tree_switch_conversion::switch_conversion::build_arrays(), tree_switch_conversion::switch_conversion::build_one_array(), bump_vector_ptr(), cancel_fma_deferring(), rt_bb_visited::check(), combine_blocks(), cond_if_else_store_replacement_1(), cond_removal_in_builtin_zero_pattern(), cond_store_replacement(), convert_atomic_bit_not(), convert_if_conditions_to_switch(), convert_mult_to_fma_1(), convert_scalar_cond_reduction(), convert_to_divmod(), copy_cfg_body(), copy_debug_stmt(), create_call_for_reduction_1(), create_dispatcher_calls(), create_new_iv(), default_goacc_reduction(), dse_optimize_redundant_stores(), dump_oacc_loop_part(), eliminate_dom_walker::eliminate_cleanup(), execute_cse_conv_1(), execute_cse_sincos_1(), execute_sm(), execute_update_addresses_taken(), tree_switch_conversion::switch_conversion::exp_index_transform(), expand_call_inline(), expand_oacc_for(), expand_omp_atomic_cas(), expand_omp_build_assign(), expand_omp_build_cond(), expand_omp_for_static_chunk(), expand_omp_for_static_nochunk(), expand_omp_ordered_source_sink(), expand_omp_sections(), expand_omp_simd(), expand_omp_target(), expand_omp_taskloop_for_inner(), expand_omp_taskloop_for_outer(), factor_out_conditional_operation(), find_tail_calls(), fixup_noreturn_call(), fold_builtin_atomic_compare_exchange(), fold_loop_internal_call(), fold_strstr_to_strncmp(), forward_propagate_addr_expr(), tree_switch_conversion::switch_conversion::gen_inbound_check(), get_string_length(), gimple_divmod_fixed_value(), gimple_expand_vec_set_extract_expr(), gimple_gen_average_profiler(), gimple_gen_ic_profiler(), gimple_gen_interval_profiler(), gimple_gen_ior_profiler(), gimple_gen_pow2_profiler(), gimple_gen_topn_values_profiler(), gimple_ic(), gimple_lower_bitint(), gimple_mod_pow2(), gimple_mod_subtract(), gimple_split_block(), gimple_stringop_fixed_value(), gimple_value_profile_transformations(), gimplify_body(), gimplify_size_expressions(), gsi_safe_insert_before(), gsi_safe_insert_seq_before(), handle_builtin_alloca(), strlen_pass::handle_builtin_memset(), hoist_adjacent_loads(), hoist_defs_of_uses(), hoist_memory_references(), ifcombine_ifandif(), ifcombine_replace_cond(), ifcvt_hoist_invariants(), increment_start_addr(), initialize_root_vars_store_elim_2(), insert_backedge_copies(), insert_clobber_before_stack_restore(), insert_debug_temp_for_var_def(), insert_initializers(), insert_stmt_after(), insert_stmt_before_use(), insert_trap(), instrument_bool_enum_load(), instrument_builtin(), instrument_builtin_call(), instrument_mem_region_access(), instrument_memory_accesses(), instrument_nonnull_arg(), instrument_nonnull_return(), introduce_cast_before_cand(), ipa_simd_modify_stmt_ops(), is_factor_profitable(), issue_prefetch_ref(), linearize_expr(), lower_bitfield(), make_new_ssa_for_def(), tree_loop_interchange::map_inductions_to_loop(), match_arith_overflow(), match_single_bit_test(), match_uaddc_usubc(), maybe_duplicate_comparison(), maybe_optimize_range_tests(), ipa_param_adjustments::modify_call(), move_early_exit_stmts(), move_stmt(), n_of_executions_at_most(), negate_value(), oacc_loop_xform_head_tail(), oacc_rewrite_var_decl(), oacc_xform_loop(), oacc_xform_tile(), omp_sese_split_blocks(), ompdevlow_adjust_simt_enter(), sm_set_flag_if_changed::operator()(), optimize_atomic_bit_test_and(), optimize_atomic_op_fetch_cmp_0(), optimize_mask_stores(), optimize_range_tests_var_bound(), optimize_recip_sqrt(), optimize_spaceship(), optimize_stack_restore(), optimize_vec_cond_expr(), optimize_vector_load(), predicate_scalar_phi(), propagate_op_to_single_use(), propagate_with_phi(), purge_all_uses(), reassoc_stmt_dominates_stmt_p(), pcom_worker::reassociate_to_the_same_stmt(), record_equivalences_from_phis(), release_defs_bitset(), remove_exits_and_undefined_stmts(), remove_gimple_phi_args(), remove_name_from_operation(), remove_prop_source_from_use(), pcom_worker::remove_stmt(), vec_info::remove_stmt(), remove_unused_ivs(), remove_visited_stmt_chain(), replace_abnormal_ssa_names(), replace_func_exit(), replace_mult_candidate(), replace_one_candidate(), replace_reciprocal(), replace_reciprocal_squares(), replace_ref(), replace_ref_with(), replace_rhs_if_not_dup(), replace_uses_by(), repropagate_negates(), ipa_param_body_adjustments::reset_debug_stmts(), rewrite_expr_tree(), rewrite_use_address(), rewrite_use_compare(), rewrite_use_nonlinear_expr(), sanopt_optimize_walker(), shrink_wrap_one_built_in_call_with_conds(), simple_dce_from_worklist(), simplify_builtin_call(), sink_common_stores_to_bb(), slpeel_tree_duplicate_loop_to_edge_cfg(), spaceship_replacement(), tm_log_emit_stmt(), undistribute_bitref_for_vector(), loop_cand::undo_simple_reduction(), update_ops(), update_range_test(), use_internal_fn(), value_replacement(), vect_create_constant_vectors(), vect_do_peeling(), vect_finish_replace_stmt(), vect_loop_vectorized_call(), vect_loop_versioning(), vect_mark_pattern_stmts(), vect_remove_slp_scalar_calls(), vect_schedule_slp_node(), vect_set_loop_condition(), vect_set_loop_condition_normal(), vect_slp_analyze_load_dependences(), vect_slp_analyze_store_dependences(), vect_split_statement(), vect_stmt_dominates_stmt_p(), vect_transform_slp_perm_load_1(), vectorizable_condition(), vectorizable_induction(), vectorizable_live_operation(), vectorizable_recurr(), vectorize_fold_left_reduction(), vectorize_slp_instance_root_stmt(), and verify_bb_vtables().
gimple_stmt_iterator gsi_for_stmt | ( | gimple * | stmt, |
gimple_seq * | seq ) |
Get an iterator for STMT, which is known to belong to SEQ. This is equivalent to starting at the beginning of SEQ and searching forward until STMT is found.
References gsi_start(), and i.
void gsi_insert_after | ( | gimple_stmt_iterator * | i, |
gimple * | stmt, | ||
enum gsi_iterator_update | m ) |
Insert statement STMT after the statement pointed-to by iterator I. Update STMT's basic block and scan it for new operands. M specifies how to update iterator I after insertion (see enum gsi_iterator_update).
References gsi_insert_after_without_update(), i, and update_modified_stmt().
Referenced by ipa_param_body_adjustments::append_init_stmts(), asan_expand_check_ifn(), asan_expand_mark_ifn(), asan_poison_variable(), asan_store_shadow_bytes(), avoid_deep_ter_for_debug(), branch_fixup(), build_check_stmt(), build_ref_for_offset(), build_shadow_mem_access(), rt_bb_visited::check(), clobber_subtree(), cond_if_else_store_replacement_1(), cond_store_replacement(), connect_loops(), convert_atomic_bit_not(), copy_bb(), create_call_for_reduction_1(), create_empty_if_region_on_edge(), create_empty_loop_on_edge(), create_iv(), create_loads_and_stores_for_name(), create_loads_for_reductions(), create_parallel_loop(), create_stores_for_reduction(), do_split_loop_on_cond(), early_object_sizes_execute_one(), tree_switch_conversion::jump_table_cluster::emit(), tree_switch_conversion::switch_decision_tree::emit_cmp_and_jump_insns(), execute_cse_sincos_1(), execute_fixup_cfg(), execute_sm_if_changed(), tree_switch_conversion::switch_conversion::exp_index_transform(), expand_call_inline(), expand_call_tm(), expand_complex_div_wide(), expand_complex_multiplication(), expand_oacc_for(), expand_omp_build_assign(), expand_omp_build_cond(), expand_omp_for_generic(), expand_omp_for_init_vars(), expand_omp_for_static_chunk(), expand_omp_for_static_nochunk(), expand_omp_ordered_sink(), expand_omp_sections(), expand_omp_simd(), expand_omp_single(), expand_omp_target(), expand_omp_taskloop_for_inner(), expand_omp_taskloop_for_outer(), expand_omp_taskreg(), expand_parallel_call(), expand_thunk(), expand_transaction(), extract_omp_for_update_vars(), fold_builtin_atomic_compare_exchange(), force_into_ssa_name(), gen_assign_counter_update(), gen_counter_update(), generate_memcpy_builtin(), generate_memset_builtin(), generate_subtree_copies(), gimple_duplicate_bb(), gimple_duplicate_sese_tail(), gimple_lower_bitint(), gimple_lv_add_condition_to_bb(), gimple_merge_blocks(), gimple_regimplify_operands(), gimple_seq_add_stmt(), gsi_insert_on_edge_immediate(), gsi_move_after(), handle_abnormal_edges(), handle_builtin_alloca(), hoist_guard(), ifcvt_hoist_invariants(), increment_start_addr(), init_subtree_with_zero(), initialize_constant_pool_replacements(), initialize_root_vars_store_elim_2(), input_bb(), insert_backedge_copies(), insert_cond_bb(), insert_if_then_before_iter(), insert_init_debug_bind(), insert_init_stmt(), insert_initializers(), insert_reciprocals(), insert_stmt_after(), insert_trap(), instrument_bool_enum_load(), instrument_builtin(), instrument_builtin_call(), instrument_nonnull_arg(), instrument_nonnull_return(), ipa_simd_modify_stmt_ops(), ipa_tm_insert_gettmclone_call(), load_assign_lhs_subreplacements(), lower_builtin_posix_memalign(), lower_eh_constructs_2(), lower_function_body(), lower_omp_1(), lower_omp_scan(), lower_omp_scope(), lower_omp_sections(), lower_omp_single(), lower_resx(), lower_transaction(), make_blocks_1(), make_new_ssa_for_def(), match_arith_overflow(), maybe_cast_to_ptrmode(), maybe_create_ssa_name(), maybe_register_def(), move_sese_in_condition(), neuter_worker_single(), oacc_entry_exit_single_gang(), sm_set_flag_if_changed::operator()(), optimize_atomic_bit_test_and(), optimize_atomic_op_fetch_cmp_0(), optimize_mask_stores(), optimize_recip_sqrt(), reassociate_bb(), remap_ssa_name(), remove_dead_stmt(), replace_goto_queue_cond_clause(), replace_ref_with(), rewrite_stmt(), rewrite_to_defined_overflow(), scan_omp_simd_scan(), simd_clone_adjust(), simplify_builtin_call(), slpeel_add_loop_guard(), split_function(), sra_modify_expr(), thunk_adjust(), tm_log_emit_restores(), tree_transform_and_unroll_loop(), ubsan_expand_bounds_ifn(), ubsan_expand_null_ifn(), ubsan_expand_objsize_ifn(), ubsan_expand_ptr_ifn(), ubsan_expand_vptr_ifn(), unloop_loops(), update_accumulator_with_ops(), vect_do_peeling(), vect_loop_versioning(), vectorizable_simd_clone_call(), verify_bb_vtables(), worker_single_copy(), and worker_single_simple().
void gsi_insert_after_without_update | ( | gimple_stmt_iterator * | i, |
gimple * | stmt, | ||
enum gsi_iterator_update | m ) |
Insert statement STMT after the statement pointed-to by iterator I. M specifies how to update iterator I after insertion (see enum gsi_iterator_update). This function does not scan for new operands. It is provided for the use of the gimplifier, which manipulates statements for which def/use information has not yet been constructed. Most callers should use gsi_insert_after.
References gsi_insert_seq_nodes_after(), and i.
Referenced by gimple_seq_add_stmt_without_update(), gimplify_and_update_call_from_tree(), gsi_insert_after(), and save_tmp_var().
void gsi_insert_before | ( | gimple_stmt_iterator * | i, |
gimple * | stmt, | ||
enum gsi_iterator_update | m ) |
Insert statement STMT before the statement pointed-to by iterator I. Update STMT's basic block and scan it for new operands. M specifies how to update iterator I after insertion (see enum gsi_iterator_update).
References gsi_insert_before_without_update(), i, and update_modified_stmt().
Referenced by add_clobbers_to_eh_landing_pad(), adjust_return_value_with_ops(), asan_expand_check_ifn(), asan_expand_poison_ifn(), asan_poison_variable(), attempt_builtin_powi(), eliminate_dom_walker::before_dom_children(), build_and_add_sum(), build_and_insert_binop(), build_and_insert_call(), build_and_insert_cast(), tree_switch_conversion::switch_conversion::build_arrays(), tree_switch_conversion::switch_conversion::build_one_array(), build_ref_for_offset(), build_saturation_binary_arith_call_and_insert(), build_tm_load(), build_tm_store(), build_vect_cond_expr(), rt_bb_visited::check(), clear_padding_emit_loop(), clear_padding_flush(), clear_padding_type(), clobber_subtree(), cond_if_else_store_replacement_1(), cond_removal_in_builtin_zero_pattern(), cond_store_replacement(), convert_atomic_bit_not(), convert_if_conditions_to_switch(), convert_nl_goto_receiver(), convert_scalar_cond_reduction(), convert_to_divmod(), create_final_loads_for_reduction(), create_iv(), create_parallel_loop(), detach_value(), tree_switch_conversion::switch_decision_tree::do_jump_if_equal(), do_pre_regular_insertion(), do_vec_conversion(), eliminate_dom_walker::eliminate_cleanup(), tree_switch_conversion::bit_test_cluster::emit(), emit_mfence_after_loop(), execute_cse_sincos_1(), execute_omp_device_lower(), execute_sm(), execute_update_addresses_taken(), expand_assign_tm(), expand_call_inline(), expand_complex_div_wide(), expand_complex_libcall(), expand_complex_move(), expand_oacc_collapse_init(), expand_oacc_collapse_vars(), expand_oacc_for(), expand_omp_atomic_cas(), expand_omp_atomic_load(), expand_omp_atomic_mutex(), expand_omp_atomic_pipeline(), expand_omp_atomic_store(), expand_omp_build_assign(), expand_omp_build_cond(), expand_omp_for_generic(), expand_omp_for_init_counts(), expand_omp_for_init_vars(), expand_omp_for_ordered_loops(), expand_omp_for_static_chunk(), expand_omp_for_static_nochunk(), expand_omp_ordered_sink(), expand_omp_ordered_source(), expand_omp_sections(), expand_omp_simd(), expand_omp_target(), expand_omp_taskloop_for_inner(), expand_transaction(), expand_vector_conversion(), expand_vector_divmod(), find_assumption_locals_r(), fold_builtin_atomic_compare_exchange(), fold_strstr_to_strncmp(), force_into_ssa_name(), tree_switch_conversion::switch_conversion::gen_def_assigns(), tree_switch_conversion::switch_conversion::gen_inbound_check(), gen_phi_nest_statement(), generate_subtree_copies(), generate_subtree_deferred_init(), get_string_length(), get_target_arguments(), gimple_block_label(), gimple_divmod_fixed_value(), gimple_expand_vec_set_extract_expr(), gimple_fold_builtin_acc_on_device(), gimple_fold_builtin_clear_padding(), gimple_fold_builtin_memory_op(), gimple_fold_builtin_memset(), gimple_fold_builtin_stpcpy(), gimple_fold_call(), gimple_gen_average_profiler(), gimple_gen_ic_func_profiler(), gimple_gen_ic_profiler(), gimple_gen_interval_profiler(), gimple_gen_ior_profiler(), gimple_gen_pow2_profiler(), gimple_gen_time_profiler(), gimple_gen_topn_values_profiler(), gimple_ic(), gimple_lower_bitint(), gimple_merge_blocks(), gimple_mod_pow2(), gimple_mod_subtract(), gimple_stringop_fixed_value(), gsi_insert_finally_seq_after_call(), gsi_insert_on_edge_immediate(), gsi_move_before(), gsi_safe_insert_before(), handle_abnormal_edges(), handle_builtin_alloca(), handle_builtin_stack_restore(), hoist_defs_of_uses(), tree_switch_conversion::bit_test_cluster::hoist_edge_and_branch_if_true(), ifc_temp_var(), ifcombine_replace_cond(), increment_start_addr(), init_subtree_with_zero(), init_tmp_var_with_call(), insert_backedge_copies(), insert_check_and_trap(), insert_clobber_before_stack_restore(), insert_cond_bb(), insert_debug_temp_for_var_def(), rt_bb_visited::insert_exit_check_on_edge(), insert_init_debug_bind(), insert_initializers(), insert_phi_nodes_for(), insert_reciprocals(), insert_stmt_after(), insert_stmt_before_use(), insert_trap(), instrument_bool_enum_load(), instrument_builtin(), instrument_builtin_call(), instrument_func_exit(), instrument_si_overflow(), introduce_cast_before_cand(), ipa_simd_modify_function_body(), ipa_simd_modify_stmt_ops(), ipa_tm_insert_gettmclone_call(), ipa_tm_insert_irr_call(), issue_prefetch_ref(), label_to_block(), linearize_expr(), lower_assumption(), lower_bitfield(), lower_builtin_setjmp(), lower_coro_builtin(), lower_eh_constructs_2(), lower_eh_dispatch(), lower_gimple_return(), lower_resx(), match_arith_overflow(), match_saturation_trunc(), match_single_bit_test(), match_uaddc_usubc(), maybe_add_asan_poison_write(), maybe_duplicate_comparison(), maybe_move_debug_stmts_to_successors(), maybe_optimize_range_tests(), merge_with_identity(), ipa_param_adjustments::modify_call(), negate_value(), neuter_worker_single(), oacc_entry_exit_single_gang(), oacc_rewrite_var_decl(), omp_sese_split_blocks(), ompdevlow_adjust_simt_enter(), optimize_atomic_bit_test_and(), optimize_range_tests_var_bound(), optimize_recip_sqrt(), optimize_spaceship(), optimize_vector_constructor(), optimize_vector_load(), powi_as_mults(), powi_as_mults_1(), predicate_scalar_phi(), prepare_target_mem_ref_lvalue(), prepare_vec_mask(), propagate_threaded_block_debug_into(), pcom_worker::reassociate_to_the_same_stmt(), remap_ssa_name(), remove_bb(), remove_exits_and_undefined_stmts(), remove_unused_ivs(), replace_abnormal_ssa_names(), replace_ref_with(), repropagate_negates(), ipa_param_body_adjustments::reset_debug_stmts(), rewrite_bittest(), rewrite_debug_stmt_uses(), rewrite_expr_tree(), rewrite_phi_with_iv(), rewrite_reciprocal(), rewrite_use_nonlinear_expr(), set_ifsese_condition(), shrink_wrap_one_built_in_call_with_conds(), simd_clone_adjust(), simd_clone_linear_addend(), simplify_using_ranges::simplify_float_conversion_using_ranges(), simplify_using_ranges::simplify_internal_call_using_ranges(), simplify_permutation(), simplify_rotate(), simplify_using_ranges::simplify_truth_ops_using_ranges(), simplify_vector_constructor(), sink_clobbers(), sink_common_stores_to_bb(), spaceship_replacement(), sra_modify_assign(), sra_modify_expr(), ssa_create_duplicates(), tm_log_emit_saves(), tm_log_emit_stmt(), transform_to_exit_first_loop(), tree_function_versioning(), tree_vec_extract(), ubsan_expand_bounds_ifn(), ubsan_expand_null_ifn(), ubsan_expand_objsize_ifn(), ubsan_expand_ptr_ifn(), ubsan_expand_vptr_ifn(), undistribute_bitref_for_vector(), update_ops(), use_internal_fn(), value_replacement(), vect_create_epilog_for_reduction(), vect_do_peeling(), vect_expand_fold_left(), vect_finish_stmt_generation(), vect_gen_loop_len_mask(), vect_get_loop_variant_data_ptr_increment(), vect_set_loop_condition_normal(), vect_set_loop_condition_partial_vectors(), vect_set_loop_condition_partial_vectors_avx512(), vect_setup_realignment(), vector_element(), vectorizable_condition(), vectorizable_live_operation(), vectorizable_simd_clone_call(), vectorize_fold_left_reduction(), version_loop_for_if_conversion(), worker_single_copy(), and worker_single_simple().
void gsi_insert_before_without_update | ( | gimple_stmt_iterator * | i, |
gimple * | stmt, | ||
enum gsi_iterator_update | m ) |
Insert statement STMT before the statement pointed-to by iterator I. M specifies how to update iterator I after insertion (see enum gsi_iterator_update). This function does not scan for new operands. It is provided for the use of the gimplifier, which manipulates statements for which def/use information has not yet been constructed. Most callers should use gsi_insert_before.
References gsi_insert_seq_nodes_before(), and i.
Referenced by gsi_insert_before(), init_tmp_var(), vec_info::insert_on_entry(), lower_rec_input_clauses(), vect_mark_pattern_stmts(), and vect_split_statement().
Add STMT to the pending list of edge E. No actual insertion is made until a call to gsi_commit_edge_inserts () is made.
References gimple_seq_add_stmt(), and PENDING_STMT.
Referenced by cond_store_replacement(), create_add_on_incoming_edge(), execute_sm_exit(), gimple_flow_call_edges_add(), gimple_lower_bitint(), instrument_decisions(), move_computations_worker(), phiprop_insert_phi(), and walk_regimplify_phi().
basic_block gsi_insert_on_edge_immediate | ( | edge | e, |
gimple * | stmt ) |
Similar to gsi_insert_on_edge+gsi_commit_edge_inserts. If a new block has to be created, it is returned.
References gimple_stmt_iterator::bb, gcc_assert, gimple_find_edge_insert_loc(), gsi_insert_after(), gsi_insert_before(), GSI_NEW_STMT, NULL, PENDING_STMT, and update_call_edge_frequencies().
Referenced by asan_maybe_insert_dynamic_shadow_at_function_entry(), fold_builtin_atomic_compare_exchange(), get_last_alloca_addr(), gsi_safe_insert_before(), handle_builtin_alloca(), ifcvt_hoist_invariants(), initialize_root_vars_lm(), instrument_bool_enum_load(), maybe_register_def(), take_address_of(), vect_convert_input(), vect_recog_rotate_pattern(), vect_set_loop_condition_partial_vectors(), vect_set_loop_condition_partial_vectors_avx512(), vect_setup_realignment(), vectorizable_induction(), and vectorizable_load().
void gsi_insert_seq_after | ( | gimple_stmt_iterator * | i, |
gimple_seq | seq, | ||
enum gsi_iterator_update | mode ) |
Links sequence SEQ after the statement pointed-to by iterator I. MODE is as in gsi_insert_after. Scan the statements in SEQ for new operands.
References gsi_insert_seq_after_without_update(), i, and update_modified_stmts().
Referenced by asan_expand_check_ifn(), do_hoist_insertion(), tree_switch_conversion::jump_table_cluster::emit(), tree_switch_conversion::switch_conversion::exp_index_transform(), expand_complex_asm(), force_gimple_operand_gsi_1(), generate_reduction_builtin_1(), gimple_build_insert_seq(), gimple_merge_blocks(), gimple_seq_add_seq(), gsi_commit_one_edge_insert(), gsi_insert_finally_seq_after_call(), gsi_insert_seq_on_edge_immediate(), insert_gimplified_predicates(), instrument_expr(), lower_omp_directive(), lower_omp_for_scan(), lower_omp_scan(), lower_omp_sections(), lower_transaction(), optimize_atomic_bit_test_and(), replace_goto_queue_cond_clause(), slpeel_add_loop_guard(), ssa_create_duplicates(), update_complex_components(), update_range_test(), vect_create_constant_vectors(), vect_gen_prolog_loop_niters(), vect_transform_cycle_phi(), vect_update_ivs_after_vectorizer(), vectorizable_induction(), vectorizable_live_operation(), and worker_single_copy().
void gsi_insert_seq_after_without_update | ( | gimple_stmt_iterator * | i, |
gimple_seq | seq, | ||
enum gsi_iterator_update | mode ) |
Links sequence SEQ after the statement pointed-to by iterator I. MODE is as in gsi_insert_after. This function does not scan for new operands. It is provided for the use of the gimplifier, which manipulates statements for which def/use information has not yet been constructed. Most callers should use gsi_insert_seq_after.
References gcc_assert, gimple_seq_first(), gimple_seq_last(), gsi_insert_seq_nodes_after(), i, last, and NULL.
Referenced by combine_blocks(), gimple_build_insert_seq(), gimple_seq_add_seq_without_update(), gimplify_seq_add_seq(), and gsi_insert_seq_after().
void gsi_insert_seq_before | ( | gimple_stmt_iterator * | i, |
gimple_seq | seq, | ||
enum gsi_iterator_update | mode ) |
Inserts the sequence of statements SEQ before the statement pointed by iterator I. MODE indicates what to do with the iterator after insertion (see enum gsi_iterator_update). Scan the statements in SEQ for new operands.
References gsi_insert_seq_before_without_update(), i, and update_modified_stmts().
Referenced by add_header_seq(), tree_switch_conversion::switch_conversion::build_one_array(), convert_mult_to_fma_1(), convert_scalar_cond_reduction(), decompose_kernels_region_body(), do_hoist_insertion(), eliminate_dom_walker::eliminate_insert(), tree_switch_conversion::switch_conversion::exp_index_transform(), expand_complex_addition(), expand_complex_comparison(), expand_complex_conjugate(), expand_complex_div_straight(), expand_complex_div_wide(), expand_complex_division(), expand_complex_multiplication(), expand_complex_negation(), expand_complex_paren(), factor_out_conditional_operation(), final_value_replacement_loop(), force_gimple_operand_gsi_1(), generate_range_test(), gimple_build_insert_seq(), gimple_expand_builtin_cabs(), gimple_expand_vec_cond_expr(), gimple_fold_builtin_memory_chk(), gimple_fold_builtin_memory_op(), gimple_fold_builtin_stpcpy(), gimple_fold_builtin_stxcpy_chk(), gimple_regimplify_operands(), gimplify_size_expressions(), gsi_commit_one_edge_insert(), gsi_insert_finally_seq_after_call(), gsi_insert_seq_on_edge_immediate(), gsi_replace_with_seq(), gsi_safe_insert_seq_before(), handle_builtin_alloca(), honor_protect_cleanup_actions(), rt_bb_visited::insert_exit_check_in_block(), insert_gimplified_predicates(), vec_info::insert_seq_on_entry(), instrument_expr(), lower_eh_constructs_2(), lower_emutls_function_body(), lower_gimple_bind(), lower_omp_scan(), lower_transaction(), match_simplify_replacement(), minmax_replacement(), ipa_param_body_adjustments::modify_cfun_body(), optimize_atomic_bit_test_and(), predicate_statements(), replace_goto_queue_1(), replace_stmt_with_simplification(), rewrite_to_defined_overflow(), rewrite_use_nonlinear_expr(), simd_clone_adjust(), simplify_vector_constructor(), take_address_of(), tree_vec_extract(), loop_cand::undo_simple_reduction(), update_range_test(), vect_create_constant_vectors(), vect_create_data_ref_ptr(), vect_create_epilog_for_reduction(), vect_emit_reduction_init_stmts(), vect_gen_prolog_loop_niters(), vect_gen_vector_loop_niters_mult_vf(), vect_get_loop_len(), vect_get_loop_mask(), vect_loop_versioning(), vect_set_loop_controls_directly(), vect_setup_realignment(), vect_transform_loop(), vect_update_ivs_after_vectorizer(), vectorizable_induction(), vectorizable_live_operation(), vectorizable_live_operation_1(), vectorizable_load(), vectorizable_nonlinear_induction(), vectorizable_store(), vectorize_slp_instance_root_stmt(), version_loop_by_alias_check(), and rt_bb_visited::visit().
void gsi_insert_seq_before_without_update | ( | gimple_stmt_iterator * | i, |
gimple_seq | seq, | ||
enum gsi_iterator_update | mode ) |
Inserts the sequence of statements SEQ before the statement pointed by iterator I. MODE indicates what to do with the iterator after insertion (see enum gsi_iterator_update). This function does not scan for new operands. It is provided for the use of the gimplifier, which manipulates statements for which def/use information has not yet been constructed. Most callers should use gsi_insert_seq_before.
References gcc_assert, gimple_seq_first(), gimple_seq_last(), gsi_insert_seq_nodes_before(), i, last, and NULL.
Referenced by gimple_build_insert_seq(), gimplify_bind_expr(), gimplify_cleanup_point_expr(), gsi_insert_seq_before(), rt_bb_visited::insert_exit_check_on_edge(), reset_debug_bindings(), sink_clobbers(), and vect_mark_pattern_stmts().
|
static |
Insert the sequence delimited by nodes FIRST and LAST after iterator I. M specifies how to update iterator I after insertion (see enum gsi_iterator_update). This routine assumes that there is a forward and backward path between FIRST and LAST (i.e., they are linked in a doubly-linked list). Additionally, if FIRST == LAST, this routine will properly insert a single node.
References gcc_assert, gcc_unreachable, gimple_seq_last(), gimple_seq_set_first(), gimple_seq_set_last(), gsi_bb(), GSI_CONTINUE_LINKING, GSI_LAST_NEW_STMT, GSI_NEW_STMT, GSI_SAME_STMT, i, last, filedep::next, gimple::next, NULL, gimple::prev, and update_bb_for_stmts().
Referenced by gsi_insert_after_without_update(), and gsi_insert_seq_after_without_update().
|
static |
Insert the sequence delimited by nodes FIRST and LAST before iterator I. M specifies how to update iterator I after insertion (see enum gsi_iterator_update). This routine assumes that there is a forward and backward path between FIRST and LAST (i.e., they are linked in a doubly-linked list). Additionally, if FIRST == LAST, this routine will properly insert a single node.
References gcc_assert, gcc_unreachable, gimple_seq_last(), gimple_seq_set_first(), gimple_seq_set_last(), gsi_bb(), GSI_CONTINUE_LINKING, GSI_LAST_NEW_STMT, GSI_NEW_STMT, GSI_SAME_STMT, i, last, filedep::next, gimple::next, NULL, gimple::prev, and update_bb_for_stmts().
Referenced by gsi_insert_before_without_update(), and gsi_insert_seq_before_without_update().
void gsi_insert_seq_on_edge | ( | edge | e, |
gimple_seq | seq ) |
Add the sequence of statements SEQ to the pending list of edge E. No actual insertion is made until a call to gsi_commit_edge_inserts is made.
References gimple_seq_add_seq(), and PENDING_STMT.
Referenced by asan_expand_poison_ifn(), copy_phis_for_bb(), create_empty_loop_on_edge(), emit_phi_nodes(), expand_call_tm(), lower_emutls_function_body(), move_computations_worker(), and update_complex_components_on_edge().
basic_block gsi_insert_seq_on_edge_immediate | ( | edge | e, |
gimple_seq | stmts ) |
Insert STMTS on edge E. If a new block has to be created, it is returned.
References gimple_stmt_iterator::bb, gcc_assert, gimple_find_edge_insert_loc(), gimple_seq_first(), gsi_insert_seq_after(), gsi_insert_seq_before(), GSI_NEW_STMT, NULL, PENDING_STMT, and update_call_edge_frequencies().
Referenced by add_preheader_seq(), canonicalize_loop_ivs(), rt_bb_visited::check(), create_iv(), cse_and_gimplify_to_preheader(), determine_exit_conditions(), finalize_eliminated_stores(), gen_parallel_loop(), gsi_insert_finally_seq_after_call(), gsi_safe_insert_seq_before(), initialize_constant_pool_replacements(), initialize_parameter_reductions(), initialize_root_vars(), initialize_root_vars_lm(), initialize_root_vars_store_elim_2(), rt_bb_visited::insert_exit_check_on_edge(), insert_init_seqs(), insert_into_preds_of_block(), vec_info::insert_seq_on_entry(), instrument_expr(), instrument_func_entry(), optimize_atomic_bit_test_and(), rewrite_use_compare(), simd_clone_adjust(), split_loop(), vect_build_loop_niters(), vect_create_constant_vectors(), vect_create_data_ref_ptr(), vect_emit_reduction_init_stmts(), vect_gen_vector_loop_niters(), vect_get_gather_scatter_ops(), vect_prepare_for_masked_peels(), vect_set_loop_condition_normal(), vect_setup_realignment(), vect_transform_cycle_phi(), vectorizable_induction(), vectorizable_nonlinear_induction(), vectorizable_recurr(), and vectorizable_simd_clone_call().
void gsi_move_after | ( | gimple_stmt_iterator * | from, |
gimple_stmt_iterator * | to ) |
Move the statement at FROM so it comes right after the statement at TO.
References gsi_insert_after(), GSI_NEW_STMT, gsi_remove(), and gsi_stmt().
Referenced by gsi_move_to_bb_end(), make_blocks(), move_debug_stmts_from_forwarder(), and loop_cand::undo_simple_reduction().
void gsi_move_before | ( | gimple_stmt_iterator * | from, |
gimple_stmt_iterator * | to, | ||
gsi_iterator_update | m ) |
Move the statement at FROM so it comes right before the statement at TO using method M. M defaults to GSI_SAME_STMT.
References gsi_insert_before(), gsi_remove(), and gsi_stmt().
Referenced by adjust_iv_update_pos(), cond_removal_in_builtin_zero_pattern(), destroy_loop(), find_tail_calls(), gimple_block_label(), gsi_move_to_bb_end(), ifcombine_replace_cond(), minmax_replacement(), tree_loop_interchange::move_code_to_inner_loop(), move_debug_stmts_from_forwarder(), move_early_exit_stmts(), move_stmt(), optimize_mask_stores(), remove_forwarder_block(), replace_block_by(), shrink_wrap_one_built_in_call_with_conds(), sink_code_in_bb(), and value_replacement().
void gsi_move_to_bb_end | ( | gimple_stmt_iterator * | from, |
basic_block | bb ) |
Move the statement at FROM to the end of basic block BB.
References gcc_checking_assert, gsi_bb(), gsi_end_p(), gsi_last_bb(), gsi_move_after(), gsi_move_before(), gsi_stmt(), is_ctrl_stmt(), and last.
Referenced by hoist_adjacent_loads(), and sink_code_in_bb().
bool gsi_remove | ( | gimple_stmt_iterator * | i, |
bool | remove_permanently ) |
Remove the current stmt from the sequence. The iterator is updated to point to the next statement. REMOVE_PERMANENTLY is true when the statement is going to be removed from the IL and not reinserted elsewhere. In that case we remove the statement pointed to by iterator I from the EH tables, and free its operand caches. Otherwise we do not modify this information. Returns true whether EH edge cleanup is required.
References cfun, delink_stmt_imm_use(), gimple_debug_nonbind_marker_p(), gimple_remove_stmt_histograms(), gimple_seq_set_last(), gimple_set_bb(), gimple_set_modified(), gsi_stmt(), i, insert_debug_temps_for_defs(), gimple::next, NULL, gimple::prev, and remove_stmt_from_eh_lp().
Referenced by strlen_pass::adjust_last_stmt(), adjust_simduid_builtins(), asan_expand_check_ifn(), asan_expand_poison_ifn(), rewrite_update_dom_walker::before_dom_children(), branch_fixup(), cancel_fma_deferring(), cleanup_control_expr_graph(), cleanup_control_flow_bb(), cleanup_dead_labels(), cleanup_empty_eh_move_lp(), clear_unused_block_pointer(), cond_if_else_store_replacement_1(), cond_removal_in_builtin_zero_pattern(), cond_store_replacement(), convert_atomic_bit_not(), convert_if_conditions_to_switch(), convert_mult_to_fma_1(), convert_scalar_cond_reduction(), copy_bb(), copy_debug_stmt(), create_call_for_reduction_1(), create_parallel_loop(), decompose_kernels_region_body(), delete_dead_or_redundant_assignment(), delete_dead_or_redundant_call(), eliminate_dom_walker::eliminate_cleanup(), eliminate_tail_call(), tree_switch_conversion::switch_decision_tree::emit(), execute_cse_conv_1(), execute_early_expand_coro_ifns(), execute_oacc_device_lower(), execute_omp_device_lower(), expand_assign_tm(), expand_call_inline(), expand_complex_div_wide(), expand_FALLTHROUGH_r(), expand_gimple_basic_block(), expand_ifn_va_arg_1(), expand_oacc_for(), expand_omp_atomic_cas(), expand_omp_atomic_fetch_op(), expand_omp_atomic_load(), expand_omp_atomic_mutex(), expand_omp_atomic_pipeline(), expand_omp_atomic_store(), expand_omp_for_generic(), expand_omp_for_static_chunk(), expand_omp_for_static_nochunk(), expand_omp_ordered_source_sink(), expand_omp_sections(), expand_omp_simd(), expand_omp_single(), expand_omp_synch(), expand_omp_target(), expand_omp_taskloop_for_inner(), expand_omp_taskloop_for_outer(), expand_omp_taskreg(), expand_transaction(), factor_out_conditional_operation(), find_assumption_locals_r(), find_deps_in_bb_for_stmt(), fixup_noreturn_call(), fold_strstr_to_strncmp(), forward_propagate_addr_expr(), generate_loops_for_partition(), gimple_expand_vec_set_extract_expr(), gimple_fold_builtin_clear_padding(), gimple_fold_builtin_memset(), gimple_lower_bitint(), gimple_merge_blocks(), gimple_redirect_edge_and_branch(), gimple_seq_discard(), gimple_try_redirect_by_replacing_jump(), gimplify_body(), gimplify_cleanup_point_expr(), gsi_move_after(), gsi_move_before(), gsi_replace_with_seq(), handle_abnormal_edges(), strlen_pass::handle_builtin_memset(), strlen_pass::handle_store(), hoist_memory_references(), honor_protect_cleanup_actions(), ifcvt_hoist_invariants(), ifcvt_local_dce(), input_function(), instrument_memory_accesses(), ipa_simd_modify_function_body(), lower_bitfield(), lower_builtin_setjmp(), lower_coro_builtin(), lower_eh_constructs_2(), lower_eh_dispatch(), lower_gimple_bind(), lower_gimple_return(), lower_omp_for_scan(), lower_omp_ordered_clauses(), lower_omp_scan(), lower_resx(), lower_stmt(), lower_transaction(), make_goto_expr_edges(), match_arith_overflow(), match_single_bit_test(), match_uaddc_usubc(), maybe_move_debug_stmts_to_successors(), maybe_remove_writeonly_store(), move_computations_worker(), optimize_atomic_bit_test_and(), optimize_atomic_op_fetch_cmp_0(), optimize_clobbers(), optimize_mask_stores(), optimize_recip_sqrt(), dom_opt_dom_walker::optimize_stmt(), optimize_vector_load(), predicate_statements(), propagate_with_phi(), purge_all_uses(), reassoc_remove_stmt(), release_defs_bitset(), remove_bb(), remove_conditions_and_labels(), remove_ctrl_stmt_and_useless_edges(), remove_dead_stmt(), remove_indirect_clobbers(), remove_phi_node(), remove_prop_source_from_use(), pcom_worker::remove_stmt(), vec_info::remove_stmt(), remove_unused_locals(), replace_goto_queue_1(), replace_phi_edge_with_variable(), ipa_param_body_adjustments::reset_debug_stmts(), rewrite_bittest(), sanopt_optimize_walker(), separate_decls_in_region(), set_ifsese_condition(), simple_dce_from_worklist(), simplify_builtin_call(), sink_clobbers(), sink_code_in_bb(), sink_common_stores_to_bb(), spaceship_replacement(), split_function(), sra_modify_assign(), sra_modify_constructor_assign(), sra_modify_deferred_init(), strip_predict_hints(), ubsan_expand_bounds_ifn(), ubsan_expand_null_ifn(), ubsan_expand_objsize_ifn(), ubsan_expand_ptr_ifn(), ubsan_expand_vptr_ifn(), loop_cand::undo_simple_reduction(), vect_init_vector(), vect_mark_pattern_stmts(), vect_set_loop_condition(), vect_transform_loop(), vect_transform_slp_perm_load_1(), vectorizable_condition(), and vectorize_fold_left_reduction().
bool gsi_replace | ( | gimple_stmt_iterator * | gsi, |
gimple * | stmt, | ||
bool | update_eh_info ) |
Replace the statement pointed-to by GSI to STMT. If UPDATE_EH_INFO is true, the exception handling information of the original statement is moved to the new statement. Assignments must only be replaced with assignments to the same LHS. Returns whether EH edge cleanup is required.
References cfun, delink_stmt_imm_use(), gcc_assert, gimple_duplicate_stmt_histograms(), gimple_get_lhs(), gimple_has_lhs(), gimple_location(), gimple_remove_stmt_histograms(), gimple_set_bb(), gimple_set_location(), gimple_set_modified(), gsi_bb(), gsi_set_stmt(), gsi_stmt(), maybe_clean_or_replace_eh_stmt(), NULL, and update_modified_stmt().
Referenced by adjust_simduid_builtins(), asan_expand_check_ifn(), asan_expand_mark_ifn(), asan_expand_poison_ifn(), build_saturation_binary_arith_call_and_replace(), convert_expand_mult_copysign(), convert_local_reference_stmt(), convert_mult_to_fma_1(), convert_mult_to_highpart(), convert_nl_goto_reference(), convert_nonlocal_reference_stmt(), convert_single_case_switch(), copy_bb(), delete_dead_or_redundant_call(), diagnose_sb_0(), eliminate_local_variables_stmt(), execute_cse_sincos_1(), execute_early_expand_coro_ifns(), execute_oacc_device_lower(), execute_omp_device_lower(), execute_update_addresses_taken(), expand_call_inline(), expand_complex_libcall(), expand_omp_atomic_load(), expand_omp_atomic_store(), expand_vector_conversion(), finish_update_gimple_call(), fold_builtin_atomic_compare_exchange(), gimple_assign_set_rhs_with_ops(), gimple_expand_builtin_cabs(), gimple_expand_vec_set_extract_expr(), gimple_fold_builtin_clear_padding(), gimple_fold_builtin_memory_op(), gimple_fold_builtin_memset(), gimple_fold_builtin_stpcpy(), gimple_fold_call(), gimple_fold_partial_load(), gimple_fold_partial_store(), gimple_lower_bitint(), gimplify_and_update_call_from_tree(), gsi_replace_with_seq(), handle_builtin_alloca(), strlen_pass::handle_builtin_memset(), instrument_si_overflow(), ipa_simd_modify_function_body(), lower_assumption(), lower_coro_builtin(), lower_omp_1(), lower_omp_critical(), lower_omp_dispatch(), lower_omp_for(), lower_omp_master(), lower_omp_ordered(), lower_omp_ordered_clauses(), lower_omp_scan(), lower_omp_scope(), lower_omp_sections(), lower_omp_single(), lower_omp_target(), lower_omp_taskgroup(), lower_omp_taskreg(), lower_omp_teams(), match_arith_overflow(), match_single_bit_test(), match_uaddc_usubc(), match_unsigned_saturation_trunc(), ipa_param_adjustments::modify_call(), ipa_param_body_adjustments::modify_cfun_body(), omp_oacc_kernels_decompose_callback_stmt(), omp_sese_split_blocks(), ompdevlow_adjust_simt_enter(), optimize_vector_constructor(), predicate_statements(), replace_call_with_call_and_fold(), replace_call_with_value(), replace_func_exit(), replace_loop_annotate(), replace_loop_annotate_in_block(), replace_mult_candidate(), replace_one_candidate(), vec_info::replace_stmt(), rewrite_reciprocal(), rewrite_stmt(), scan_omp_1_stmt(), scan_omp_parallel(), scan_omp_simd(), scan_omp_simd_scan(), scan_omp_task(), simplify_builtin_call(), simplify_using_ranges::simplify_internal_call_using_ranges(), simplify_rotate(), strip_predict_hints(), tm_memopt_transform_stmt(), ubsan_expand_null_ifn(), ubsan_expand_ptr_ifn(), ubsan_instrument_unreachable(), use_internal_fn(), vect_finish_replace_stmt(), vect_transform_loop(), and vectorize_slp_instance_root_stmt().
void gsi_replace_with_seq | ( | gimple_stmt_iterator * | gsi, |
gimple_seq | seq, | ||
bool | update_eh_info ) |
Replace the statement pointed-to by GSI with the sequence SEQ. If UPDATE_EH_INFO is true, the exception handling information of the original statement is moved to the last statement of the new sequence. If the old statement is an assignment, then so must be the last statement of the new sequence, and they must have the same LHS.
References gimple_seq_empty_p(), gsi_insert_seq_before(), gsi_last(), gsi_remove(), gsi_replace(), GSI_SAME_STMT, gsi_stmt(), and last.
Referenced by asan_expand_mark_ifn(), default_goacc_reduction(), gsi_replace_with_seq_vops(), lower_omp_1(), oacc_xform_loop(), oacc_xform_tile(), and simplify_count_trailing_zeroes().
void gsi_safe_insert_before | ( | gimple_stmt_iterator * | iter, |
gimple * | g ) |
Insert G stmt before ITER and keep ITER pointing to the same statement as before. If ITER is a returns_twice call, insert it on an appropriate edge instead.
References adjust_before_returns_twice_call(), bb_has_abnormal_pred(), ECF_RETURNS_TWICE, edge_before_returns_twice_call(), g, gimple_call_flags(), gsi_bb(), gsi_for_stmt(), gsi_insert_before(), gsi_insert_on_edge_immediate(), GSI_SAME_STMT, gsi_stmt(), is_gimple_call(), and single_succ_edge().
Referenced by asan_expand_mark_ifn(), build_check_stmt(), gimple_lower_bitint(), instrument_mem_ref(), instrument_nonnull_arg(), instrument_nonnull_return(), instrument_object_size(), instrument_pointer_overflow(), maybe_cast_to_ptrmode(), maybe_create_ssa_name(), and maybe_instrument_call().
void gsi_safe_insert_seq_before | ( | gimple_stmt_iterator * | iter, |
gimple_seq | seq ) |
Similarly for sequence SEQ.
References adjust_before_returns_twice_call(), bb_has_abnormal_pred(), ECF_RETURNS_TWICE, edge_before_returns_twice_call(), g, gimple_call_flags(), gimple_seq_empty_p(), gimple_seq_first_stmt(), gimple_seq_last_stmt(), gsi_bb(), gsi_for_stmt(), gsi_insert_seq_before(), gsi_insert_seq_on_edge_immediate(), gsi_next(), GSI_SAME_STMT, gsi_stmt(), is_gimple_call(), and single_succ_edge().
Referenced by instrument_object_size(), and maybe_instrument_pointer_overflow().
void gsi_set_stmt | ( | gimple_stmt_iterator * | gsi, |
gimple * | stmt ) |
Set the statement to which GSI points to STMT. This only updates the iterator and the gimple sequence, it doesn't do the bookkeeping of gsi_replace.
References gimple_seq_set_first(), gimple_seq_set_last(), gsi_stmt(), gimple::next, gimple::prev, gimple_stmt_iterator::ptr, and gimple_stmt_iterator::seq.
Referenced by gimplify_cleanup_point_expr(), gsi_replace(), and reserve_phi_args_for_new_edge().
gimple_seq gsi_split_seq_after | ( | gimple_stmt_iterator | i | ) |
Move all statements in the sequence after I to a new sequence. Return this new sequence.
References gcc_assert, gimple_seq_last(), gimple_seq_set_first(), gimple_seq_set_last(), i, gimple::next, and NULL.
Referenced by gimplify_body(), gimplify_cleanup_point_expr(), and ssa_create_duplicates().
void gsi_split_seq_before | ( | gimple_stmt_iterator * | i, |
gimple_seq * | pnew_seq ) |
Move all statements in the sequence before I to a new sequence. Return this new sequence. I is set to the head of the new list.
References gcc_assert, gimple_seq_last(), gimple_seq_set_first(), gimple_seq_set_last(), i, gimple::next, NULL, and gimple::prev.
Referenced by gimple_split_block(), and make_blocks_1().
gimple_stmt_iterator gsi_start_edge | ( | edge | e | ) |
Return a new iterator pointing to the first statement in sequence of statements on edge E. Such statements need to be subsequently moved into a basic block by calling gsi_commit_edge_inserts.
References gsi_start(), and PENDING_STMT.
Referenced by sra_modify_assign(), sra_modify_call_arg(), and sra_modify_expr().
gphi_iterator gsi_start_phis | ( | basic_block | bb | ) |
Returns iterator at the start of the list of phi nodes of BB.
References gimple::bb, gimple_bb(), gimple_seq_first(), i, NULL, phi_nodes_ptr(), and gimple_stmt_iterator::ptr.
Referenced by _bb_vec_info::_bb_vec_info(), _loop_vec_info::_loop_vec_info(), add_phi_args_after_copy_edge(), add_scope_conflicts_1(), add_successor_phi_arg(), autofdo::afdo_set_bb_count(), loop_cand::analyze_carried_vars(), analyze_function_body(), loop_cand::analyze_lcssa_phis(), dom_opt_dom_walker::before_dom_children(), eliminate_dom_walker::before_dom_children(), find_candidates_dom_walker::before_dom_children(), rewrite_dom_walker::before_dom_children(), rewrite_update_dom_walker::before_dom_children(), strlen_pass::before_dom_children(), substitute_and_fold_dom_walker::before_dom_children(), tree_switch_conversion::switch_conversion::build_arrays(), tree_switch_conversion::switch_conversion::build_constructors(), build_ssa_conflict_graph(), calculate_live_on_exit(), loop_cand::can_interchange_p(), canonicalize_loop_ivs(), ccp_initialize(), check_all_va_list_escapes(), check_exit_phi(), tree_switch_conversion::switch_conversion::check_final_bb(), check_loop_closed_ssa_bb(), clean_up_loop_closed_phi(), cleanup_empty_eh_merge_phis(), coalesce_partitions(), collect_dfa_stats(), combine_blocks(), compute_avail(), compute_invariantness(), compute_live_vars_1(), compute_optimized_partition_bases(), path_range_query::compute_phi_relations(), compute_points_to_sets(), path_range_query::compute_ranges_in_phis(), cond_if_else_store_replacement(), connect_loop_phis(), consider_split(), copy_loop_before(), copy_phi_arg_into_existing_phi(), copy_phi_args(), copy_phis_for_bb(), count_stmts_and_phis_in_block(), cprop_into_successor_phis(), create_coalesce_list_for_region(), create_loads_for_reductions(), create_parallel_loop(), destroy_loop(), determine_reduction_stmt_1(), determine_set_costs(), determine_value_range(), do_rpo_vn_1(), dump_phi_nodes(), easy_exit_values(), edge_before_returns_twice_call(), eliminate_build(), eliminate_tail_call(), eliminate_temp_copies(), eliminate_unnecessary_stmts(), eliminate_useless_phis(), empty_bb_without_guard_p(), pointer_equiv_analyzer::enter(), estimate_threading_killed_stmts(), loop_distribution::execute(), execute_sm_if_changed(), execute_update_addresses_taken(), tree_switch_conversion::switch_conversion::exp_index_transform(), expand_omp_for_generic(), expand_omp_for_static_chunk(), expand_omp_for_static_nochunk(), final_value_replacement_loop(), find_bivs(), find_implicit_erroneous_behavior(), find_interesting_uses(), find_interesting_uses_outside(), pcom_worker::find_looparound_phi(), find_necessary_statements(), find_obviously_necessary_stmts(), find_phi_with_arg_on_edge(), find_seed_stmts_for_distribution(), find_ssa_names_to_propagate(), find_subloop_latch_edge_by_ivs(), find_uses_to_rename_bb(), tree_switch_conversion::switch_conversion::fix_phi_nodes(), tree_switch_conversion::switch_decision_tree::fix_phi_operands_for_edges(), flush_pending_stmts(), free_rdg(), fuse_loops(), tree_switch_conversion::switch_conversion::gather_default_values(), gather_scalar_reductions(), tree_switch_conversion::switch_conversion::gen_inbound_check(), generate_loops_for_partition(), get_all_stmt_may_generate_copy(), get_virtual_phi(), get_vop_from_header(), gimple_can_merge_blocks_p(), gimple_dump_bb_for_graph(), gimple_duplicate_bb(), gimple_ic(), gimple_lower_bitint(), gimple_lv_adjust_loop_header_phi(), gimple_make_forwarder_block(), gimple_merge_blocks(), gsi_for_phi(), gsi_for_stmt(), gsi_start_nonvirtual_phis(), has_phis_p(), hoist_adjacent_loads(), hoist_guard(), if_convertible_loop_p_1(), ifcombine_replace_cond(), ifcvt_local_dce(), init_copy_prop(), init_dont_simulate_again(), initialize_flags_in_bb(), input_function(), insert_backedge_copies(), ipa_analyze_params_uses_in_bb(), ipa_pta_execute(), ipa_simd_modify_function_body(), is_feasible_trace(), loop_closed_phi_def(), loop_has_phi_with_address_arg(), loop_has_vector_phi_nodes(), lower_emutls_function_body(), lto_prepare_function_for_streaming(), mark_bivs(), maybe_optimize_guarding_check(), ipa_param_body_adjustments::modify_cfun_body(), move_block_to_fn(), move_computations_worker(), num_phis(), optimize_spaceship(), optimize_va_list_gpr_fpr_size(), output_bb(), phi_alternatives_equal(), phi_args_equal_on_edges(), poor_ifcvt_pred(), fvrp_folder::pre_fold_bb(), rvrp_folder::pre_fold_bb(), predicate_all_scalar_phis(), prepare_block_for_update_1(), process_bb(), substitute_and_fold_engine::propagate_into_phi_args(), propagate_through_phis(), cgraph_edge::rebuild_edges(), cgraph_edge::rebuild_references(), record_edge_info(), record_equivalences_from_phis(), condition_info::record_phi_mapping(), tree_switch_conversion::switch_decision_tree::record_phi_operand_mapping(), jump_threader::record_temporary_equivalences_from_phis(), release_last_vdef(), remove_dead_phis(), remove_forwarder_block_with_phi(), remove_phi_args(), remove_phi_nodes(), remove_unused_locals(), rename_variables_in_bb(), renumber_gimple_stmt_uids_in_block(), reserve_phi_args_for_new_edge(), reset_flow_sensitive_info_in_bb(), rewrite_add_phi_arguments(), rewrite_all_phi_nodes_with_iv(), rewrite_trees(), rewrite_update_phi_arguments(), same_phi_alternatives_1(), same_phi_args_p(), same_succ_hash(), scan_function(), separate_decls_in_region(), sese_build_liveouts_bb(), set_uid_loop_bbs(), should_duplicate_loop_header_p(), shrink_wrap_one_built_in_call_with_conds(), ssa_propagation_engine::simulate_block(), sink_clobbers(), slpeel_tree_duplicate_loop_to_edge_cfg(), slpeel_update_phi_nodes_for_guard1(), split_function(), split_loop_exit_edge(), ssa_prop_init(), ssa_redirect_edge(), loop_distribution::stmts_from_loop(), suitable_cond_bb(), transform_to_exit_first_loop(), transform_to_exit_first_loop_alt(), tree_transform_and_unroll_loop(), try_create_reduction_list(), unroll_jam_possible_p(), unsplit_eh(), update_epilogue_loop_vinfo(), update_phi_components(), update_ssa_across_abnormal_edges(), vect_analyze_loop_2(), vect_analyze_loop_operations(), vect_analyze_scalar_cycles_1(), vect_analyze_slp(), vect_can_advance_ivs_p(), vect_detect_hybrid_slp(), vect_determine_precisions(), vect_determine_vectorization_factor(), vect_do_peeling(), vect_loop_versioning(), vect_mark_stmts_to_be_vectorized(), vect_transform_loop(), vect_update_ivs_after_vectorizer(), vect_update_vf_for_slp(), verify_gimple_in_cfg(), verify_live_on_entry(), cgraph_node::verify_node(), verify_non_ssa_vars(), verify_ssa(), verify_ssaname_freelists(), verify_vssa(), visit_bb(), vop_phi(), warn_uninit_phi_uses(), and _bb_vec_info::~_bb_vec_info().
|
static |
Set BB to be the basic block for all the statements in the list starting at FIRST and LAST.
References gimple_set_bb(), last, and gimple::next.
Referenced by gsi_insert_seq_nodes_after(), and gsi_insert_seq_nodes_before().
|
static |
Set the frequencies for the cgraph_edges for each of the calls starting at FIRST for their new position within BB.
References basic_block_def::count, cgraph_edge::count, current_function_decl, cgraph_node::get(), cgraph_node::get_edge(), is_gimple_call(), gimple::next, and NULL.
Referenced by gsi_commit_one_edge_insert(), gsi_insert_on_edge_immediate(), and gsi_insert_seq_on_edge_immediate().
|
inlinestatic |
Iterator routines for GIMPLE statements. Copyright (C) 2007-2024 Free Software Foundation, Inc. Contributed by Aldy Hernandez <aldy@quesejoda.com> 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/>.
Mark the statement STMT as modified, and update it.
References cfun, ssa_operands_active(), and update_stmt_if_modified().
Referenced by gsi_insert_after(), gsi_insert_before(), and gsi_replace().
void update_modified_stmts | ( | gimple_seq | seq | ) |
Mark the statements in SEQ as modified, and update them.
References cfun, gsi_end_p(), gsi_next(), gsi_start(), gsi_stmt(), ssa_operands_active(), and update_stmt_if_modified().
Referenced by expand_ifn_va_arg_1(), gsi_insert_seq_after(), and gsi_insert_seq_before().