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 "stringpool.h"
#include "gimple-ssa.h"
#include "fold-const.h"
#include "tree-eh.h"
#include "gimplify.h"
#include "stor-layout.h"
#include "demangle.h"
#include "hash-set.h"
#include "rtl.h"
#include "tree-pass.h"
#include "attribs.h"
#include "target.h"
#include "gt-gimple-expr.h"
Variables | |
static unsigned int | tmp_var_id_num |
static hash_set< tree > * | mark_addressable_queue |
Canonicalize a tree T for use in a COND_EXPR as conditional. Returns a canonicalized tree that is valid for a COND_EXPR or NULL_TREE, if we failed to create one.
References build2(), build_int_cst(), COMPARISON_CLASS_P, CONVERT_EXPR_P, integer_onep(), integer_zerop(), is_gimple_condexpr_1(), NULL_TREE, TREE_CODE, TREE_OPERAND, TREE_TYPE, and truth_value_p().
Referenced by combine_cond_expr_cond(), and ifcombine_replace_cond().
Create a new VAR_DECL and copy information from VAR to it.
References build_decl(), copy_warning(), DECL_ALIGN, DECL_ARTIFICIAL, DECL_ATTRIBUTES, DECL_CONTEXT, DECL_IGNORED_P, DECL_NOT_GIMPLE_REG_P, DECL_SEEN_IN_BIND_EXPR_P, DECL_SOURCE_LOCATION, DECL_USER_ALIGN, SET_DECL_ALIGN, TREE_ADDRESSABLE, TREE_THIS_VOLATILE, and TREE_USED.
Referenced by ipa_param_body_adjustments::get_replacement_ssa_base(), omp_copy_decl_2(), and replace_by_duplicate_decl().
Create a new temporary variable declaration of type TYPE by calling create_tmp_var and if TYPE is a vector or a complex number, mark the new temporary as gimple register.
References create_tmp_var.
Referenced by build_tm_load(), build_tm_store(), create_tmp_reg_or_ssa_name(), execute_omp_device_lower(), execute_sm(), execute_sm_if_changed_flag_set(), expand_call_tm(), expand_complex_div_wide(), expand_omp_atomic_cas(), expand_omp_atomic_pipeline(), expand_omp_for_init_counts(), expand_omp_for_init_vars(), expand_omp_for_static_chunk(), expand_omp_for_static_nochunk(), expand_thunk(), expand_transaction(), fixup_noreturn_call(), generate_tm_state(), get_last_alloca_addr(), get_reaching_def(), gimple_build_vector(), gimple_build_vector_from_val(), gimple_divmod_fixed_value(), gimple_lower_bitint(), gimple_mod_pow2(), gimple_mod_subtract(), gimple_regimplify_operands(), gimplify_asm_expr(), gimplify_omp_atomic(), gimplify_parameters(), gimplify_return_expr(), insert_phi_nodes(), insert_reciprocals(), ipa_tm_insert_gettmclone_call(), lower_builtin_posix_memalign(), lower_builtin_setjmp(), maybe_push_res_to_seq(), maybe_register_def(), ipa_param_adjustments::modify_call(), predcom_tmp_var(), pcom_worker::reassociate_to_the_same_stmt(), split_function(), thunk_adjust(), tm_log_add(), update_phi_components(), and vect_get_new_vect_var().
Create a new temporary variable declaration of type TYPE by calling create_tmp_var and if TYPE is a vector or a complex number, mark the new temporary as gimple register.
References create_tmp_var_raw(), and gimple_add_tmp_var_fn().
Referenced by expand_call_inline(), and cgraph_edge::redirect_call_stmt_to_callee().
Create a new temporary variable declaration of type TYPE. DO push the variable into the current binding. Further, assume that this is called only from gimplification or optimization, at which point the creation of certain types are bugs.
References COMPLETE_TYPE_P, create_tmp_var_raw(), gcc_assert, gimple_add_tmp_var(), and TREE_ADDRESSABLE.
tree create_tmp_var_name | ( | const char * | prefix | ) |
References ASM_FORMAT_PRIVATE_NAME, get_identifier(), remove_suffix(), and tmp_var_id_num.
Referenced by tree_switch_conversion::switch_conversion::build_one_array(), ipa_param_body_adjustments::common_initialization(), create_tmp_var_raw(), expand_thunk(), get_chain_decl(), gimplify_function_tree(), gimplify_init_constructor(), gimplify_modify_expr(), internal_get_tmp_var(), oacc_do_neutering(), scan_omp_parallel(), scan_omp_single(), scan_omp_target(), scan_omp_task(), scan_omp_teams(), and separate_decls_in_region().
Create a new temporary variable declaration of type TYPE. Do NOT push it into the current binding.
References build_decl(), create_tmp_var_name(), DECL_ARTIFICIAL, DECL_EXTERNAL, DECL_IGNORED_P, DECL_NAMELESS, input_location, NULL, TREE_READONLY, TREE_STATIC, and TREE_USED.
Referenced by add_candidate_1(), create_access_replacement(), create_tmp_reg_fn(), create_tmp_simd_array(), create_tmp_var(), create_tmp_var_for(), do_rpo_vn_1(), force_expr_to_var_cost(), get_frame_type(), gimplify_expr(), gimplify_omp_depend(), gimplify_omp_for(), handle_simd_reference(), lower_lastprivate_conditional_clauses(), lower_omp_critical(), lower_omp_for_scan(), lower_omp_target(), lower_omp_task_reductions(), lower_rec_input_clauses(), lower_rec_simd_input_clauses(), omp_apply_tile(), scan_omp_simd(), simd_clone_adjust(), and ubsan_encode_value().
void extract_ops_from_tree | ( | tree | expr, |
enum tree_code * | subcode_p, | ||
tree * | op1_p, | ||
tree * | op2_p, | ||
tree * | op3_p ) |
----- Expression related -----
Extract the operands and code for expression EXPR into *SUBCODE_P, *OP1_P, *OP2_P and *OP3_P respectively.
References expr, gcc_unreachable, get_gimple_rhs_class(), GIMPLE_BINARY_RHS, GIMPLE_SINGLE_RHS, GIMPLE_TERNARY_RHS, GIMPLE_UNARY_RHS, NULL_TREE, TREE_CODE, and TREE_OPERAND.
Referenced by derive_constant_upper_bound(), eliminate_redundant_comparison(), expr_expected_value(), extract_ops_from_tree(), gimple_assign_set_rhs_from_tree(), gimple_build_assign(), gimple_cond_get_ops_from_tree(), interpret_expr(), split_constant_offset(), and vect_check_gather_scatter().
void flush_mark_addressable_queue | ( | void | ) |
Mark all queued trees as addressable, and empty the queue. To be called right after clearing CURRENTLY_EXPANDING_TO_RTL.
References currently_expanding_to_rtl, gcc_assert, mark_addressable_2(), mark_addressable_queue, NULL, and hash_set< KeyId, Lazy, Traits >::traverse().
gimple_seq gimple_body | ( | tree | fndecl | ) |
Return the body of GIMPLE statements for function FN. After the CFG pass, the function body doesn't exist anymore because it has been split up into basic blocks. In this case, it returns NULL.
References DECL_STRUCT_FUNCTION, function::gimple_body, and NULL.
Referenced by diagnose_omp_structured_block_errors(), diagnose_tm_blocks(), dump_function_to_file(), execute_build_cfg(), execute_function_todo(), execute_lower_coro_builtins(), execute_lower_omp(), execute_lower_tm(), finalize_nesting_tree_1(), gimple_add_tmp_var(), gimple_has_body_p(), gimplify_all_functions(), gimplify_function_tree(), lower_function_body(), omp_oacc_kernels_decompose(), and walk_function().
void gimple_cond_get_ops_from_tree | ( | tree | cond, |
enum tree_code * | code_p, | ||
tree * | lhs_p, | ||
tree * | rhs_p ) |
Extract operands for a GIMPLE_COND statement out of COND_EXPR tree COND.
References build_zero_cst(), COMPARISON_CLASS_P, extract_ops_from_tree(), gcc_assert, gcc_checking_assert, is_gimple_min_invariant(), NULL_TREE, SSA_VAR_P, tcc_comparison, TREE_CODE, TREE_CODE_CLASS, tree_could_throw_p(), and TREE_TYPE.
Referenced by gimple_build_cond_empty(), gimple_build_cond_from_tree(), gimple_cond_set_condition_from_tree(), and gimplify_cond_expr().
const char * gimple_decl_printable_name | ( | tree | decl, |
int | verbosity ) |
Return a printable name for symbol DECL.
References DECL_ASSEMBLER_NAME_RAW, DECL_ASSEMBLER_NAME_SET_P, DECL_NAME, HAS_DECL_ASSEMBLER_NAME_P, IDENTIFIER_POINTER, NULL, and TREE_CODE.
Return true when FNDECL has Gimple body either in unlowered or CFG form.
References function::cfg, function::curr_properties, DECL_STRUCT_FUNCTION, gimple_body(), and PROP_rtl.
Referenced by cgraph_node::add_new_function(), cgraph_node::analyze(), analyze_functions(), autofdo::auto_profile(), can_early_inline_edge_p(), symbol_table::compile(), count_formal_params(), do_per_function(), cgraph_node::dump(), dump_function_to_file(), expand_call_inline(), function_and_variable_visibility(), cgraph_node::get_untransformed_body(), ipa_populate_param_decls(), ipa_write_summaries(), lto_output(), mark_functions_to_output(), output_function(), push_function_arg_decls(), tree_profiling(), and cgraph_node::verify_node().
void gimple_set_body | ( | tree | fndecl, |
gimple_seq | seq ) |
----- Decl related -----
Set sequence SEQ to be the GIMPLE body for function FN.
References DECL_STRUCT_FUNCTION, gcc_assert, function::gimple_body, and NULL.
Referenced by diagnose_omp_structured_block_errors(), execute_build_cfg(), execute_lower_coro_builtins(), execute_lower_tm(), cgraph_node::expand(), expand_omp_target(), expand_omp_taskreg(), finalize_task_copyfn(), gimplify_function_tree(), input_function(), lower_assumption(), lower_function_body(), omp_oacc_kernels_decompose(), release_function_body(), and walk_function().
bool is_gimple_address | ( | const_tree | t | ) |
Return true if T is a gimple address.
References CONSTANT_CLASS_P, handled_component_p(), is_gimple_val(), TREE_CODE, and TREE_OPERAND.
Similarly, but accept hard registers as inputs to asm statements.
References DECL_HARD_REGISTER, is_gimple_val(), and VAR_P.
Referenced by gimple_regimplify_operands(), gimplify_asm_expr(), and gimplify_expr().
Return true if T is a valid function operand of a CALL_EXPR.
References is_gimple_val(), and TREE_CODE.
Referenced by gimple_build_call(), gimple_build_call_valist(), gimple_regimplify_operands(), gimplify_call_expr(), gimplify_expr(), and verify_gimple_call().
Helper for is_gimple_condexpr and is_gimple_condexpr_for_cond.
References COMPARISON_CLASS_P, is_gimple_val(), TREE_CODE, tree_could_throw_p(), TREE_OPERAND, and TREE_TYPE.
Referenced by canonicalize_cond_expr_cond(), and is_gimple_condexpr_for_cond().
Like is_gimple_condexpr, but does not allow T to trap.
References is_gimple_condexpr_1().
Referenced by determine_exit_conditions(), forward_propagate_into_gimple_cond(), gen_parallel_loop(), gimple_lv_add_condition_to_bb(), gimplify_cond_expr(), gimplify_expr(), ifcombine_replace_cond(), set_ifsese_condition(), slpeel_add_loop_guard(), and vect_loop_versioning().
bool is_gimple_invariant_address | ( | const_tree | t | ) |
Return true if T is a gimple invariant address.
References CONSTANT_CLASS_P, decl_address_invariant_p(), strip_invariant_refs(), TREE_CODE, and TREE_OPERAND.
Referenced by is_gimple_min_invariant().
bool is_gimple_ip_invariant | ( | const_tree | t | ) |
Return true if T is a GIMPLE interprocedural invariant. It's a restricted form of gimple minimal invariant.
References is_gimple_constant(), is_gimple_ip_invariant_address(), and TREE_CODE.
Referenced by analyze_agg_content_value(), ipcp_modif_dom_walker::before_dom_children(), tree_switch_conversion::switch_conversion::check_final_bb(), compute_complex_assign_jump_func(), decompose_param_expr(), find_constructor_constant_at_offset(), ipa_compute_jump_functions_for_edge(), ipa_get_jf_arith_result(), ipa_make_edge_direct_to_target(), phi_result_unknown_predicate(), propagate_aggregate_lattice(), and set_cond_stmt_execution_predicate().
bool is_gimple_ip_invariant_address | ( | const_tree | t | ) |
Return true if T is a gimple invariant address at IPA level (so addresses of variables on stack are not allowed).
References CONSTANT_CLASS_P, decl_address_ip_invariant_p(), strip_invariant_refs(), TREE_CODE, and TREE_OPERAND.
Referenced by ipa_get_jf_ancestor_result(), and is_gimple_ip_invariant().
Return true if T is a valid LHS for a GIMPLE assignment expression.
References is_gimple_addressable(), and TREE_CODE.
Referenced by gimple_regimplify_operands(), gimplify_adjust_omp_clauses(), gimplify_arg(), gimplify_asm_expr(), gimplify_expr(), gimplify_init_constructor(), gimplify_init_ctor_eval(), gimplify_modify_expr(), gimplify_modify_expr_rhs(), gimplify_omp_affinity(), gimplify_scan_omp_clauses(), gimplify_self_mod_expr(), goa_stabilize_expr(), is_gimple_mem_rhs(), is_gimple_mem_rhs_or_call(), valid_gimple_call_p(), and verify_gimple_call().
Return true if T is a valid address operand of a MEM_REF.
References CONSTANT_CLASS_P, decl_address_invariant_p(), is_gimple_reg(), TREE_CODE, and TREE_OPERAND.
Referenced by add_offset_to_base(), create_mem_ref(), expand_debug_expr(), forward_propagate_addr_expr_1(), gather_mem_refs_stmt(), get_memory_rtx(), gimple_fold_builtin_clear_padding(), gimplify_expr(), gimplify_mem_ref_parts(), maybe_canonicalize_mem_ref_addr(), ref_at_iteration(), and verify_types_in_gimple_reference().
bool is_gimple_min_invariant | ( | const_tree | t | ) |
Return true if T is a GIMPLE minimal invariant. It's a restricted form of function invariant.
References is_gimple_constant(), is_gimple_invariant_address(), and TREE_CODE.
Referenced by aff_combination_expand(), analyze_function_body(), associate_equivalences_with_edges(), back_propagate_equivalences(), build_simple_mem_ref_loc(), bump_vector_ptr(), can_propagate_from(), canonicalize_constructor_val(), chain_of_csts_start(), chrec_contains_symbols_defined_in_loop(), combine_cond_expr_cond(), compare_values_warnv(), consider_split(), copy_prop_visit_assignment(), copy_reference_ops_from_ref(), copy_tree_body_r(), create_component_ref_by_pieces_1(), create_expression_by_pieces(), cse_and_gimplify_to_preheader(), destroy_loop(), detach_value(), discover_nonconstant_array_refs_r(), eliminate_dom_walker::eliminate_avail(), rpo_elim::eliminate_push_avail(), eliminate_redundant_computations(), eliminate_dom_walker::eliminate_stmt(), eliminated_by_inlining_prob(), pointer_equiv_analyzer::enter(), evaluate_properties_for_edge(), evaluate_stmt(), evolution_function_is_constant_p(), expand_gimple_stmt_1(), expand_simple_operations(), expr_invariant_in_loop_p(), expr_invariant_in_region_p(), extract_single_var_from_expr(), find_deriving_biv_for_expr(), find_func_clobbers(), find_or_generate_expression(), find_return_bb(), fold_gimple_assign(), for_each_index(), force_expr_to_var_cost(), force_move_till_op(), forward_propagate_addr_expr_1(), forward_propagate_into_gimple_cond(), fully_constant_expression(), fully_constant_vn_reference_p(), get_base_for(), get_constant_value(), ipa_polymorphic_call_context::get_dynamic_type(), pointer_equiv_analyzer::get_equiv_expr(), get_references_in_stmt(), get_scev_info(), get_single_symbol(), get_symbol_constant_value(), get_val_for(), get_value_for_expr(), get_value_locus_in_path(), gimple_cond_get_ops_from_tree(), gimple_extract(), gimple_fold_builtin_memory_op(), gimple_fold_stmt_to_constant(), gimple_fold_stmt_to_constant_1(), gimplify_compound_lval(), gimplify_scan_omp_clauses(), ifcvt_available_on_edge_p(), independent_of_stmt_p(), insert_into_preds_of_block(), instantiate_scev_r(), interpret_rhs_expr(), is_factor_profitable(), is_gimple_val(), likely_value(), avail_exprs_stack::lookup_avail_expr(), loop_combined_static_and_iv_p(), loop_invariant_op_p(), loop_niter_by_eval(), loop_static_op_p(), lower_emutls_1(), lower_omp_for(), maybe_fold_reference(), maybe_instrument_call(), maybe_optimize_range_tests(), maybe_trim_constructor_store(), move_stmt_op(), predicate::normalize(), optimize_ops_list(), outermost_invariant_loop(), outermost_invariant_loop_for_expr(), param_change_prob(), phi_translate_1(), phiprop_insert_phi(), predicate_for_phi_result(), process_bb(), substitute_and_fold_engine::propagate_into_phi_args(), propagate_necessity(), queue_phi_copy_p(), record_edge_info(), record_equality(), record_equivalences_from_stmt(), ref_maybe_used_by_call_p_1(), ref_maybe_used_by_stmt_p(), jt_state::register_equivs_stmt(), remap_gimple_op_r(), replace_uses_by(), run_rpo_vn(), same_value_p(), set_component_ssa_name(), set_ssa_val_to(), set_value_id_for_result(), setup_one_parameter(), simple_mem_ref_in_stmt(), simplify_using_ranges::simplify_compare_using_ranges_1(), jump_threader::simplify_control_stmt_condition(), jump_threader::simplify_control_stmt_condition_1(), simplify_using_outer_evolutions(), stmt_may_generate_copy(), stmt_may_generate_copy(), test_for_singularity(), jump_threader::thread_around_empty_blocks(), jump_threader::thread_through_normal_block(), tree_estimate_loop_size(), tree_lower_complex(), tree_node_can_be_shared(), try_to_simplify(), uncprop_into_successor_phis(), valid_gimple_rhs_p(), valid_lattice_transition(), value_available_p(), vect_is_simple_use(), vect_simd_lane_linear(), verify_phi_args(), verify_types_in_gimple_reference(), visit_phi(), visit_reference_op_call(), visit_reference_op_store(), visit_stmt(), vn_get_stmt_kind(), vn_reference_lookup_3(), will_be_nonconstant_expr_predicate(), and workshare_safe_to_combine_p().
Return true if T is a GIMPLE minimal lvalue.
References CONST_CAST_TREE, is_gimple_id(), strip_invariant_refs(), and TREE_CODE.
Referenced by expand_ifn_va_arg_1(), gimple_regimplify_operands(), gimplify_asm_expr(), gimplify_compound_lval(), gimplify_expr(), and gimplify_modify_expr_rhs().
Return true if T is a non-aggregate register variable.
References DECL_HARD_REGISTER, DECL_NOT_GIMPLE_REG_P, is_gimple_reg_type(), is_gimple_variable(), needs_to_live_in_memory(), TREE_CODE, TREE_THIS_VOLATILE, TREE_TYPE, VAR_P, and virtual_operand_p().
Referenced by add_clobbers_to_eh_landing_pad(), operands_scanner::add_stmt_operand(), rewrite_dom_walker::after_dom_children(), assign_parm_setup_block(), build_simple_mem_ref_loc(), ipa_param_body_adjustments::common_initialization(), consider_split(), copy_decl_for_dup_finish(), create_coalesce_list_for_region(), create_default_def(), cse_and_gimplify_to_preheader(), declare_return_variable(), dump_defs_stack(), dump_immediate_uses_for(), eliminate_dom_walker::eliminate_stmt(), eliminated_by_inlining_prob(), expand_assign_tm(), expand_call_inline(), expand_function_start(), expand_used_vars(), finalize_nesting_tree_1(), find_tail_calls(), force_gimple_operand_1(), ipa_param_body_adjustments::get_ddef_if_exists_and_is_used(), gimple_regimplify_operands(), gimple_store_p(), gimplify_asm_expr(), gimplify_bind_expr(), gimplify_compound_lval(), gimplify_decl_expr(), gimplify_expr(), gimplify_init_constructor(), gimplify_modify_expr(), gimplify_modify_expr_rhs(), gimplify_omp_for(), gimplify_parameters(), gimplify_scan_omp_clauses(), gsi_replace_with_seq_vops(), initialize_inlined_parameters(), insert_debug_temp_for_var_def(), insert_init_stmt(), ipa_analyze_controlled_uses(), ipcp_update_vr(), is_asan_mark_p(), is_complex_reg(), is_gimple_mem_ref_addr(), is_gimple_val(), link_use_stmts_after(), lower_omp_target(), lower_rec_simd_input_clauses(), ipa_param_body_adjustments::mark_clobbers_dead(), mark_nonssa_use(), may_be_nonaddressable_p(), maybe_instrument_call(), maybe_optimize_var(), maybe_register_def(), ipa_param_adjustments::modify_call(), ipa_param_body_adjustments::modify_expression(), nonoverlapping_memrefs_p(), op_iter_init_phidef(), op_iter_init_phiuse(), op_iter_next_def(), op_iter_next_tree(), prepare_gimple_addressable(), record_equivalences_from_stmt(), ref_maybe_used_by_stmt_p(), register_new_def(), ipa_param_body_adjustments::reset_debug_stmts(), rewrite_stmt(), rhs_predicate_for(), set_parm_default_def_partition(), set_rtl(), setup_one_parameter(), simd_clone_linear_addend(), single_phi_def(), split_function(), test_nonssa_use(), tree_function_versioning(), update_parameter_components(), use_pointer_for_field(), uses_consumed_by_stmt(), vect_finish_stmt_generation(), verify_gimple_assign(), verify_gimple_assign_binary(), verify_gimple_assign_single(), verify_gimple_assign_ternary(), verify_gimple_assign_unary(), verify_gimple_call(), verify_types_in_gimple_reference(), visit_reference_op_store(), and walk_gimple_op().
Returns true iff T is a valid RHS for an assignment to a renamed user -- or front-end generated artificial -- variable.
References get_gimple_rhs_class(), GIMPLE_INVALID_RHS, and TREE_CODE.
Referenced by force_gimple_operand(), force_gimple_operand_gsi(), and gimplify_expr().
Return true if T is a GIMPLE rvalue, i.e. an identifier or a constant.
References is_gimple_min_invariant(), is_gimple_reg(), is_gimple_reg_type(), is_gimple_variable(), and TREE_TYPE.
Referenced by add_to_predicate_list(), copy_phis_for_bb(), create_mem_ref(), declare_return_variable(), eliminate_local_variables_1(), eliminate_redundant_comparison(), expand_thunk(), expr_no_side_effects_p(), expression_expensive_p(), find_interesting_uses_stmt(), fold_strstr_to_strncmp(), force_gimple_operand(), force_gimple_operand_1(), force_gimple_operand_gsi(), generic_expr_could_trap_p(), get_shiftadd_cost(), gimple_assign_copy_p(), gimple_build_vector_from_val(), gimple_regimplify_operands(), gimple_simplified_result_is_gimple_val(), gimplify_adjust_omp_clauses(), gimplify_adjust_omp_clauses_1(), gimplify_arg(), gimplify_asm_expr(), gimplify_compound_lval(), gimplify_expr(), gimplify_init_constructor(), gimplify_init_ctor_eval_range(), gimplify_omp_affinity(), gimplify_omp_atomic(), gimplify_omp_depend(), gimplify_omp_dispatch(), gimplify_omp_for(), gimplify_omp_loop_xform(), gimplify_one_sizepos(), gimplify_pure_cond_expr(), gimplify_scan_omp_clauses(), gimplify_self_mod_expr(), gimplify_switch_expr(), goa_stabilize_expr(), gsi_gimplify_val(), ifcvt_can_use_mask_load_store(), instrument_builtin(), instrument_nonnull_arg(), instrument_nonnull_return(), is_gimple_address(), is_gimple_asm_val(), is_gimple_call_addr(), is_gimple_condexpr_1(), is_gimple_mem_rhs(), is_gimple_mem_rhs_or_call(), lower_assumption(), lower_depend_clauses(), lower_lastprivate_clauses(), lower_omp_target(), lower_omp_teams(), lower_rec_input_clauses(), lower_reduction_clauses(), move_stmt(), optimize_range_tests_to_bit_test(), optimize_target_teams(), remove_dead_stmt(), set_bb_predicate(), simplify_builtin_call(), split_function(), std_gimplify_va_arg_expr(), stmt_is_replaceable_p(), valid_gimple_call_p(), valid_gimple_rhs_p(), vect_gen_vector_loop_niters(), vect_gen_vector_loop_niters_mult_vf(), vect_loop_versioning(), vectorizable_condition(), verify_gimple_assign_binary(), verify_gimple_assign_single(), verify_gimple_assign_ternary(), verify_gimple_assign_unary(), verify_gimple_call(), verify_gimple_comparison(), verify_gimple_goto(), verify_gimple_phi(), verify_gimple_return(), verify_gimple_switch(), verify_types_in_gimple_reference(), version_loop_by_alias_check(), walk_regimplify_addr_expr(), and walk_regimplify_phi().
void mark_addressable | ( | tree | x | ) |
Mark X addressable. Unlike the langhook we expect X to be in gimple form and we don't do any syntax checking.
References cfun, DECL_EXTERNAL, handled_component_p(), mark_addressable_1(), NULL, TREE_CODE, TREE_OPERAND, TREE_STATIC, and VAR_P.
Referenced by build_addr(), create_iv(), declare_return_variable(), detach_value(), emit_block_op_via_libcall(), emit_library_call_value_1(), expand_asm_stmt(), expand_DEFERRED_INIT(), gimple_add_padding_init_for_auto_var(), gimple_lower_bitint(), gimplify_addr_expr(), gimplify_asm_expr(), gimplify_expr(), gimplify_modify_expr_rhs(), gimplify_modify_expr_to_memcpy(), initialize_argument_information(), instrument_builtin_call(), instrument_derefs(), instrument_object_size(), lower_omp_target(), predicate_load_or_store(), prepare_target_mem_ref_lvalue(), and ubsan_encode_value().
|
static |
Mark X as addressable or queue it up if called during expand. We don't want to apply it immediately during expand because decls are made addressable at that point due to RTL-only concerns, such as uses of memcpy for block moves, and TREE_ADDRESSABLE changes is_gimple_reg, which might make it seem like a variable that used to be a gimple_reg shouldn't have been an SSA name. So we queue up this flag setting and only apply it when we're done with GIMPLE and only RTL issues matter.
References hash_set< KeyId, Lazy, Traits >::add(), currently_expanding_to_rtl, mark_addressable_queue, and TREE_ADDRESSABLE.
Referenced by mark_addressable(), and mark_addressable_2().
Adaptor for mark_addressable_1 for use in hash_set traversal.
References mark_addressable_1().
Referenced by flush_mark_addressable_queue().
|
inlinestatic |
Strip off a legitimate source ending from the input string NAME of length LEN. Rather than having to know the names used by all of our front ends, we strip off an ending of a period followed by up to four characters. (like ".cpp".)
References i.
Referenced by create_tmp_var_name().
Gimple decl, type, and expression support functions. Copyright (C) 2007-2024 Free Software Foundation, Inc. Contributed by Aldy Hernandez <aldyh@redhat.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/>.
----- Type related -----
Return true if the conversion from INNER_TYPE to OUTER_TYPE is a useless type conversion, otherwise return false. This function implicitly defines the middle-end type system. With the notion of 'a < b' meaning that useless_type_conversion_p (a, b) holds and 'a > b' meaning that useless_type_conversion_p (b, a) holds, the following invariants shall be fulfilled: 1) useless_type_conversion_p is transitive. If a < b and b < c then a < c. 2) useless_type_conversion_p is not symmetric. From a < b does not follow a > b. 3) Types define the available set of operations applicable to values. A type conversion is useless if the operations for the target type is a subset of the operations for the source type. For example casts to void* are useless, casts from void* are not (void* can't be dereferenced or offsetted, but copied, hence its set of operations is a strict subset of that of all other data pointer types). Casts to const T* are useless (can't be written to), casts from const T* to T* are not.
References AGGREGATE_TYPE_P, comp_type_attributes(), FIXED_POINT_TYPE_P, FUNC_OR_METHOD_TYPE_P, INTEGRAL_TYPE_P, known_eq, NULL_TREE, POINTER_TYPE_P, prototype_p(), SCALAR_FLOAT_TYPE_P, targetm, TREE_CHAIN, TREE_CODE, tree_int_cst_equal(), TREE_TYPE, TREE_VALUE, TYPE_ADDR_SPACE, TYPE_ARG_TYPES, TYPE_ATTRIBUTES, TYPE_CANONICAL, TYPE_DOMAIN, TYPE_MAIN_VARIANT, TYPE_MAX_VALUE, TYPE_METHOD_BASETYPE, TYPE_MIN_VALUE, TYPE_MODE, TYPE_OFFSET_BASETYPE, TYPE_PRECISION, TYPE_REVERSE_STORAGE_ORDER, TYPE_SATURATING, TYPE_SIZE, TYPE_STRING_FLAG, TYPE_UNSIGNED, TYPE_VECTOR_SUBPARTS(), useless_type_conversion_p(), and VECTOR_TYPE_P.
Referenced by aff_combination_expand(), analyze_agg_content_value(), eliminate_dom_walker::before_dom_children(), ipcp_modif_dom_walker::before_dom_children(), build_accesses_from_assign(), build_tm_load(), build_tm_store(), canonicalize_addr_expr(), canonicalize_component_ref(), canonicalize_constructor_val(), chrec_convert_1(), chrec_convert_aggressive(), chrec_fold_multiply_poly_poly(), chrec_fold_plus_poly_poly(), compare_values_warnv(), component_ref_size(), compute_complex_assign_jump_func(), connect_loop_phis(), convert_mult_to_widen(), convert_plusminus_to_widen(), create_expression_by_pieces(), create_mem_ref(), declare_return_variable(), pcom_worker::determine_offset(), eliminate_redundant_comparison(), eliminate_redundant_computations(), eliminate_dom_walker::eliminate_stmt(), evaluate_conditions_for_known_args(), execute_update_addresses_taken(), expand_ifn_va_arg_1(), expand_omp_atomic_cas(), expand_omp_atomic_load(), expand_omp_atomic_store(), expand_omp_for_generic(), expand_omp_for_static_chunk(), expand_omp_for_static_nochunk(), expand_omp_taskloop_for_inner(), expand_thunk(), expand_vector_condition(), expand_vector_operations_1(), expand_vector_scalar_condition(), find_tail_calls(), fold_builtin_atomic_compare_exchange(), fold_ctor_reference(), fold_gimple_assign(), ccp_folder::fold_stmt(), fold_stmt_1(), forward_propagate_addr_expr_1(), forward_propagate_into_comparison(), generate_memset_builtin(), get_initial_defs_for_reduction(), get_symbol_constant_value(), get_val_across_arith_op(), gimple_builtin_call_types_compatible_p(), gimple_convert(), gimple_fold_builtin_fprintf(), gimple_fold_builtin_printf(), gimple_fold_builtin_snprintf(), gimple_fold_builtin_sprintf(), gimple_fold_indirect_ref(), gimple_fold_stmt_to_constant_1(), gimplify_addr_expr(), gimplify_expr(), gimplify_init_constructor(), gimplify_init_ctor_eval(), gimplify_modify_expr(), strlen_pass::handle_builtin_strchr(), strlen_pass::handle_builtin_strlen(), strlen_pass::handle_pointer_plus(), initialize_inlined_parameters(), insert_into_preds_of_block(), instrument_builtin_call(), ipa_agg_value_from_jfunc(), ipa_return_value_range(), ipa_simd_modify_stmt_ops(), ipa_tm_insert_gettmclone_call(), ipacp_value_safe_for_type(), is_truth_type_for(), load_assign_lhs_subreplacements(), lower_omp_task_reductions(), lower_rec_input_clauses(), lower_reduction_clauses(), match_arith_overflow(), may_propagate_copy(), may_propagate_copy_into_stmt(), maybe_rewrite_mem_ref_base(), minmax_replacement(), ipa_param_body_adjustments::modify_assignment(), ipa_param_adjustments::modify_call(), ipa_param_body_adjustments::modify_expression(), non_rewritable_mem_ref_base(), one_pointer_to_useless_type_conversion_p(), optimize_atomic_op_fetch_cmp_0(), optimize_ops_list(), optimize_range_tests_cmp_bitwise(), optimize_range_tests_var_bound(), optimize_spaceship(), phi_translate_1(), prepare_vec_mask(), fold_using_range::range_of_call(), refine_bounds_using_guard(), refine_value_range_using_guard(), remap_gimple_op_r(), replace_call_with_value(), replace_mult_candidate(), self_recursive_agg_pass_through_p(), setup_one_parameter(), simd_clone_adjust(), simd_clone_linear_addend(), simple_iv_with_niters(), simplify_builtin_call(), simplify_using_ranges::simplify_internal_call_using_ranges(), simplify_rotate(), simplify_using_ranges::simplify_truth_ops_using_ranges(), simplify_vector_constructor(), size_for_offset(), split_function(), sra_modify_assign(), sra_modify_expr(), strub_call_fntype_override_p(), take_address_of(), task_reduction_read(), tree_builtin_call_types_compatible_p(), tree_ssa_useless_type_conversion(), tree_transform_and_unroll_loop(), types_compatible_p(), ubsan_expand_vptr_ifn(), undistribute_bitref_for_vector(), useless_type_conversion_p(), valueized_wider_op(), vect_add_conversion_to_pattern(), vect_build_one_gather_load_call(), vect_build_one_scatter_store_call(), vect_check_store_rhs(), vect_init_vector(), vect_recog_bit_insert_pattern(), vect_recog_bitfield_ref_pattern(), vect_recog_bool_pattern(), vect_recog_rotate_pattern(), vect_slp_analyze_operations(), vect_slp_check_for_roots(), vect_slp_is_lane_insert(), vect_transform_cycle_phi(), vectorizable_bb_reduc_epilogue(), vectorizable_condition(), vectorizable_induction(), vectorizable_phi(), vectorizable_recurr(), vectorizable_simd_clone_call(), vectorizable_store(), vectorize_fold_left_reduction(), vectorize_slp_instance_root_stmt(), verify_gimple_assign_binary(), verify_gimple_assign_single(), verify_gimple_assign_ternary(), verify_gimple_assign_unary(), verify_gimple_call(), verify_gimple_comparison(), verify_gimple_phi(), verify_gimple_return(), verify_type(), verify_types_in_gimple_reference(), visit_nary_op(), and visit_reference_op_load().
Hold trees marked addressable during expand.
Referenced by flush_mark_addressable_queue(), and mark_addressable_1().
|
static |
Create a new temporary name with PREFIX. Return an identifier.
Referenced by create_tmp_var_name().