GCC Middle and Back End API Reference
|
Data Structures | |
struct | type_hash |
struct | free_lang_data_d |
Variables | |
enum tree_code_class | tree_code_type [] |
const unsigned char | tree_code_length [] |
const char *const | tree_code_name [] |
const char *const | tree_code_class_strings [] |
static int | tree_code_counts [MAX_TREE_CODES] |
int | tree_node_counts [(int) all_kinds] |
int | tree_node_sizes [(int) all_kinds] |
static const char *const | tree_node_kind_names [] |
static int | next_decl_uid |
static int | next_type_uid = 1 |
static int | next_debug_decl_uid |
static htab_t | type_hash_table |
static tree | int_cst_node |
static htab_t | int_cst_hash_table |
static tree | cl_optimization_node |
static tree | cl_target_option_node |
static htab_t | cl_option_hash_table |
static htab_t | debug_expr_for_decl |
static htab_t | value_expr_for_decl |
static htab_t | debug_args_for_decl |
const char *const | omp_clause_code_name [] |
vec< tree, va_gc > * | all_translation_units |
static tree | nonstandard_integer_type_cache [2 *MAX_INT_CACHED_PREC+2] |
static const char * | ts_enum_names [] |
static tree | gcc_eh_personality_decl |
int _obstack_allocated_p | ( | struct obstack * | h, |
void * | obj | ||
) |
obstack.[ch] explicitly declined to prototype this.
|
static |
Add type or decl T to one of the list of tree nodes that need their language data removed. The lists are held inside FLD.
References free_lang_data_d::decls, DINFO_LEVEL_TERSE, save_debug_info_for_decl(), save_debug_info_for_type(), and free_lang_data_d::types.
Referenced by find_decls_types_r().
int allocate_decl_uid | ( | void | ) |
Allocate and return a new UID from the DECL_UID namespace.
References next_decl_uid.
Referenced by build_fake_var_decl(), copy_node_stat(), and make_node_stat().
tree array_type_nelts | ( | ) |
Return, as a tree node, the number of elements for TYPE (which is an ARRAY_TYPE) minus one. This counts only elements of the top array.
References integer_zerop().
Referenced by count_type_elements().
void assign_assembler_name_if_neeeded | ( | ) |
If T needs an assembler name, have one created for it.
References decl_assembler_name(), input_location, and need_assembler_name_p().
Referenced by analyze_function(), and free_lang_data_in_cgraph().
bool associative_tree_code | ( | ) |
Return true if CODE represents an associative tree code. Otherwise return false.
Referenced by is_reduction_operation_p(), may_reassociate_p(), reassociate_bb(), undistribute_ops_list(), and vect_is_simple_reduction_1().
|
static |
Compute a hash code for a list of attributes (chain of TREE_LIST nodes with names in the TREE_PURPOSE slots and args in the TREE_VALUE slots), by adding the hash codes of the individual attributes.
References get_attribute_name().
Referenced by build_type_attribute_qual_variant().
int attribute_list_contained | ( | ) |
Given two lists of attributes, return true if list L2 is completely contained within L1.
??? This would be faster if attribute names were stored in a canonicalized form. Otherwise, if L1 uses `foo' and L2 uses `__foo__', the long method must be used to show these elements are equivalent (which they are).
??? It's not clear that attributes with arguments will always be handled correctly.
References attribute_value_equal(), get_attribute_name(), and lookup_ident_attribute().
Referenced by attribute_list_equal(), and merge_attributes().
int attribute_list_equal | ( | ) |
Given two lists of attributes, return true if list l2 is equivalent to l1.
References attribute_list_contained().
Referenced by build_type_attribute_qual_variant(), check_aligned_type(), check_qualified_type(), and type_hash_eq().
|
static |
Compare two attributes for their value identity. Return true if the attribute values are known to be equal; otherwise return false.
References simple_cst_equal(), and simple_cst_list_equal().
Referenced by attribute_list_contained(), comp_type_attributes(), and merge_attributes().
bool auto_var_in_fn_p | ( | ) |
Return true if VAR is an automatic variable defined in function FN.
Referenced by can_be_nonlocal(), copy_tree_body_r(), estimated_stack_frame_size(), find_func_clobbers(), find_return_bb(), find_tail_calls(), find_var_from_fn(), fold_comparison(), mark_nonssa_use(), output_gimple_stmt(), remap_gimple_op_r(), remap_gimple_stmt(), self_inlining_addr_expr(), test_nonssa_use(), and tree_single_nonzero_warnv_p().
tree bit_position | ( | ) |
Return the bit position of FIELD, in bits from the start of the record. This is a tree of type bitsizetype.
References bit_from_pos().
Referenced by add_bit_offset_attribute(), build_user_friendly_ref_for_offset(), compute_record_mode(), dbxout_type_fields(), dequeue_and_dump(), field_byte_offset(), hoist_adjacent_loads(), int_bit_position(), sdbout_field_types(), sdbout_one_type(), store_constructor(), and type_internals_preclude_sra_p().
location_t* block_nonartificial_location | ( | ) |
If BLOCK is inlined from an __attribute__((__artificial__)) routine, return pointer to location from where it has been called.
References lookup_attribute().
Referenced by final_scan_insn(), and tree_nonartificial_location().
tree block_ultimate_origin | ( | ) |
Determine the "ultimate origin" of a block. The block may be an inlined instance of an inlined instance of a block which is local to an inline function, so we have to trace all of the way back through the origin chain to find out what sort of node actually served as the original seed for the given block.
Referenced by DFS_write_tree_body(), dump_scope_block(), gen_inlined_subroutine_die(), and write_ts_block_tree_pointers().
tree build0_stat | ( | ) |
Build an expression of code CODE, data type TYPE, and operands as specified. Expressions and reference nodes can be created this way. Constants, decls, types and misc nodes cannot be. We define 5 non-variadic functions, from 0 to 4 arguments. This is enough for all extant tree codes.
References make_node_stat().
tree build1_stat | ( | ) |
tree build2_stat | ( | ) |
References make_node_stat(), ptrofftype_p(), tcc_binary, tcc_comparison, and tcc_reference.
References make_node_stat(), tcc_reference, and tcc_vl_exp.
tree build4_stat | ( | enum tree_code | code, |
tree | tt, | ||
tree | arg0, | ||
tree | arg1, | ||
tree | arg2, | ||
tree arg3 | MEM_STAT_DECL | ||
) |
References make_node_stat(), and tcc_reference.
tree build5_stat | ( | enum tree_code | code, |
tree | tt, | ||
tree | arg0, | ||
tree | arg1, | ||
tree | arg2, | ||
tree | arg3, | ||
tree arg4 | MEM_STAT_DECL | ||
) |
References make_node_stat(), and tcc_reference.
tree build_aligned_type | ( | ) |
Create a variant of type T with alignment ALIGN.
References build_variant_type_copy(), check_aligned_type(), and type().
Referenced by build_ref_for_offset(), fold_builtin_memory_op(), ipa_modify_call_arguments(), replace_ref(), vectorizable_load(), and vectorizable_store().
tree build_all_ones_cst | ( | ) |
Return an integer of type TYPE containing all 1's in as much precision as it contains, or a complex or vector whose subparts are such integers.
References build_complex(), and build_minus_one_cst().
Referenced by associate_plusminus(), and fold_binary_loc().
tree build_array_type | ( | ) |
Wrapper around build_array_type_1 with SHARED set to true.
References build_array_type_1().
Referenced by asan_pp_string(), build_array_type_nelts(), build_fn_info_type(), build_info(), build_info_type(), build_one_array(), build_string_literal(), coverage_counter_alloc(), coverage_end_function(), coverage_obj_finish(), create_zero_dim_array(), get_memory_rtx(), get_nl_goto_field(), get_trampoline_type(), init_eh(), input_gimple_stmt(), mf_build_string(), mudflap_init(), optimize_one_addr_into_implicit_ptr(), reconstruct_complex_type(), and resolve_one_addr().
|
static |
Construct, lay out and return the type of arrays of elements with ELT_TYPE and number of elements specified by the range of values of INDEX_TYPE. If SHARED is true, reuse such a type that has already been constructed.
References error(), layout_type(), and type_hash_canon().
Referenced by build_array_type(), and build_nonshared_array_type().
tree build_array_type_nelts | ( | ) |
Return a representation of ELT_TYPE[NELTS], using indices of type sizetype.
References build_array_type(), and build_index_type().
Referenced by asan_finish_file(), create_vector_array(), finish_bitfield_representative(), fold_builtin_alloca_with_align(), lower_rec_simd_input_clauses(), vector_element(), vectorizable_load(), vectorizable_store(), and vectorize_loops().
tree build_block | ( | ) |
BLOCK nodes are used to represent the structure of binding contours and declarations, once those contours have been exited and their contents compiled. This information is used for outputting debugging info.
|
static |
Helper function for build_call_* functions; build a CALL_EXPR with indicated RETURN_TYPE, FN, and NARGS, but do not initialize any of the argument slots.
Referenced by build_call_array_loc(), build_call_valist(), and build_call_vec().
tree build_call_array_loc | ( | location_t | loc, |
tree | return_type, | ||
tree | fn, | ||
int | nargs, | ||
const tree * | args | ||
) |
Build a CALL_EXPR of class tcc_vl_exp with the indicated RETURN_TYPE and FN and a null static chain slot. NARGS is the number of call arguments which are specified as a tree array ARGS.
References build_call_1(), and process_call_operands().
Referenced by fold_builtin_call_array(), gimple_fold_stmt_to_constant_1(), and gimplify_call_expr().
tree build_call_nary | ( | ) |
Build a CALL_EXPR of class tcc_vl_exp with the indicated RETURN_TYPE and FN and a null static chain slot. NARGS is the number of call arguments which are specified as "..." arguments.
References build_call_valist().
Referenced by expand_builtin_cexpi().
tree build_call_valist | ( | ) |
Build a CALL_EXPR of class tcc_vl_exp with the indicated RETURN_TYPE and FN and a null static chain slot. NARGS is the number of call arguments which are specified as a va_list ARGS.
References build_call_1(), and process_call_operands().
Referenced by build_call_nary(), and build_call_nofold_loc().
tree build_call_vec | ( | ) |
Like build_call_array, but takes a vec.
References build_call_1(), process_call_operands(), and vec_safe_length().
Referenced by expand_builtin().
tree build_case_label | ( | ) |
Create a CASE_LABEL_EXPR tree node and return it.
Referenced by expand_omp_sections(), gimplify_switch_expr(), lower_eh_dispatch(), lower_try_finally_switch(), preprocess_case_label_vec_for_gimple(), simplify_gimple_switch_label_vec(), and sjlj_emit_dispatch_table().
void build_common_builtin_nodes | ( | void | ) |
Call this function after instantiating all builtins that the language front end cares about. This will build the rest of the builtins that are relied upon by the tree optimizers and the middle-end.
References build_function_type(), build_function_type_list(), BUILT_IN_COMPLEX_DIV_MIN, BUILT_IN_COMPLEX_MUL_MIN, built_in_names, builtin_decl_explicit(), builtin_decl_explicit_p(), local_define_builtin(), targetm, type(), lang_hooks_for_types::type_for_mode, lang_hooks::types, and UI_SJLJ.
void build_common_tree_nodes | ( | ) |
Create nodes for all integer types (and error_mark_node) using the sizes of C datatypes. SIGNED_CHAR specifies whether char is signed, SHORT_DOUBLE specifies whether double should be of the same precision as float.
Make fixed-point nodes based on sat/non-sat and signed/unsigned.
Make fixed-point type nodes based on four different widths.
Make fixed-point mode nodes based on sat/non-sat and signed/unsigned.
References build_complex_type(), build_int_cst(), build_nonstandard_integer_type(), build_pointer_type(), build_variant_type_copy(), get_identifier(), initialize_sizetypes(), layout_type(), make_or_reuse_type(), make_signed_type(), make_unsigned_type(), SA, and targetm.
tree build_complex | ( | ) |
Return a newly constructed COMPLEX_CST node whose value is specified by the real and imaginary parts REAL and IMAG. Both REAL and IMAG should be constant nodes. TYPE, if specified, will be the type of the COMPLEX_CST; otherwise a new type will be made.
References build_complex_type().
Referenced by build_all_ones_cst(), build_complex_cproj(), build_minus_one_cst(), build_one_cst(), build_zero_cst(), const_binop(), copy_constant(), do_mpc_ckconv(), do_mpfr_sincos(), fold_binary_loc(), fold_negate_expr(), fold_unary_loc(), gimplify_init_constructor(), gimplify_modify_expr_complex_part(), and native_interpret_complex().
tree build_complex_type | ( | ) |
Create a complex type whose components are COMPONENT_TYPE.
References build_qualified_type(), get_identifier(), layout_type(), and type_hash_canon().
Referenced by build_common_tree_nodes(), build_complex(), do_mpfr_sincos(), and expand_builtin_cexpi().
tree build_constructor | ( | ) |
Return a new CONSTRUCTOR node whose type is TYPE and whose values are in the vec pointed to by VALS.
References side_effects_p(), type(), and constructor_elt_d::value.
Referenced by asan_add_global(), asan_finish_file(), build_constructor_from_list(), build_constructor_single(), build_constructor_va(), build_fn_info(), build_info(), build_one_array(), build_vector_from_val(), build_zero_cst(), coverage_obj_finish(), create_expression_by_pieces(), default_emutls_var_init(), expand_expr_real_1(), expand_vector_condition(), expand_vector_piecewise(), fold_ternary_loc(), fold_vec_perm(), get_initial_def_for_induction(), get_initial_def_for_reduction(), gimplify_bind_expr(), gimplify_target_expr(), insert_clobber_before_stack_restore(), lower_vec_perm(), sra_ipa_modify_assign(), vect_get_constant_vectors(), and vectorizable_load().
tree build_constructor_from_list | ( | ) |
Return a new CONSTRUCTOR node whose type is TYPE and whose values are in a list pointed to by VALS.
References build_constructor(), list_length(), and vec_alloc().
tree build_constructor_single | ( | ) |
Build a CONSTRUCTOR node made of a single initializer, with the specified INDEX and VALUE.
References build_constructor(), and vec_alloc().
tree build_constructor_va | ( | ) |
Return a new CONSTRUCTOR node whose type is TYPE. NELTS is the number of elements, provided as index/value pairs.
References build_constructor(), and vec_alloc().
tree build_decl_attribute_variant | ( | ) |
Return a declaration like DDECL except that its DECL_ATTRIBUTES is ATTRIBUTE.
Create a DECL_... node of code CODE, name NAME and data type TYPE. We do NOT enter this node in any sort of symbol table. LOC is the location of the decl. layout_decl is used to set up the decl's storage layout. Other slots are initialized to 0 or null pointers.
if (type == error_mark_node) type = integer_type_node;
That is not done, deliberately, so that having error_mark_node as the type can suppress useless errors in the use of this variable.
References layout_decl(), make_node_stat(), and type().
tree build_distinct_type_copy | ( | ) |
Create a new distinct copy of TYPE. The new type is made its own MAIN_VARIANT. If TYPE requires structural equality checks, the resulting type requires structural equality checks; otherwise, its TYPE_CANONICAL points to itself.
References copy_node().
Referenced by asan_init_shadow_ptr_types(), build_function_type_skip_args(), build_opaque_vector_type(), build_type_attribute_qual_variant(), build_variant_type_copy(), and ipa_modify_formal_parameters().
tree build_empty_stmt | ( | ) |
Build an empty statement at location LOC.
Referenced by copy_tree_body_r(), fold_builtin_1(), and gimplify_call_expr().
tree build_fixed | ( | ) |
Return a new FIXED_CST node whose type is TYPE and value is F.
References FIXED_VALUE_TYPE, memcpy(), and type().
tree build_fn_decl | ( | ) |
Builds and returns function declaration with NAME and TYPE.
References get_identifier(), and input_location.
Referenced by expand_builtin_cexpi(), expand_builtin_int_roundingfn(), and gimple_init_edge_profiler().
Build variant of function decl ORIG_DECL skipping ARGS_TO_SKIP and the return value if SKIP_RETURN is true. Arguments from DECL_ARGUMENTS list can't be removed now, since they are linked by TREE_CHAIN directly. The caller is responsible for eliminating them when they are being duplicated (i.e. copy_arguments_for_versioning).
References bitmap_bit_p(), bitmap_empty_p(), build_function_type_skip_args(), copy_node(), NOT_BUILT_IN, and prototype_p().
Referenced by cgraph_create_virtual_clone(), and cgraph_function_versioning().
tree build_function_type | ( | ) |
Construct, lay out and return the type of functions returning type VALUE_TYPE given arguments of types ARG_TYPES. ARG_TYPES is a chain of TREE_LIST nodes whose TREE_VALUEs are data type nodes for the arguments of the function. If such a type has already been constructed, reuse it.
References error(), layout_type(), maybe_canonicalize_argtypes(), type_hash_canon(), and type_hash_list().
Referenced by build_common_builtin_nodes(), build_function_type_array_1(), build_function_type_list_1(), build_function_type_skip_args(), build_libfunc_function(), emit_library_call_value_1(), ipa_modify_formal_parameters(), reconstruct_complex_type(), and self_referential_size().
tree build_function_type_array | ( | ) |
Build a function type. RETURN_TYPE is the type returned by the function. The function takes N named arguments, the types of which are provided in ARG_TYPES.
References build_function_type_array_1().
|
static |
Build a function type. RETURN_TYPE is the type returned by the function; VAARGS indicates whether the function takes varargs. The function takes N named arguments, the types of which are provided in ARG_TYPES.
References build_function_type().
Referenced by build_function_type_array(), and build_varargs_function_type_array().
tree build_function_type_list | ( | ) |
Build a function type. The RETURN_TYPE is the type returned by the function. If additional arguments are provided, they are additional argument types. The list of argument types must always be terminated by NULL_TREE.
References build_function_type_list_1().
Referenced by build_common_builtin_nodes(), build_info_type(), build_init_ctor(), build_personality_function(), cgraph_build_static_cdtor_1(), create_loop_fn(), create_omp_child_function(), default_external_stack_protect_fail(), default_hidden_stack_protect_fail(), expand_builtin_cexpi(), expand_builtin_int_roundingfn(), gimple_init_edge_profiler(), init_block_clear_fn(), init_block_move_fn(), initialize_sanitizer_builtins(), mudflap_init(), and tree_ssa_prefetch_arrays().
|
static |
Build a function type. The RETURN_TYPE is the type returned by the function. If VAARGS is set, no void_type_node is appended to the the list. ARGP must be always be terminated be a NULL_TREE.
References build_function_type(), last, and nreverse().
Referenced by build_function_type_list(), and build_varargs_function_type_list().
|
static |
Build variant of function type ORIG_TYPE skipping ARGS_TO_SKIP and the return value if SKIP_RETURN is true.
References bitmap_bit_p(), build_distinct_type_copy(), build_function_type(), and nreverse().
Referenced by build_function_decl_skip_args().
tree build_index_type | ( | ) |
Create a type of integers to be the TYPE_DOMAIN of an ARRAY_TYPE. MAXVAL should be the maximum value in the domain (one less than the length of the array). The maximum value that MAXVAL can have is INT_MAX for a HOST_WIDE_INT. We don't enforce this limit, that is up to caller (e.g. language front end). The limit exists because the result is a signed type and we don't handle sizes that use more than one HOST_WIDE_INT.
References build_range_type().
Referenced by asan_pp_string(), build_array_type_nelts(), build_arrays(), build_fn_info_type(), build_info(), build_info_type(), build_string_literal(), coverage_end_function(), coverage_obj_finish(), create_zero_dim_array(), get_nl_goto_field(), get_trampoline_type(), init_eh(), mf_build_string(), optimize_one_addr_into_implicit_ptr(), and resolve_one_addr().
tree build_int_cst | ( | ) |
Create an INT_CST node with a LOW value sign extended to TYPE.
References double_int_to_tree(), and double_int::from_shwi().
Referenced by add_iv_value_candidates(), add_old_iv_candidates(), add_rshift(), add_standard_iv_candidates(), add_to_evolution_1(), adjust_bool_pattern(), adjust_simduid_builtins(), analyze_subscript_affine_affine(), array_ref_low_bound(), asan_add_global(), asan_finish_file(), assert_loop_rolls_lt(), assert_no_overflow_lt(), assign_filter_values(), attempt_builtin_powi(), build_assign(), build_builtin_expect_predicate(), build_check_stmt(), build_common_tree_nodes(), build_debug_ref_for_model(), build_invariant_address(), build_minus_one_cst(), build_one_cst(), build_polynomial_chrec(), build_predict_expr(), build_range_check(), build_ref_for_offset(), build_simple_mem_ref_loc(), build_tm_abort_call(), build_tm_store(), build_user_friendly_ref_for_offset(), build_vl_exp_stat(), build_zero_cst(), can_use_analyze_subscript_affine_affine(), canonicalize_bool(), canonicalize_cond_expr_cond(), canonicalize_loop_ivs(), chrec_fold_multiply(), chrec_fold_multiply_poly_poly(), chrec_is_positive(), compute_overlap_steps_for_affine_univar(), constant_boolean_node(), convert_to_integer(), copy_bb(), copy_reference_ops_from_ref(), create_array_ref(), create_canonical_iv(), create_component_ref_by_pieces_1(), create_mem_ref_raw(), create_parallel_loop(), declare_return_variable(), decrement_power(), default_emutls_var_init(), detect_type_change_ssa(), determine_known_aggregate_parts(), do_compare(), do_mpfr_lgamma_r(), do_mpfr_remquo(), dr_analyze_indices(), dummy_object(), emit_case_dispatch_table(), emutls_common_1(), estimate_numbers_of_iterations_loop(), evaluate_stmt(), execute_cse_sincos(), expand_builtin_sincos(), expand_expr_real_1(), expand_omp_atomic_fetch_op(), expand_omp_atomic_load(), expand_omp_atomic_pipeline(), expand_omp_atomic_store(), expand_omp_for_generic(), expand_omp_for_init_counts(), expand_omp_for_static_chunk(), expand_omp_for_static_nochunk(), expand_omp_sections(), expand_omp_simd(), expand_parallel_call(), expand_sjlj_dispatch_table(), expand_task_call(), expand_transaction(), expand_vector_divmod(), extract_omp_for_data(), extract_range_basic(), extract_range_from_assert(), extract_range_from_binary_expr_1(), extract_range_from_unary_expr_1(), find_loop_niter(), fold_addr_of_array_ref_difference(), fold_binary_loc(), fold_builtin_bitop(), fold_builtin_bswap(), fold_builtin_classify_type(), fold_builtin_fprintf(), fold_builtin_fputs(), fold_builtin_frexp(), fold_builtin_isascii(), fold_builtin_isdigit(), fold_builtin_logb(), fold_builtin_memchr(), fold_builtin_memory_op(), fold_builtin_printf(), fold_builtin_snprintf(), fold_builtin_sprintf(), fold_builtin_stpcpy(), fold_builtin_strchr(), fold_builtin_strcpy(), fold_builtin_strcspn(), fold_builtin_strpbrk(), fold_builtin_strrchr(), fold_builtin_strspn(), fold_builtin_strstr(), fold_builtin_stxcpy_chk(), fold_builtin_toascii(), fold_comparison(), fold_cond_expr_with_comparison(), fold_div_compare(), fold_gimple_assign(), fold_plusminus_mult_expr(), fold_relational_const(), fold_single_bit_test(), fold_single_bit_test_into_sign_test(), fold_ternary_loc(), fold_truth_andor_1(), fold_truth_not_expr(), fold_unary_loc(), force_constant_size(), force_expr_to_var_cost(), gen_conditions_for_pow_int_base(), gen_one_condition(), gen_parallel_loop(), generate_memset_builtin(), get_component_ssa_name(), get_computation_cost_at(), get_initial_def_for_induction(), get_initial_def_for_reduction(), get_iv(), get_mem_refs_of_builtin_call(), get_memory_rtx(), get_ws_args_for(), gimple_gen_edge_profiler(), gimple_gen_ic_func_profiler(), gimple_mod_pow2(), gimplify_call_expr(), gimplify_expr(), gimplify_omp_for(), handle_builtin_memcpy(), handle_builtin_strcat(), handle_builtin_strchr(), handle_builtin_strcpy(), handle_builtin_strlen(), handle_char_store(), idx_analyze_ref(), ifcombine_ifandif(), infer_value_range(), init_range_entry(), initialize_matrix_A(), instrument_builtin_call(), instrument_mem_region_access(), inverse(), ipa_modify_call_arguments(), ipa_tm_insert_irr_call(), layout_type(), loop_niter_by_eval(), lower_eh_constructs_2(), lower_eh_dispatch(), lower_emutls_1(), lower_omp_for_lastprivate(), lower_omp_single_copy(), lower_rec_input_clauses(), lower_resx(), lower_try_finally_switch(), lower_vec_perm(), make_range(), make_range_step(), maybe_canonicalize_comparison_1(), mf_build_check_statement_for(), move_stmt_eh_region_tree_nr(), mudflap_register_call(), node_has_high_bound(), node_has_low_bound(), number_of_exit_cond_executions(), number_of_iterations_cond(), number_of_iterations_le(), number_of_iterations_lt(), number_of_iterations_ne(), number_of_latch_executions(), omega_setup_subscript(), optimize_bit_field_compare(), optimize_range_tests(), optimize_stack_restore(), output_gimple_stmt(), range_includes_zero_p(), read_vector_array(), recognize_single_bit_test(), register_edge_assert_for_1(), register_edge_assert_for_2(), remap_eh_region_tree_nr(), rewrite_bittest(), round_down_loc(), round_up_loc(), scan_omp_task(), set_and_canonicalize_value_range(), set_min_and_max_values_for_integral_type(), set_prologue_iterations(), set_value_range_to_nonnegative(), set_value_range_to_nonnull(), set_value_range_to_null(), set_value_range_to_truthvalue(), simple_iv(), simplify_bitfield_ref(), simplify_builtin_call(), simplify_div_or_mod_using_ranges(), simplify_gimple_switch_label_vec(), simplify_vector_constructor(), size_diffop_loc(), size_int_kind(), sjlj_emit_dispatch_table(), slpeel_make_loop_iterate_ntimes(), slpeel_tree_peel_loop_to_edge(), split_constant_offset_1(), stabilize_va_list_loc(), std_gimplify_va_arg_expr(), store_constructor(), strip_offset_1(), test_for_singularity(), tree_coverage_counter_addr(), tree_coverage_counter_ref(), tree_fold_binomial(), tree_to_aff_combination(), update_range_test(), vect_create_cond_for_align_checks(), vect_gen_niters_for_prolog_loop(), vect_gen_perm_mask(), vect_generate_tmps_on_preheader(), vect_get_constant_vectors(), vect_loop_versioning(), vect_recog_divmod_pattern(), vect_recog_rotate_pattern(), vect_setup_realignment(), vect_transform_loop(), vect_transform_slp_perm_load(), vector_element(), vectorizable_call(), vectorizable_live_operation(), vectorizable_load(), vectorizable_store(), vn_reference_lookup_3(), write_vector_array(), and zero_length_string().
tree build_int_cst_type | ( | ) |
Create an INT_CST node with a LOW value sign extended to TYPE.
References double_int_to_tree(), and double_int::from_shwi().
Referenced by add_to_evolution(), all_ones_mask_p(), bit_value_assume_aligned(), canonicalize_loop_ivs(), chrec_fold_plus_1(), chrec_fold_plus_poly_poly(), decode_field_reference(), determine_exit_conditions(), eliminate_plus_minus_pair(), fold_binary_loc(), fold_builtin_memset(), fold_builtin_object_size(), fold_read_from_constant_string(), fold_string_cst_ctor_reference(), fully_constant_vn_reference_p(), gimple_gen_interval_profiler(), inverse(), num_ending_zeros(), optimize_bit_field_compare(), reduce_to_bit_field_precision(), ref_at_iteration(), rewrite_bittest(), and split_to_var_and_offset().
tree build_int_cst_wide | ( | ) |
Create an INT_CST node of TYPE and value HI:LOW. The returned node is always shared. For small integers we use a per-type vector cache, for larger ones we use a single hash table.
References HOST_WIDE_INT, int_cst_hash_table, int_cst_node, limit, and type().
Referenced by build_low_bits_mask(), build_replicated_const(), copy_tree_body_r(), div_if_zero_remainder(), double_int_to_tree(), emit_case_bit_tests(), expand_case(), fold_builtin_bswap(), gimple_divmod_fixed_value_transform(), gimple_fold_indirect_ref(), gimple_stringops_transform(), lto_input_tree_1(), make_tree(), output_constant(), register_new_assert_for(), remap_gimple_op_r(), scan_omp_1_op(), set_min_and_max_values_for_integral_type(), and tree_fold_binomial().
tree build_invariant_address | ( | ) |
Return an invariant ADDR_EXPR of type TYPE taking the address of BASE offsetted by OFFSET units.
References build_int_cst(), and recompute_tree_invariant_for_addr_expr().
Referenced by gimple_fold_stmt_to_constant_1(), and simplify_binary_expression().
tree build_low_bits_mask | ( | ) |
Builds an integer constant in TYPE such that lowest BITS bits are ones and the rest are zeros.
References build_int_cst_wide(), double_int::high, double_int::low, and double_int::mask().
Referenced by eliminate_not_pairs(), iv_period(), number_of_iterations_ne(), and simplify_conversion_from_bitmask().
tree build_method_type | ( | ) |
Construct, lay out and return the type of methods belonging to class BASETYPE and whose arguments and values are described by TYPE. If that type exists already, reuse it. TYPE must be a FUNCTION_TYPE node.
References build_method_type_directly().
Build a METHOD_TYPE for a member of BASETYPE. The RETTYPE (a TYPE) and ARGTYPES (a TREE_LIST) are the return type and arguments types for the method. An implicit additional parameter (of type pointer-to-BASETYPE) is added to the ARGTYPES.
References build_method_type_directly(), build_pointer_type(), layout_type(), maybe_canonicalize_argtypes(), type_hash_canon(), and type_hash_list().
Referenced by build_method_type(), build_method_type_directly(), and reconstruct_complex_type().
tree build_minus_one_cst | ( | ) |
Return a constant of arithmetic type TYPE which is the opposite of the multiplicative identity of the set TYPE.
References build_complex(), build_fixed(), build_int_cst(), build_real(), build_vector_from_val(), build_zero_cst(), dconstm1, and fixed_from_double_int().
Referenced by build_all_ones_cst(), fold_binary_loc(), and process_assignment().
tree build_nonshared_array_type | ( | ) |
Wrapper around build_array_type_1 with SHARED set to false.
References build_array_type_1().
tree build_nonshared_range_type | ( | ) |
Wrapper around build_range_type_1 with SHARED set to false.
References build_range_type_1().
tree build_nonstandard_integer_type | ( | unsigned HOST_WIDE_INT | precision, |
int | unsignedp | ||
) |
Builds a signed or unsigned integer type of precision PRECISION. Used for C bitfields whose precision does not match that of built-in target types.
References fixup_signed_type(), fixup_unsigned_type(), host_integerp(), nonstandard_integer_type_cache, tree_low_cst(), and type_hash_canon().
Referenced by adjust_bool_pattern(), analyze_access_subtree(), asan_finish_file(), asan_global_struct(), build_check_stmt(), build_common_tree_nodes(), build_range_check(), canonicalize_loop_ivs(), check_bool_pattern(), convert_affine_scev(), convert_mult_to_widen(), convert_plusminus_to_widen(), do_compare(), expand_vector_divmod(), extract_omp_for_data(), fold_builtin_alloca_with_align(), get_vectype_for_scalar_type_and_size(), gimple_signed_or_unsigned_type(), initialize_sanitizer_builtins(), make_bit_field_ref(), max_precision_type(), output_constructor(), prepare_instrumented_value(), register_edge_assert_for_2(), signed_or_unsigned_type_for(), simplify_float_conversion_using_ranges(), simplify_vector_constructor(), type_for_interval(), vect_handle_widen_op_by_const(), vect_operation_fits_smaller_type(), vect_recog_divmod_pattern(), vect_recog_mixed_size_cond_pattern(), vectorizable_condition(), and vectorizable_conversion().
tree build_nt | ( | ) |
Similar except don't specify the TREE_TYPE and leave the TREE_SIDE_EFFECTS as 0. It is permissible for arguments to be null, or even garbage if their values do not matter.
References tcc_vl_exp.
Referenced by stabilize_reference(), and stabilize_reference_1().
tree build_nt_call_vec | ( | ) |
Similar to build_nt, but for creating a CALL_EXPR object with a tree vec.
References vec_safe_length().
tree build_offset_type | ( | ) |
Construct, lay out and return the type of offsets to a value of type TYPE, within an object of type BASETYPE. If a suitable offset type exists already, reuse it.
References layout_type(), type(), and type_hash_canon().
Referenced by reconstruct_complex_type().
tree build_omp_clause | ( | ) |
Build an OpenMP clause with code CODE. LOC is the location of the clause.
References memset(), omp_clause_num_ops, and record_node_allocation_statistics().
Referenced by convert_gimple_call(), convert_local_reference_stmt(), convert_nonlocal_reference_stmt(), create_parallel_loop(), gimplify_adjust_omp_clauses_1(), gimplify_omp_for(), initialize_reductions(), and lower_rec_input_clauses().
tree build_one_cst | ( | ) |
Return a constant of arithmetic type TYPE which is the multiplicative identity of the set TYPE.
References build_complex(), build_fixed(), build_int_cst(), build_real(), build_vector_from_val(), build_zero_cst(), dconst1, and FCONST1.
Referenced by fold_binary_loc(), fold_builtin_signbit(), fold_negate_expr(), fold_plusminus_mult_expr(), insert_reciprocals(), rewrite_reciprocal(), split_tree(), and vect_generate_tmps_on_preheader().
tree build_opaque_vector_type | ( | ) |
Similarly, but builds a variant type with TYPE_VECTOR_OPAQUE set.
References build_distinct_type_copy(), check_qualified_type(), and make_vector_type().
Referenced by truth_type_for().
tree build_optimization_node | ( | void | ) |
Build an OPTIMIZATION_NODE based on the current options.
References cl_optimization_node, and cl_option_hash_table.
Referenced by process_options().
tree build_pointer_type | ( | ) |
By default build pointers in ptr_mode.
References build_pointer_type_for_mode(), and targetm.
Referenced by asan_init_shadow_ptr_types(), assign_parm_find_data_types(), assign_parms_augmented_arg_list(), build_call_expr_loc_array(), build_call_nofold_loc(), build_common_tree_nodes(), build_fn_info_type(), build_fold_addr_expr_loc(), build_info_type(), build_init_ctor(), build_method_type_directly(), build_ref_for_offset(), build_string_literal(), canonicalize_addr_expr(), copy_reference_ops_from_ref(), coverage_obj_init(), create_task_copyfn(), decl_attributes(), dummy_object(), eliminate_local_variables_1(), emit_library_call_value_1(), expand_builtin_cexpi(), expand_call(), expand_call_stmt(), expand_debug_expr(), expand_function_end(), find_interesting_uses_address(), fixup_child_record_type(), fold_builtin_memory_op(), fold_builtin_memset(), force_expr_to_var_cost(), gen_emutls_addr(), get_chain_decl(), get_chain_field(), get_use_type(), gimple_gen_ic_func_profiler(), gimple_ic(), gimple_init_edge_profiler(), gimplify_addr(), gimplify_cond_expr(), gimplify_parameters(), gimplify_va_arg_expr(), gimplify_vla_decl(), init_eh(), init_ic_make_global_vars(), initialize_sanitizer_builtins(), install_var_field(), instrument_strlen_call(), ipa_modify_formal_parameters(), layout_type(), lookup_field_for_decl(), lower_copyprivate_clauses(), lower_omp_single_copy(), mf_build_string(), mf_xform_derefs_1(), move_hint_to_base(), mudflap_init(), mudflap_register_call(), mx_register_decls(), output_gimple_stmt(), prepare_call_arguments(), reference_alias_ptr_type(), separate_decls_in_region(), stabilize_va_list_loc(), std_gimplify_va_arg_expr(), thunk_adjust(), and vect_create_addr_base_for_vector_ref().
Constructors for pointer, array and function types. (RECORD_TYPE, UNION_TYPE and ENUMERAL_TYPE nodes are constructed by language-dependent code, not here.)
Construct, lay out and return the type of pointers to TO_TYPE with mode MODE. If CAN_ALIAS_ALL is TRUE, indicate this type can reference all of memory. If such a type has already been constructed, reuse it.
References build_pointer_type_for_mode(), layout_type(), and lookup_attribute().
Referenced by build_pointer_type(), build_pointer_type_for_mode(), build_type_no_quals(), expand_builtin_sincos(), expand_omp_atomic_pipeline(), fold_builtin_memcmp(), fold_builtin_memory_op(), fold_builtin_strcmp(), fold_builtin_strncmp(), reconstruct_complex_type(), remap_type_1(), and vect_create_data_ref_ptr().
tree build_qualified_type | ( | ) |
Like get_qualified_type, but creates the type if it does not exist. This function never returns NULL_TREE.
References build_variant_type_copy(), get_qualified_type(), and set_type_quals().
Referenced by build_complex_type(), build_fn_info_type(), build_info_type(), build_type_attribute_qual_variant(), canonicalize_component_ref(), coverage_obj_finish(), coverage_obj_init(), decl_attributes(), expand_constructor(), expand_expr_real_1(), expand_return(), free_lang_data_in_type(), initialize_sanitizer_builtins(), move_hint_to_base(), mudflap_init(), and store_one_arg().
tree build_range_type | ( | ) |
Wrapper around build_range_type_1 with SHARED set to true.
References build_range_type_1().
Referenced by build_index_type(), and get_memory_rtx().
|
static |
Create a range of some discrete type TYPE (an INTEGER_TYPE, ENUMERAL_TYPE or BOOLEAN_TYPE) with low bound LOWVAL and high bound HIGHVAL. If SHARED is true, reuse such a type that has already been constructed.
References iterative_hash_expr(), iterative_hash_hashval_t(), type(), and type_hash_canon().
Referenced by build_nonshared_range_type(), and build_range_type().
tree build_real | ( | ) |
tree build_real_from_int_cst | ( | ) |
Given a tree representing an integer constant I, return a tree representing the same value as a floating-point constant of type TYPE.
References build_real(), and real_value_from_int_cst().
Referenced by chrec_apply(), fold_convert_const(), and gen_one_condition().
tree build_reference_type | ( | ) |
Build the node for the type of references-to-TO_TYPE by default in ptr_mode.
References build_reference_type_for_mode(), and targetm.
Same as build_pointer_type_for_mode, but for REFERENCE_TYPE.
References build_reference_type_for_mode(), layout_type(), and lookup_attribute().
Referenced by build_reference_type(), build_reference_type_for_mode(), build_type_no_quals(), reconstruct_complex_type(), and remap_type_1().
tree build_simple_mem_ref_loc | ( | ) |
Build a simple MEM_REF tree with the sematics of a plain INDIRECT_REF on the pointer PTR.
References build_int_cst(), get_addr_base_and_unit_offset(), handled_component_p(), HOST_WIDE_INT, is_gimple_min_invariant(), is_gimple_reg(), and offset.
Referenced by build_va_arg_indirect_ref(), create_task_copyfn(), gimplify_cond_expr(), gimplify_modify_expr_rhs(), lower_copyprivate_clauses(), lower_lastprivate_clauses(), lower_rec_input_clauses(), and lower_reduction_clauses().
tree build_string | ( | ) |
Return a newly constructed STRING_CST node whose value is the LEN characters at STR. Note that for a C string literal, LEN should include the trailing NUL. The TREE_TYPE is not initialized.
References len, memcpy(), memset(), and record_node_allocation_statistics().
Referenced by asan_pp_string(), build_info(), build_string_literal(), default_asm_output_ident_directive(), default_unique_section(), expand_asm_stmt(), get_emutls_init_templ_addr(), gimplify_asm_expr(), init_block_move_fn(), mf_build_string(), new_emutls_decl(), optimize_one_addr_into_implicit_ptr(), resolve_asm_operand_names(), resolve_one_addr(), and streamer_read_string_cst().
tree build_target_option_node | ( | void | ) |
Build a TARGET_OPTION_NODE based on the current options.
References cl_option_hash_table, and cl_target_option_node.
tree build_translation_unit_decl | ( | ) |
Builds a new translation-unit decl with name NAME, queues it in the global list of translation-unit decls and returns it.
References lang_hooks::name, and vec_safe_push().
tree build_tree_list_stat | ( | ) |
Return a newly created TREE_LIST node whose purpose and value fields are PARM and VALUE.
References make_node_stat().
Referenced by build_tree_list_vec_stat().
tree build_tree_list_vec_stat | ( | ) |
Build a chain of TREE_LIST nodes from a vector.
References build_tree_list_stat().
tree build_type_attribute_qual_variant | ( | ) |
Return a type like TTYPE except that its TYPE_ATTRIBUTE is ATTRIBUTE and its qualifiers are QUALS. Record such modified types already made so we don't make duplicates.
References attribute_hash_list(), attribute_list_equal(), build_distinct_type_copy(), build_qualified_type(), comp_type_attributes(), type_hash_canon(), type_hash_list(), TYPE_UNQUALIFIED, and warning().
Referenced by build_type_attribute_variant(), make_vector_type(), reconstruct_complex_type(), and remap_type_1().
tree build_type_attribute_variant | ( | ) |
Return a type like TTYPE except that its TYPE_ATTRIBUTE is ATTRIBUTE. Record such modified types already made so we don't make duplicates.
References build_type_attribute_qual_variant().
Referenced by decl_attributes().
tree build_type_no_quals | ( | ) |
Build a type that is compatible with t but has no cv quals anywhere in its type, thus const char *const *const * -> char ***.
References build_pointer_type_for_mode(), and build_reference_type_for_mode().
tree build_varargs_function_type_array | ( | ) |
Build a variable argument function type. RETURN_TYPE is the type returned by the function. The function takes N named arguments, the types of which are provided in ARG_TYPES.
References build_function_type_array_1().
tree build_varargs_function_type_list | ( | ) |
Build a variable argument function type. The RETURN_TYPE is the type returned by the function. If additional arguments are provided, they are additional argument types. The list of argument types must always be terminated by NULL_TREE.
References build_function_type_list_1().
tree build_variant_type_copy | ( | ) |
Create a new variant of TYPE, equivalent but distinct. This is so the caller can modify it. TYPE_CANONICAL for the return type will be equivalent to TYPE_CANONICAL of TYPE, indicating that the types are considered equal by the language itself (or that both types require structural equality checks).
References build_distinct_type_copy().
Referenced by build_aligned_type(), build_common_tree_nodes(), build_qualified_type(), and std_gimplify_va_arg_expr().
tree build_vector_from_ctor | ( | ) |
Return a new VECTOR_CST node whose type is TYPE and whose values are extracted from V, a vector of CONSTRUCTOR_ELT.
References build_zero_cst(), and HOST_WIDE_INT.
Referenced by fold_gimple_assign(), get_initial_def_for_induction(), gimplify_init_constructor(), and rtl_for_decl_init().
tree build_vector_from_val | ( | ) |
Build a vector of type VECTYPE where all the elements are SCs.
References build_constructor(), sc, types_compatible_p(), and vec_alloc().
Referenced by build_minus_one_cst(), build_one_cst(), build_zero_cst(), build_zero_vector(), constant_boolean_node(), get_initial_def_for_induction(), get_initial_def_for_reduction(), vect_get_constant_vectors(), vect_init_vector(), and vectorizable_load().
tree build_vector_stat | ( | ) |
Return a new VECTOR_CST node whose type is TYPE and whose values are in a list pointed to by VALS.
References type().
tree build_vector_type | ( | ) |
Similarly, but takes the inner type and number of units, which must be a power of two.
References make_vector_type().
Referenced by build_word_mode_vector_type(), expand_vector_divmod(), get_vectype_for_scalar_type_and_size(), signed_or_unsigned_type_for(), and simplify_vector_constructor().
tree build_vector_type_for_mode | ( | ) |
Returns a vector tree node given a mode (integer, vector, or BLKmode) and the inner type.
References make_vector_type().
Referenced by type_for_widest_vector_mode().
tree build_vl_exp_stat | ( | ) |
Build a tcc_vl_exp object with code CODE and room for LEN operands. LEN includes the implicit operand count in TREE_OPERAND 0, and so must be >= 1. Except for the CODE and operand count field, other storage for the object is initialized to zeros.
References build_int_cst(), ggc_alloc_cleared_tree_node_stat(), len, record_node_allocation_statistics(), and tcc_vl_exp.
tree build_zero_cst | ( | ) |
Build 0 constant of type TYPE. This is used by constructor folding and thus the constant should be represented in memory by zero(es).
References build_complex(), build_constructor(), build_fixed(), build_int_cst(), build_real(), build_vector_from_val(), dconst0, and FCONST0.
Referenced by build_minus_one_cst(), build_one_cst(), build_vector_from_ctor(), compute_object_sizes(), const_binop(), eliminate_duplicate_pair(), eliminate_not_pairs(), eliminate_plus_minus_pair(), expand_debug_expr(), expand_omp_for_init_counts(), expand_thunk(), expand_vec_cond_expr(), expand_vector_divmod(), extract_omp_for_data(), fold(), fold_array_ctor_reference(), fold_binary_loc(), fold_builtin_signbit(), fold_cond_expr_with_comparison(), fold_const_aggregate_ref_1(), fold_mult_zconjz(), fold_nonarray_ctor_reference(), fold_string_cst_ctor_reference(), fold_ternary_loc(), fold_unary_loc(), forward_propagate_into_gimple_cond(), get_symbol_constant_value(), gimple_cond_get_ops_from_tree(), gimplify_init_constructor(), init_subtree_with_zero(), lower_builtin_setjmp(), lower_vec_perm(), omp_reduction_init(), propagate_tree_value_into_stmt(), remap_ssa_name(), rename_uses(), setup_one_parameter(), sra_ipa_modify_assign(), undistribute_ops_list(), vect_remove_slp_scalar_calls(), vector_element(), vectorizable_call(), and vn_reference_lookup_3().
tree byte_position | ( | ) |
Return the byte position of FIELD, in bytes from the start of the record. This is a tree of type sizetype.
References byte_from_pos().
Referenced by decode_addr_const(), int_byte_position(), ipa_get_stmt_member_ptr_load_param(), and mf_xform_derefs_1().
void cache_integer_cst | ( | ) |
References HOST_WIDE_INT, int_cst_hash_table, and limit.
tree chain_index | ( | ) |
Returns element number IDX (zero-origin) of chain CHAIN, or NULL_TREE.
int chain_member | ( | ) |
Return nonzero if ELEM is part of the chain CHAIN.
tree chainon | ( | ) |
Concatenate two chains of nodes (chained through TREE_CHAIN) by modifying the last node in chain 1 to point to chain 2. This is the Lisp primitive `nconc'.
Referenced by decl_attributes(), declare_inline_vars(), declare_vars(), finalize_nesting_tree_1(), gimplify_asm_expr(), maybe_canonicalize_argtypes(), and self_referential_size().
|
static |
Returns true iff CAND is equivalent to BASE with ALIGN.
References attribute_list_equal().
Referenced by build_aligned_type().
bool check_qualified_type | ( | ) |
Returns true iff CAND is equivalent to BASE with TYPE_QUALS.
References attribute_list_equal().
Referenced by build_opaque_vector_type(), and get_qualified_type().
|
static |
Return nonzero if the value represented by *X (an OPTIMIZATION or TARGET_OPTION tree node) is the same as that given by *Y, which is the same.
References len.
Referenced by init_ttree().
|
static |
These are the hash table functions for the hash table of OPTIMIZATION_NODEq nodes.
Return the hash code code X, an OPTIMIZATION_NODE or TARGET_OPTION code.
References len.
Referenced by init_ttree().
void clean_symbol_name | ( | ) |
P is a string that will be used in a symbol. Mask out any characters that are not valid in that context.
Referenced by compute_section_prefix(), create_loop_fn(), create_tmp_var_name(), and get_file_function_name().
bool commutative_ternary_tree_code | ( | ) |
Return true if CODE represents a ternary tree code for which the first two operands are commutative. Otherwise return false.
Referenced by fold_stmt_1(), hashable_expr_equal_p(), and iterative_hash_hashable_expr().
bool commutative_tree_code | ( | ) |
Return true if CODE represents a commutative tree code. Otherwise return false.
Referenced by combinable_refs_p(), expand_omp_atomic_fetch_op(), fold_binary_loc(), fold_stmt_1(), hashable_expr_equal_p(), is_reduction_operation_p(), iterative_hash_expr(), iterative_hash_hashable_expr(), may_reassociate_p(), operand_equal_p(), vect_build_slp_tree(), vect_is_simple_reduction_1(), and vn_nary_op_compute_hash().
int comp_type_attributes | ( | ) |
Return 0 if the attributes for two types are incompatible, 1 if they are compatible, and 2 if they are nearly compatible (which causes a warning to be generated).
References attribute_spec::affects_type_identity, attribute_value_equal(), get_attribute_name(), lookup_attribute(), lookup_attribute_spec(), attribute_spec::name, and targetm.
Referenced by build_type_attribute_qual_variant(), gimple_canonical_types_compatible_p(), and useless_type_conversion_p().
int compare_tree_int | ( | ) |
Compare the value of T, an INTEGER_CST, with U, an unsigned integer value. Return -1, 0, or 1 if the value of T is less than, equal to, or greater than U, respectively.
References tree_int_cst_sgn().
Referenced by analyze_siv_subscript_cst_affine(), c_getstr(), do_jump(), emit_case_dispatch_table(), expand_builtin_object_size(), expand_expr_real_1(), expand_function(), expand_switch_as_decision_tree_p(), expand_switch_using_bit_tests_p(), extract_range_from_binary_expr_1(), fold_binary_loc(), fold_builtin_fputs(), fold_builtin_memchr(), fold_builtin_memcmp(), fold_builtin_object_size(), fold_builtin_strncat(), fold_read_from_constant_string(), fold_single_bit_test(), fully_constant_vn_reference_p(), gimplify_decl_expr(), gimplify_parameters(), initialize_argument_information(), is_aligning_offset(), layout_decl(), layout_type(), lower_rec_input_clauses(), lower_rec_simd_input_clauses(), nonnull_arg_p(), normalize_offset(), predict_loops(), rtl_for_decl_init(), simplify_builtin_call(), store_field(), string_constant(), vect_analyze_data_ref_access(), vect_handle_widen_op_by_const(), vect_operation_fits_smaller_type(), vect_recog_divmod_pattern(), verify_gimple_assign_single(), and widen_memory_access().
bool contains_bitfld_component_ref_p | ( | ) |
Return true if REF has a COMPONENT_REF with a bit-field field declaration somewhere in it.
References handled_component_p().
Referenced by determine_known_aggregate_parts(), and sra_modify_assign().
bool contains_placeholder_p | ( | ) |
Return true if EXP contains a PLACEHOLDER_EXPR, i.e. if it represents a size or offset that depends on a field within a record.
References tcc_binary, tcc_comparison, tcc_exceptional, tcc_expression, tcc_reference, tcc_unary, and tcc_vl_exp.
Referenced by save_expr().
tree copy_list | ( | ) |
Return a copy of a chain of nodes, chained through the TREE_CHAIN field. For example, this can copy a list made of TREE_LIST nodes.
References copy_node().
Referenced by decl_attributes(), and split_complex_types().
tree copy_node_stat | ( | ) |
Return a new node with the same contents as NODE except that its TREE_CHAIN, if it has one, is zero and it has a fresh uid.
References allocate_decl_uid(), ggc_alloc_tree_node_stat(), memcpy(), next_debug_decl_uid, next_type_uid, record_node_allocation_statistics(), tcc_declaration, tcc_type, and tree_size().
unsigned crc32_byte | ( | ) |
Generate a crc32 of a byte.
References crc32_unsigned_bits().
Referenced by coverage_compute_cfg_checksum(), and crc32_string().
unsigned crc32_string | ( | ) |
Generate a crc32 of a string.
References crc32_byte().
Referenced by coverage_checksum_string(), get_file_function_name(), and init_random_seed().
unsigned crc32_unsigned | ( | ) |
Generate a crc32 of a 32-bit unsigned.
References crc32_unsigned_bits().
|
static |
Generate a crc32 of a byte.
Referenced by crc32_byte(), and crc32_unsigned().
tree create_artificial_label | ( | ) |
Create a nameless artificial label and put it in the current function context. The label has a location of LOC. Returns the newly created label.
References current_function_decl.
Referenced by build_and_jump(), convert_nl_goto_reference(), emit_post_landing_pad(), factor_computed_gotos(), frob_into_branch_around(), gen_inbound_check(), gimple_block_label(), gimplify_cond_expr(), gimplify_init_ctor_eval_range(), gimplify_loop_expr(), gimplify_switch_expr(), lower_builtin_setjmp(), lower_catch(), lower_eh_filter(), lower_function_body(), lower_gimple_return(), lower_lastprivate_clauses(), lower_omp_single_copy(), lower_omp_single_simple(), lower_rec_input_clauses(), lower_transaction(), lower_try_finally_copy(), lower_try_finally_fallthru_label(), lower_try_finally_nofallthru(), lower_try_finally_onedest(), lower_try_finally_switch(), new_label_mapper(), omp_copy_decl(), replace_goto_queue_cond_clause(), shrink_wrap_one_built_in_call(), and sjlj_emit_dispatch_table().
bool cst_and_fits_in_hwi | ( | ) |
Checks that X is integer constant that can be expressed in (unsigned) HOST_WIDE_INT without loss of precision.
References HOST_BITS_PER_WIDE_INT.
Referenced by add_autoinc_candidates(), dump_mem_details(), find_or_create_group(), force_expr_to_var_cost(), gather_memory_references_ref(), get_computation_cost_at(), idx_analyze_ref(), inverse(), issue_prefetch_ref(), iv_elimination_compare_lt(), prune_ref_by_group_reuse(), prune_ref_by_self_reuse(), ptr_difference_const(), and strip_offset_1().
Return the values of the elements of a CONSTRUCTOR as a vector of trees.
References vec_alloc().
bool decl_address_invariant_p | ( | ) |
Return whether OP is a DECL whose address is function-invariant.
References current_function_decl, and decl_function_context().
Referenced by gimple_fold_stmt_to_constant_1(), is_gimple_invariant_address(), is_gimple_mem_ref_addr(), ssa_forward_propagate_and_combine(), transaction_invariant_address_p(), and tree_invariant_p_1().
bool decl_address_ip_invariant_p | ( | ) |
Return whether OP is a DECL whose address is interprocedural-invariant.
Referenced by is_gimple_ip_invariant_address(), and loc_list_from_tree().
tree decl_assembler_name | ( | ) |
The name of the object as the assembler will see it (but before any translations made by ASM_OUTPUT_LABELREF). Often this is the same as DECL_NAME. It is an IDENTIFIER_NODE.
References lang_hooks::set_decl_assembler_name.
Referenced by assign_assembler_name_if_neeeded().
bool decl_assembler_name_equal | ( | ) |
Compare ASMNAME with the DECL_ASSEMBLER_NAME of DECL.
References strlen(), and user_label_prefix.
Referenced by eq_assembler_name().
hashval_t decl_assembler_name_hash | ( | ) |
Hash asmnames ignoring the user specified marks.
References strlen(), and user_label_prefix.
Referenced by hash_node_by_assembler_name(), insert_to_assembler_name_hash(), symtab_node_for_asm(), and unlink_from_assembler_name_hash().
Insert a mapping FROM->empty vector of debug arguments in the value expression hashtable.
References tree_vec_map::base, debug_args_for_decl, decl_debug_args_lookup(), tree_map_base::from, and tree_vec_map::to.
Referenced by ipa_modify_call_arguments(), split_function(), and tree_function_versioning().
Lookup a vector of debug arguments for FROM, and return it if we find one.
References tree_vec_map::base, debug_args_for_decl, tree_map_base::from, and tree_vec_map::to.
Referenced by copy_debug_stmt(), decl_debug_args_insert(), expand_call_stmt(), expand_debug_source_expr(), prepare_call_arguments(), and tree_function_versioning().
void decl_debug_expr_insert | ( | ) |
Insert a mapping FROM->TO in the debug expression hashtable.
References tree_decl_map::base, debug_expr_for_decl, tree_map_base::from, and tree_decl_map::to.
tree decl_debug_expr_lookup | ( | ) |
Lookup a debug expression for FROM, and return it if we find one.
References tree_decl_map::base, debug_expr_for_decl, tree_map_base::from, and tree_decl_map::to.
void decl_fini_priority_insert | ( | ) |
Set the finalization priority for DECL to PRIORITY.
References decl_priority_info(), tree_priority_map::fini, and priority().
Referenced by cgraph_build_static_cdtor_1().
priority_type decl_fini_priority_lookup | ( | ) |
Return the finalization priority for DECL.
References tree_priority_map::fini, and tree_map_base::from.
Referenced by rest_of_handle_final().
tree decl_function_context | ( | ) |
Return the innermost context enclosing DECL that is a FUNCTION_DECL, or zero if none.
References get_containing_scope().
Referenced by add_abstract_origin_attribute(), convert_gimple_call(), convert_local_omp_clauses(), convert_local_reference_op(), convert_nl_goto_reference(), convert_nonlocal_omp_clauses(), convert_nonlocal_reference_op(), convert_tramp_reference_op(), copy_tree_body_r(), dbxout_symbol(), dbxout_symbol_location(), decl_address_invariant_p(), dwarf2out_abstract_function(), dwarf2out_decl(), expand_call(), expand_expr_real_1(), expand_goto(), force_label_rtx(), free_lang_data_in_decl(), gen_formal_parameter_die(), gen_struct_or_union_type_die(), gen_variable_die(), get_nonlocal_debug_decl(), gimple_verify_flow_info(), gimplify_expr(), gimplify_var_or_parm_decl(), lto_output_tree_ref(), note_nonlocal_block_vlas(), note_nonlocal_vla_type(), omp_copy_decl(), remap_gimple_op_r(), remap_vla_decls(), sdbout_symbol(), tree_is_indexable(), and uses_local_type_r().
void decl_init_priority_insert | ( | ) |
Set the initialization priority for DECL to PRIORITY.
References decl_priority_info(), tree_priority_map::init, and priority().
Referenced by cgraph_build_static_cdtor_1().
priority_type decl_init_priority_lookup | ( | ) |
Return the initialization priority for DECL.
References tree_map_base::from, and tree_priority_map::init.
Referenced by rest_of_handle_final().
|
staticread |
Return the initialization and finalization priority information for DECL. If there is no previous priority information, a freshly allocated structure is returned.
References tree_priority_map::base, tree_priority_map::fini, tree_map_base::from, and tree_priority_map::init.
Referenced by decl_fini_priority_insert(), and decl_init_priority_insert().
tree decl_type_context | ( | ) |
Return the innermost context enclosing DECL that is a RECORD_TYPE, UNION_TYPE or QUAL_UNION_TYPE, or zero if none. TYPE_DECLs and FUNCTION_DECLs are transparent to this function.
Referenced by dbxout_class_name_qualifiers().
void decl_value_expr_insert | ( | ) |
Insert a mapping FROM->TO in the value expression hashtable.
References tree_decl_map::base, tree_map_base::from, tree_decl_map::to, and value_expr_for_decl.
tree decl_value_expr_lookup | ( | ) |
Lookup a value expression for FROM, and return it if we find one.
References tree_decl_map::base, tree_map_base::from, tree_decl_map::to, and value_expr_for_decl.
|
static |
For languages with One Definition Rule, work out if decls are actually the same even if the tree representation differs. This handles only decls appearing in TYPE_NAME and TYPE_CONTEXT. That is NAMESPACE_DECL, TYPE_DECL, RECORD_TYPE and IDENTIFIER_NODE.
References same_for_odr().
Referenced by same_for_odr(), and types_same_for_odr().
bool double_int_fits_to_tree_p | ( | ) |
Returns true if CST fits into range of TYPE. Signedness of CST is assumed to be the same as the signedness of TYPE.
References double_int::ext().
Referenced by adjust_range_with_scev(), extract_muldiv_1(), fold_builtin_int_roundingfn(), fold_builtin_object_size(), force_fit_type_double(), int_fits_type_p(), max_stmt_executions_tree(), n_of_executions_at_most(), and scev_probably_wraps_p().
tree double_int_to_tree | ( | ) |
Constructs tree in type TYPE from with value given by CST. Signedness of CST is assumed to be the same as the signedness of TYPE.
References build_int_cst_wide(), double_int::ext(), double_int::high, and double_int::low.
Referenced by add_elt_to_tree(), addr_to_parts(), adjust_range_with_scev(), aff_combination_add_elt(), aff_combination_scale(), aff_combination_to_tree(), associate_pointerplus(), bit_value_assume_aligned(), bit_value_binop(), bit_value_unop(), build_int_cst(), build_int_cst_type(), combine_conversions(), compute_object_offset(), constant_pointer_difference(), create_add_on_incoming_edge(), create_mul_imm_cand(), derive_constant_upper_bound_ops(), do_warn_aggressive_loop_optimizations(), dr_analyze_innermost(), extract_muldiv_1(), extract_range_from_binary_expr_1(), fold_binary_loc(), fold_builtin_int_roundingfn(), force_fit_type_double(), forward_propagate_addr_expr_1(), get_inner_reference(), get_value_from_alignment(), gmp_cst_to_tree(), insert_initializers(), layout_type(), lower_bound_in_type(), max_stmt_executions_tree(), most_expensive_mult_to_index(), move_variant_to_index(), n_of_executions_at_most(), native_encode_fixed(), native_interpret_int(), ranges_from_anti_range(), register_edge_assert_for_2(), replace_mult_candidate(), replace_ref(), restructure_reference(), scev_probably_wraps_p(), upper_bound_in_type(), vect_check_gather(), vn_reference_fold_indirect(), and vn_reference_maybe_forwprop_address().
void dump_tree_statistics | ( | void | ) |
Print debugging information about tree nodes generated during the compile, and any language-specific information.
References all_kinds, MAX_TREE_CODES, phinodes_print_statistics(), print_debug_expr_statistics(), lang_hooks::print_statistics, print_type_hash_statistics(), print_value_expr_statistics(), ssanames_print_statistics(), tree_code_counts, tree_code_name, tree_node_counts, tree_node_kind_names, and tree_node_sizes.
Referenced by dump_memory_report().
unsigned int element_precision | ( | ) |
Return the precision of the type, or for a complex or vector type the precision of the type of its elements.
tree excess_precision_type | ( | ) |
If TYPE is a real or complex floating-point type and the target does not directly support arithmetic on TYPE then return the wider type to be used for arithmetic on TYPE. Otherwise, return NULL_TREE.
References EXCESS_PRECISION_FAST.
Referenced by convert_to_real(), and expand_builtin_mathfn().
unsigned int expr_align | ( | ) |
Return the strictest alignment, in bits, that T is known to have.
int fields_length | ( | ) |
|
static |
Find decls and types in T.
References find_decls_types_r(), pointer_set_contains(), free_lang_data_d::pset, and free_lang_data_d::worklist.
Referenced by find_decls_types_in_node(), find_decls_types_in_var(), and free_lang_data_in_cgraph().
|
static |
Find decls and types referenced in EH region R and store them in FLD->DECLS and FLD->TYPES.
References eh_region_d::eh_region_u::allowed, eh_region_d::eh_region_u::eh_try, ERT_ALLOWED_EXCEPTIONS, ERT_CLEANUP, ERT_MUST_NOT_THROW, ERT_TRY, eh_region_d::eh_region_u::eh_region_u_must_not_throw::failure_decl, find_decls_types_r(), eh_region_d::eh_region_u::eh_region_u_try::first_catch, get_eh_types_for_runtime(), eh_region_d::eh_region_u::must_not_throw, eh_catch_d::next_catch, free_lang_data_d::pset, eh_region_d::type, eh_catch_d::type_list, eh_region_d::eh_region_u::eh_region_u_allowed::type_list, and eh_region_d::u.
Referenced by find_decls_types_in_node().
|
static |
Find decls and types referenced in cgraph node N and store them in FLD->DECLS and FLD->TYPES. Unlike pass_referenced_vars, this will look for *every* kind of DECL and TYPE node reachable from N, including those embedded inside types and decls (i.e,, TYPE_DECLs, NAMESPACE_DECLs, etc).
References cfun, current_function_decl, symtab_node_base::decl, find_decls_types(), find_decls_types_in_eh_region(), gimple_call_fntype(), gimple_has_body_p(), gimple_num_ops(), gimple_op(), gimple_phi_arg_def_ptr(), gimple_phi_num_args(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), is_gimple_call(), si, and cgraph_node::symbol.
Referenced by free_lang_data_in_cgraph().
|
static |
Find decls and types referenced in varpool node N and store them in FLD->DECLS and FLD->TYPES. Unlike pass_referenced_vars, this will look for *every* kind of DECL and TYPE node reachable from N, including those embedded inside types and decls (i.e,, TYPE_DECLs, NAMESPACE_DECLs, etc).
References symtab_node_base::decl, find_decls_types(), and varpool_node::symbol.
Referenced by free_lang_data_in_cgraph().
|
static |
Operand callback helper for free_lang_data_in_node. *TP is the subtree operand being considered.
References add_tree_to_fld_list(), fld_worklist_push(), and is_lang_specific().
Referenced by find_decls_types(), and find_decls_types_in_eh_region().
void find_placeholder_in_expr | ( | ) |
Given a tree EXP, find all occurrences of references to fields in a PLACEHOLDER_EXPR and place them in vector REFS without duplicates. Also record VAR_DECLs and CONST_DECLs. Note that we assume here that EXP contains only arithmetic expressions or CALL_EXPRs with PLACEHOLDER_EXPRs occurring only in their argument list.
References push_without_duplicates(), refs, tcc_binary, tcc_comparison, tcc_constant, tcc_declaration, tcc_exceptional, tcc_expression, tcc_reference, tcc_unary, and tcc_vl_exp.
Referenced by self_referential_size().
|
static |
Subprogram of following function. Called by walk_tree. Return *TP if it is an automatic variable or parameter of the function passed in as DATA.
References auto_var_in_fn_p().
tree first_field | ( | ) |
Returns the first FIELD_DECL in the TYPE_FIELDS of the RECORD_TYPE or UNION_TYPE TYPE, or NULL_TREE if none.
Referenced by aggregate_value_p(), assign_parm_find_data_types(), initialize_argument_information(), and pass_by_reference().
int fixed_zerop | ( | ) |
Return 1 if EXPR is the fixed-point constant zero.
Referenced by initializer_zerop(), and some_nonzerop().
|
inlinestatic |
Push tree node T into FLD->WORKLIST.
References is_lang_specific(), pointer_set_contains(), free_lang_data_d::pset, and free_lang_data_d::worklist.
Referenced by find_decls_types_r().
tree force_fit_type_double | ( | tree | type, |
double_int | cst, | ||
int | overflowable, | ||
bool | overflowed | ||
) |
We force the double_int CST to the range of the type TYPE by sign or zero extending it. OVERFLOWABLE indicates if we are interested in overflow of the value, when >0 we are only interested in signed overflow, for <0 we are interested in any overflow. OVERFLOWED indicates whether overflow has already occurred. CONST_OVERFLOWED indicates whether constant overflow has already occurred. We force T's value to be within range of T's type (by setting to 0 or 1 all the bits outside the type's range). We set TREE_OVERFLOWED if, OVERFLOWED is nonzero, or OVERFLOWABLE is >0 and signed overflow occurs or OVERFLOWABLE is <0 and any overflow occurs We return a new tree node for the extended double_int. The node is shared if no overflow flags are set.
References double_int_fits_to_tree_p(), double_int_to_tree(), double_int::ext(), and type().
Referenced by extract_range_from_assert(), extract_range_from_unary_expr_1(), fold_abs_const(), fold_convert_const_int_from_fixed(), fold_convert_const_int_from_int(), fold_convert_const_int_from_real(), fold_div_compare(), fold_negate_const(), fold_not_const(), fold_sign_changed_comparison(), fold_unary_loc(), int_const_binop_1(), and round_up_loc().
|
static |
Free resources that are used by FE but are not needed once they are done.
References lang_hooks::decl_printable_name, lang_hooks::dwarf_name, free_lang_data_in_cgraph(), get_alias_set(), gimple_decl_printable_name(), global_dc, integer_types, itk_none, lhd_dwarf_name(), and tree_diagnostics_defaults().
|
static |
Reset all the fields in a binfo node BINFO. We only keep BINFO_VTABLE, which is used by gimple_fold_obj_type_ref.
Referenced by free_lang_data_in_type().
|
static |
Free language specific information for every operand and expression in every node of the call graph. This process operates in three stages: 1- Every callgraph node and varpool node is traversed looking for decls and types embedded in them. This is a more exhaustive search than that done by find_referenced_vars, because it will also collect individual fields, decls embedded in types, etc. 2- All the decls found are sent to free_lang_data_in_decl. 3- All the types found are sent to free_lang_data_in_type. The ordering between decls and types is important because free_lang_data_in_decl sets assembler names, which includes mangling. So types cannot be freed up until assembler names have been set up.
References alias_pairs, assign_assembler_name_if_neeeded(), alias_pair::decl, free_lang_data_d::decls, find_decls_types(), find_decls_types_in_node(), find_decls_types_in_var(), free_lang_data_in_decl(), free_lang_data_in_type(), pointer_set_create(), pointer_set_destroy(), free_lang_data_d::pset, free_lang_data_d::types, and free_lang_data_d::worklist.
Referenced by free_lang_data().
|
static |
Reset all language specific information still present in symbol DECL.
References cgraph_get_node(), cgraph_release_function_body(), cgraph_node::clones, decl_function_context(), symtab_node_base::definition, lang_hooks::free_lang_data, free_lang_data_in_one_sizepos(), gimple_has_body_p(), host_integerp(), release_function_body(), and cgraph_node::symbol.
Referenced by free_lang_data_in_cgraph().
|
inlinestatic |
Reset the expression *EXPR_P, a size or position. ??? We could reset all non-constant sizes or positions. But it's cheap enough to not do so and refrain from adding workarounds to dwarf2out.c. We need to reset self-referential sizes or positions because they cannot be gimplified and thus can contain a CALL_EXPR after the gimplification is finished, which will run afoul of LTO streaming. And they need to be reset to something essentially dummy but not constant, so as to preserve the properties of the object they are attached to.
Referenced by free_lang_data_in_decl(), and free_lang_data_in_type().
|
static |
Reset all language specific information still present in TYPE.
References build_qualified_type(), lang_hooks::free_lang_data, free_lang_data_in_binfo(), free_lang_data_in_one_sizepos(), TYPE_QUAL_CONST, and TYPE_QUAL_VOLATILE.
Referenced by free_lang_data_in_cgraph().
tree get_binfo_at_offset | ( | ) |
Try to find a base info of BINFO that would have its field decl at offset OFFSET within the BINFO type and which is of EXPECTED_TYPE. If it can be found, return, otherwise return NULL_TREE.
References HOST_WIDE_INT, int_bit_position(), tree_low_cst(), and types_same_for_odr().
Referenced by ipa_binfo_from_known_type_jfunc(), ipa_get_indirect_edge_target_1(), ipa_get_jf_ancestor_result(), and try_make_edge_direct_virtual_call().
tree get_callee_fndecl | ( | ) |
CALL is a CALL_EXPR. Return the declaration for the function called, or NULL_TREE if the called function cannot be determined.
Referenced by aggregate_value_p(), builtin_mathfn_code(), call_expr_flags(), expand_builtin(), expand_builtin_alloca(), expand_builtin_atomic_fetch_op(), expand_builtin_cexpi(), expand_builtin_int_roundingfn(), expand_builtin_int_roundingfn_2(), expand_builtin_interclass_mathfn(), expand_builtin_mathfn(), expand_builtin_mathfn_2(), expand_builtin_mathfn_3(), expand_builtin_mathfn_ternary(), expand_builtin_memory_chk(), expand_builtin_memset_args(), expand_builtin_object_size(), expand_builtin_strcmp(), expand_builtin_strncmp(), expand_builtin_sync_operation(), expand_call(), expand_expr_real_1(), fold_binary_loc(), fold_builtin_call_array(), fold_builtin_expect(), fold_call_expr(), fold_negate_expr(), fold_strip_sign_ops(), fold_unary_loc(), gimple_boolify(), gimple_build_call_from_tree(), gimplify_call_expr(), maybe_emit_chk_warning(), maybe_emit_sprintf_chk_warning(), maybe_inline_call_in_expr(), tree_could_trap_p(), and tree_invalid_nonnegative_warnv_p().
tree get_containing_scope | ( | ) |
Given a DECL or TYPE, return the scope in which it was declared, or NULL_TREE if there is no containing scope.
Referenced by decl_function_context(), and gimple_expand_cfg().
|
static |
Translate all the types in LIST with the corresponding runtime types.
References lookup_type_for_runtime().
Referenced by find_decls_types_in_eh_region().
tree get_file_function_name | ( | ) |
Generate a name for a special-purpose function. The generated name may need to be unique across the whole link. Changes to this function may also require corresponding changes to xstrdup_mask_random. TYPE is some string to identify the purpose of this function to the linker or collect2; it must start with an uppercase letter, one of: I - for constructors D - for destructors N - for C++ anonymous namespaces F - for DWARF unwind frame information.
References clean_symbol_name(), crc32_string(), first_global_object_name, get_identifier(), get_random_seed(), HOST_WIDE_INT_PRINT_HEX, len, memcpy(), snprintf(), strlen(), targetm, and weak_global_object_name.
Referenced by cgraph_build_static_cdtor_1(), self_referential_size(), and switch_to_eh_frame_section().
const char* get_name | ( | ) |
Given a tree, try to return a useful variable name that we can use to prefix a temporary that is being assigned the value of the tree. I.E. given <temp> = &A, return A.
Referenced by add_names_to_union_domain(), alias_get_name(), create_tmp_from_val(), gen_lsm_tmp_name(), gimplify_omp_for(), gimplify_parameters(), gimplify_vla_decl(), isl_id_for_ssa_name(), separate_decls_in_region_name(), take_address_of(), vect_create_addr_base_for_vector_ref(), vect_create_data_ref_ptr(), and vect_create_destination_var().
tree get_narrower | ( | ) |
Return OP or a simpler expression for a narrower value which can be sign-extended or zero-extended to give back OP. Store in *UNSIGNEDP_PTR either 1 if the value should be zero-extended or 0 if the value should be sign-extended.
References first, host_integerp(), HOST_WIDE_INT, tree_low_cst(), lang_hooks_for_types::type_for_size, and lang_hooks::types.
Referenced by operand_equal_for_comparison_p().
tree get_qualified_type | ( | ) |
Return a version of the TYPE, qualified as indicated by the TYPE_QUALS, if one exists. If no qualified version exists yet, return NULL_TREE.
References check_qualified_type(), and type().
Referenced by build_qualified_type(), and modified_type_die().
void get_type_static_bounds | ( | ) |
Stores bounds of an integer TYPE in MIN and MAX. If TYPE has non-constant bounds or is a POINTER_TYPE, the maximum and/or minimum values that can be represented (assuming two's-complement arithmetic) within the bit precision of the type are returned instead.
References double_int::mask(), mpz_set_double_int(), and tree_to_double_int().
Referenced by determine_value_range(), and mpz_get_double_int().
tree get_unwidened | ( | ) |
Return OP, stripped of any conversions to wider types as much as is safe. Converting the value back to OP's type makes a value equivalent to OP. If FOR_TYPE is nonzero, we return a value which, if converted to type FOR_TYPE, would be equivalent to converting OP to type FOR_TYPE. OP must have integer, real or enumeral type. Pointers are not allowed! There are some cases where the obvious value we could return would regenerate to OP if converted to OP's type, but would not extend like OP to wider types. If FOR_TYPE indicates such extension is contemplated, we eschew such values. For example, if OP is (unsigned short)(signed char)-1, we avoid returning (signed char)-1 if FOR_TYPE is int, even though extending that to an unsigned short would regenerate OP, since the result of extending (signed char)-1 to (int) is different from (int) OP.
References int_fits_type_p().
Referenced by canonicalize_component_ref(), convert_to_integer(), and fold_widened_comparison().
|
static |
Number of operands for each OpenMP clause.
Handle a "dllimport" or "dllexport" attribute; arguments as in struct attribute_spec.handler.
References ATTR_FLAG_ARRAY_NEXT, ATTR_FLAG_DECL_NEXT, ATTR_FLAG_FUNCTION_NEXT, current_function_decl, error(), is_attribute_p(), targetm, VISIBILITY_DEFAULT, and warning().
int host_integerp | ( | ) |
Return 1 if T is an INTEGER_CST that can be manipulated efficiently on the host. If POS is zero, the value can be represented in a single HOST_WIDE_INT. If POS is nonzero, the value must be non-negative and can be represented in a single unsigned HOST_WIDE_INT.
References HOST_WIDE_INT.
Referenced by acceptable_pow_call(), add_bit_offset_attribute(), add_bit_size_attribute(), add_bound_info(), add_descr_info_field(), add_or_mark_expr(), add_pure_or_virtual_attribute(), add_subscript_strides(), addr_object_size(), adjust_last_stmt(), adjust_offset_for_component_ref(), alloc_object_size(), ao_ref_from_mem(), ao_ref_init_from_ptr_and_size(), ao_ref_init_from_vn_reference(), bit_value_assume_aligned(), bitpos_of_field(), build_nonstandard_integer_type(), build_tm_load(), build_tm_store(), build_user_friendly_ref_for_offset(), c_getstr(), c_strlen(), categorize_ctor_elements_1(), check_all_va_list_escapes(), check_range(), compute_object_sizes(), compute_record_mode(), const_binop(), copy_reference_ops_from_ref(), count_type_elements(), create_variable_info_for_1(), dbxout_expand_expr(), dbxout_range_type(), dbxout_symbol(), dbxout_type(), dbxout_type_fields(), dbxout_type_method_1(), decode_addr_const(), delegitimize_mem_from_attrs(), descr_info_loc(), determine_known_aggregate_parts(), do_mpfr_bessel_n(), dump_array_domain(), dump_generic_node(), dw_sra_loc_expr(), execute_cse_sincos(), expand_builtin_atomic_compare_exchange(), expand_builtin_eh_common(), expand_builtin_frame_address(), expand_builtin_memory_chk(), expand_builtin_mempcpy_args(), expand_builtin_memset_args(), expand_builtin_strncpy(), expand_constructor(), expand_expr_real_1(), expand_expr_real_2(), expand_omp_simd(), expand_switch_as_decision_tree_p(), expand_vector_divmod(), expr_with_var_bounded_array_refs_p(), find_param_candidates(), finish_bitfield_layout(), finish_bitfield_representative(), fold_binary_loc(), fold_builtin_alloca_with_align(), fold_builtin_load_exponent(), fold_builtin_memchr(), fold_builtin_memcmp(), fold_builtin_memory_chk(), fold_builtin_memory_op(), fold_builtin_memset(), fold_builtin_powi(), fold_builtin_snprintf(), fold_builtin_snprintf_chk_1(), fold_builtin_sprintf_chk_1(), fold_builtin_strcat_chk(), fold_builtin_strncat_chk(), fold_builtin_strncmp(), fold_builtin_stxcpy_chk(), fold_builtin_stxncpy_chk(), fold_comparison(), fold_const_aggregate_ref_1(), fold_plusminus_mult_expr(), fold_ternary_loc(), fold_unary_loc(), fortran_common(), free_lang_data_in_decl(), gcd_of_steps_may_divide_p(), gen_descr_array_type_die(), gen_enumeration_type_die(), get_base_constructor(), get_bit_range(), get_block_for_decl(), get_constraint_for_1(), get_inner_reference(), get_loop_invariant_expr_id(), get_mem_align_offset(), get_narrower(), get_object_alignment_2(), get_ref_base_and_extent(), get_stridx(), gimple_add_tmp_var(), gimple_compare_field_offset(), gimple_fold_indirect_ref(), go_format_type(), go_output_typedef(), graphite_can_represent_init(), handle_builtin_memcpy(), handle_pointer_plus(), highest_pow2_factor(), hoist_adjacent_loads(), init_offset_limit(), instrument_builtin_call(), int_expr_size(), is_aligning_offset(), is_comparison_with_loop_invariant_p(), loc_list_from_tree(), locate_and_pad_parm(), lower_omp_for_lastprivate(), lower_vec_perm(), make_bit_field_ref(), max_int_size_in_bytes(), maybe_add_sra_candidate(), maybe_emit_chk_warning(), maybe_emit_sprintf_chk_warning(), mode_for_array(), mode_for_size_tree(), native_encode_initializer(), native_encode_string(), not_size_aligned(), optimize_location_into_implicit_ptr(), pdr_add_data_dimensions(), place_field(), plain_type_1(), plus_stmt_object_size(), predict_iv_comparison(), predict_loops(), prepare_call_arguments(), push_fields_onto_fieldstack(), register_edge_assert_for_2(), rtx_addr_can_trap_p_1(), sdbout_field_types(), sdbout_one_type(), self_reuse_distance(), set_mem_attributes_minus_bitpos(), simple_type_size_in_bits(), simplify_binary_expression(), simplify_builtin_call(), simplify_rotate(), sra_modify_expr(), stack_protect_classify_type(), stmt_cost(), stmt_kills_ref_p_1(), store_constructor(), string_constant(), strips_small_constant(), tm_log_add(), tm_log_emit_stmt(), tree_low_cst(), try_unroll_loop_completely(), type_internals_preclude_sra_p(), type_like_member_ptr_p(), va_list_counter_bump(), valid_constant_size_p(), vect_analyze_data_ref_accesses(), vect_analyze_data_refs(), vect_check_gather(), vect_compute_data_ref_alignment(), vect_recog_divmod_pattern(), vect_recog_pow_pattern(), vect_recog_rotate_pattern(), vector_element(), verify_expr(), vn_reference_fold_indirect(), vn_reference_lookup_3(), vn_reference_maybe_forwprop_address(), and widen_memory_access().
bool in_array_bounds_p | ( | ) |
Returns true if it is possible to prove that the index of an array access REF (an ARRAY_REF expression) falls into the array bounds.
References array_ref_low_bound(), array_ref_up_bound(), and tree_int_cst_lt().
Referenced by tree_could_trap_p().
void init_ttree | ( | void | ) |
Init tree.c.
References cl_optimization_node, cl_option_hash_eq(), cl_option_hash_hash(), cl_option_hash_table, cl_target_option_node, debug_expr_for_decl, lang_hooks::init_ts, initialize_tree_contains_struct(), int_cst_hash_eq(), int_cst_hash_hash(), int_cst_hash_table, int_cst_node, tree_decl_map_hash(), type_hash_eq(), type_hash_hash(), type_hash_table, and value_expr_for_decl.
Referenced by general_init().
|
static |
Initialize tree_contains_struct to describe the hierarchy of tree nodes.
References tree_contains_struct, and tree_node_structure_for_code().
Referenced by init_ttree().
bool initializer_zerop | ( | ) |
Given an initializer INIT, return TRUE if INIT is zero or some aggregate of zeros. Otherwise return FALSE.
References fixed_zerop(), HOST_WIDE_INT, integer_zerop(), and real_zerop().
Referenced by all_zeros_p(), assemble_variable_contents(), bss_initializer_p(), categorize_ctor_elements_1(), categorize_decl_for_section(), const_vector_from_tree(), gimplify_init_ctor_eval(), handle_char_store(), mostly_zeros_p(), and store_constructor().
HOST_WIDE_INT int_bit_position | ( | ) |
Likewise, but return as an integer. It must be representable in that way (since it could be a signed value, we don't have the option of returning -1 like int_size_in_byte can.
References bit_position(), and tree_low_cst().
Referenced by add_bit_offset_attribute(), build_ref_for_model(), completely_scalarize_record(), dbxout_type_fields(), get_binfo_at_offset(), gimple_extract_devirt_binfo_from_cst(), ipa_get_stmt_member_ptr_load_param(), output_constructor_bitfield(), sdbout_one_type(), store_constructor(), and type_internals_preclude_sra_p().
HOST_WIDE_INT int_byte_position | ( | ) |
Likewise, but return as an integer. It must be representable in that way (since it could be a signed value, we don't have the option of returning -1 like int_size_in_byte can.
References byte_position(), and tree_low_cst().
Referenced by decode_addr_const(), native_encode_initializer(), and output_constructor_regular_field().
|
static |
Return nonzero if the value represented by *X (an INTEGER_CST tree node) is the same as that given by *Y, which is the same.
Referenced by init_ttree().
|
static |
These are the hash table functions for the hash table of INTEGER_CST nodes of a sizetype.
Return the hash code code X, an INTEGER_CST.
Referenced by init_ttree().
HOST_WIDE_INT int_cst_value | ( | ) |
Return value of a constant X and sign-extend it.
References HOST_BITS_PER_WIDE_INT, and HOST_WIDE_INT.
Referenced by add_autoinc_candidates(), add_multivariate_self_dist(), analyze_subscript_affine_affine(), build_classic_dist_vector_1(), compute_overlap_steps_for_affine_1_2(), dump_mem_details(), find_or_create_group(), force_expr_to_var_cost(), gen_generic_params_dies(), get_computation_cost_at(), get_shiftadd_cost(), idx_analyze_ref(), infer_loop_bounds_from_pointer_arith(), init_omega_eq_with_af(), initialize_matrix_A(), inverse(), issue_prefetch_ref(), iv_elimination_compare_lt(), prune_ref_by_group_reuse(), prune_ref_by_self_reuse(), ptr_difference_const(), strip_offset_1(), vect_gen_niters_for_prolog_loop(), and vector_alignment_reachable_p().
bool int_fits_type_p | ( | ) |
Returns true if integer constant C has a value that is permissible for type TYPE (an INTEGER_TYPE).
References double_int::cmp(), double_int_fits_to_tree_p(), double_int::high, HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, double_int::is_negative(), double_int::low, tree_to_double_int(), double_int::ugt(), and double_int::ult().
Referenced by chrec_convert_1(), expand_expr_real_2(), fold_widened_comparison(), get_unwidened(), idx_infer_loop_bounds(), is_widening_mult_p(), make_range_step(), record_equivalences_from_incoming_edge(), simplify_bitwise_binary(), simplify_cond_using_ranges(), tree_fold_binomial(), vect_handle_widen_op_by_const(), vect_operation_fits_smaller_type(), and vect_recog_mixed_size_cond_pattern().
HOST_WIDE_INT int_size_in_bytes | ( | ) |
Return the size of TYPE (in bytes) as a wide integer or return -1 if the size can vary or is larger than an integer.
References HOST_WIDE_INT.
Referenced by add_byte_size_attribute(), add_or_mark_expr(), analyze_ref(), assign_parm_adjust_entry_rtl(), assign_parm_setup_block(), assign_parm_setup_stack(), assign_parms_unsplit_complex(), assign_temp(), base_type_die(), compare_constant(), const_hash_1(), copy_blkmode_from_reg(), copy_blkmode_to_reg(), dbxout_type(), descr_info_loc(), dw_loc_list_1(), estimate_move_cost(), expand_assignment(), expand_call(), expand_expr_real_1(), expand_expr_real_2(), expand_function_end(), expand_function_start(), expand_value_return(), finalize_must_preallocate(), flexible_array_member_p(), gen_array_type_die(), get_constant_size(), get_mem_ref_of_assignment(), get_mem_refs_of_builtin_call(), gimplify_init_constructor(), go_output_typedef(), handle_char_store(), hard_function_value(), initialize_argument_information(), instrument_derefs(), instrument_expr(), load_register_parameters(), loc_list_for_address_of_addr_expr_of_indirect_ref(), loc_list_from_tree(), maybe_emit_group_store(), mergeable_string_section(), must_pass_in_stack_var_size_or_pad(), native_encode_initializer(), offset_within_block_p(), output_constant(), output_constructor_array_range(), output_constructor_regular_field(), plain_type(), plain_type_1(), pointer_may_wrap_p(), precompute_register_parameters(), rtx_addr_can_trap_p_1(), sdbout_one_type(), sjlj_build_landing_pads(), split_constant_offset_1(), store_constructor(), store_expr(), store_field(), store_one_arg(), store_unaligned_arguments_into_pseudos(), subrange_type_die(), subrange_type_for_debug_p(), tree_add_const_value_attribute(), and xcoff_assign_fundamental_type_number().
int integer_all_onesp | ( | ) |
Return 1 if EXPR is an integer containing all 1's in as much precision as it contains, or a complex or vector whose subparts are such integers.
References HOST_BITS_PER_WIDE_INT, and HOST_WIDE_INT.
Referenced by conditional_replacement(), convert_to_integer(), do_store_flag(), eliminate_using_constants(), expand_builtin_memory_chk(), fold_binary_loc(), fold_builtin_memory_chk(), fold_builtin_snprintf_chk_1(), fold_builtin_sprintf_chk_1(), fold_builtin_strcat_chk(), fold_builtin_strncat_chk(), fold_builtin_stxcpy_chk(), fold_builtin_stxncpy_chk(), fold_ternary_loc(), fold_unary_loc(), forward_propagate_into_cond(), integer_minus_onep(), maybe_emit_chk_warning(), maybe_emit_sprintf_chk_warning(), number_of_iterations_exit(), number_of_iterations_lt(), optimize_bit_field_compare(), simplify_bitwise_binary(), and tree_predict_by_opcode().
int integer_minus_onep | ( | ) |
Return 1 if EXPR is the integer constant minus one.
References integer_all_onesp(), and integer_zerop().
Referenced by fold_binary_loc().
int integer_nonzerop | ( | ) |
Return 1 if EXPR is an integer constant other than zero or a complex constant other than zero.
Referenced by and_comparisons_1(), and_var_with_comparison_1(), assert_loop_rolls_lt(), assert_no_overflow_lt(), canonicalize_bool(), const_binop(), derive_constant_upper_bound_ops(), expand_complex_div_wide(), extract_range_basic(), find_loop_niter(), fold_binary_loc(), fold_widened_comparison(), handle_char_store(), instrument_builtin_call(), ipa_get_stmt_member_ptr_load_param(), minmax_replacement(), n_of_executions_at_most(), number_of_iterations_cond(), number_of_iterations_le(), number_of_iterations_lt(), number_of_iterations_lt_to_ne(), number_of_iterations_ne(), number_of_latch_executions(), or_comparisons_1(), or_var_with_comparison_1(), same_bool_comparison_p(), scev_probably_wraps_p(), suitable_reference_p(), tree_simplify_using_condition_1(), tree_transform_and_unroll_loop(), and tree_unswitch_single_loop().
int integer_onep | ( | ) |
Return 1 if EXPR is the integer constant one or the corresponding complex constant.
References integer_zerop().
Referenced by addr_for_mem_ref(), adjust_accumulator_values(), adjust_last_stmt(), and_comparisons_1(), and_var_with_comparison_1(), associate_plusminus(), build_range_check(), canonicalize_cond_expr_cond(), chrec_fold_multiply(), compare_values_warnv(), conditional_replacement(), convert_to_fixed(), create_mem_ref(), create_mem_ref_raw(), create_mul_imm_cand(), create_mul_ssa_cand(), determine_invariantness_stmt(), do_jump(), do_store_flag(), eliminate_using_constants(), expand_expr_real_1(), expand_gimple_cond(), expand_omp_for_init_counts(), expand_omp_for_static_chunk(), expand_omp_for_static_nochunk(), find_case_label_range(), fold_binary_loc(), fold_comparison(), fold_cond_expr_cond(), fold_gimple_assign(), fold_negate_expr(), fold_predicate_in(), fold_ternary_loc(), fold_to_nonsharp_ineq_using_bound(), fold_truth_andor_1(), fold_truth_not_expr(), fold_unary_loc(), forward_propagate_comparison(), forward_propagate_into_cond(), forward_propagate_into_gimple_cond(), handle_builtin_memcpy(), intersect_ranges(), ipa_analyze_indirect_call_uses(), is_true_predicate(), iv_elimination_compare_lt(), lookup_logical_inverted_value(), make_range(), maybe_optimize_range_tests(), merge_ranges(), number_of_iterations_exit(), number_of_iterations_lt(), number_of_iterations_ne(), number_of_iterations_ne_max(), op_with_boolean_value_range_p(), optimize_range_tests(), or_comparisons_1(), or_var_with_comparison_1(), predict_extra_loop_exits(), range_entry_cmp(), recognize_single_bit_test(), register_edge_assert_for(), remove_redundant_iv_tests(), return_prediction(), simplify_abs_using_ranges(), simplify_div_or_mod_using_ranges(), size_binop_loc(), slsr_process_phi(), suitable_cond_bb(), and tree_predict_by_opcode().
int integer_pow2p | ( | ) |
Return 1 if EXPR is an integer constant that is a power of 2 (i.e., has only one bit on).
References HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT_M1U, and integer_zerop().
Referenced by do_store_flag(), expand_vector_divmod(), expression_expensive_p(), fold_binary_loc(), fold_single_bit_test(), fold_single_bit_test_into_sign_test(), fold_ternary_loc(), fold_truth_andor_1(), highest_pow2_factor(), multiple_of_p(), recognize_single_bit_test(), simplify_stmt_using_ranges(), and vect_recog_divmod_pattern().
int integer_zerop | ( | ) |
Return 1 if EXPR is the integer constant zero or a complex constant of zero.
Referenced by abs_replacement(), add_old_ivs_candidates(), addr_for_mem_ref(), adjust_last_stmt(), affine_function_constant_p(), affine_function_zero_p(), analyze_siv_subscript_cst_affine(), analyze_ziv_subscript(), and_comparisons_1(), and_var_with_comparison_1(), array_type_nelts(), asan_mem_ref_get_end(), assert_no_overflow_lt(), associate_equivalences_with_edges(), associate_trees(), bound_difference(), build_fold_addr_expr_with_type_loc(), build_range_check(), build_user_friendly_ref_for_offset(), canonicalize_bool(), canonicalize_cond_expr_cond(), ccp_fold_stmt(), check_for_plus_in_loops(), check_for_plus_in_loops_1(), check_forbidden_calls(), chrec_fold_minus(), chrec_fold_multiply(), chrec_fold_plus(), chrec_zerop(), compute_complex_ancestor_jump_func(), compute_overlap_steps_for_affine_1_2(), compute_record_mode(), conditional_replacement(), const_with_all_bytes_same(), convert_to_fixed(), convert_to_integer(), create_component_ref_by_pieces_1(), create_mem_ref(), create_mem_ref_raw(), determine_biv_step(), determine_exit_conditions(), determine_known_aggregate_parts(), determine_offset(), determine_use_iv_cost_condition(), determine_value_range(), difference_cost(), do_jump(), do_jump_1(), do_store_flag(), dr_analyze_indices(), dr_analyze_innermost(), dump_affine_iv(), dump_array_domain(), dump_generic_node(), eliminate_bb(), eliminate_using_constants(), evaluate_conditions_for_known_args(), execute_optimize_stdarg(), execute_update_addresses_taken(), expand_builtin_memset_args(), expand_complex_div_wide(), expand_expr_addr_expr_1(), expand_expr_real_1(), expand_gimple_cond(), expand_parallel_call(), expand_vector_divmod(), extract_cond_operands(), extract_muldiv_1(), extract_omp_for_data(), extract_range_basic(), extract_range_from_unary_expr_1(), finalize_record_size(), find_assert_locations_1(), find_func_aliases_for_builtin_call(), find_induction_variables(), find_interesting_uses_address(), find_interesting_uses_op(), find_interesting_uses_stmt(), find_loop_niter(), find_taken_edge_cond_expr(), finish_bitfield_layout(), flexible_array_member_p(), fold_binary_loc(), fold_builtin_1(), fold_builtin_constant_p(), fold_builtin_load_exponent(), fold_builtin_memcmp(), fold_builtin_memory_op(), fold_builtin_memset(), fold_builtin_next_arg(), fold_builtin_printf(), fold_builtin_snprintf_chk_1(), fold_builtin_sprintf_chk_1(), fold_builtin_stpcpy(), fold_builtin_strncat(), fold_builtin_strncat_chk(), fold_builtin_strncmp(), fold_builtin_strncpy(), fold_builtin_strrchr(), fold_comparison(), fold_cond_expr_cond(), fold_cond_expr_with_comparison(), fold_convert_loc(), fold_gimple_assign(), fold_predicate_in(), fold_read_from_constant_string(), fold_relational_const(), fold_single_bit_test(), fold_single_bit_test_into_sign_test(), fold_ternary_loc(), fold_truth_andor_1(), fold_truth_not_expr(), fold_unary_loc(), forward_propagate_addr_expr_1(), forward_propagate_into_cond(), forward_propagate_into_gimple_cond(), fully_constant_vn_reference_p(), get_addr_base_and_unit_offset_1(), get_address_description(), get_base_constructor(), get_constraint_for_1(), get_constraint_for_component_ref(), get_inner_reference(), get_maxval_strlen(), get_ref_base_and_extent(), gimple_boolify(), gimple_get_virt_method_for_binfo(), handle_builtin_memcpy(), handle_builtin_strchr(), handle_builtin_strcpy(), handle_char_store(), idx_find_step(), idx_infer_loop_bounds(), initializer_constant_valid_p_1(), initializer_zerop(), input_gimple_stmt(), instrument_mem_region_access(), integer_minus_onep(), integer_onep(), integer_pow2p(), ipa_analyze_indirect_call_uses(), ipa_load_from_parm_agg_1(), is_comparison_with_loop_invariant_p(), layout_decl(), layout_type(), loc_list_from_tree(), lookup_logical_inverted_value(), loop_niter_by_eval(), lower_omp_for_lastprivate(), make_fancy_name_1(), make_range_step(), may_eliminate_iv(), maybe_canonicalize_comparison_1(), maybe_fold_reference(), maybe_fold_tmr(), maybe_optimize_range_tests(), maybe_rewrite_mem_ref_base(), merge_ranges(), multiple_of_p(), non_rewritable_lvalue_p(), non_rewritable_mem_ref_base(), nonoverlapping_component_refs_of_decl_p(), normalize_cond(), normalize_cond_1(), number_of_iterations_cond(), number_of_iterations_exit(), number_of_iterations_le(), number_of_iterations_lt(), number_of_iterations_lt_to_ne(), number_of_latch_executions(), omega_setup_subscript(), op_with_boolean_value_range_p(), operand_less_p(), operation_could_trap_helper_p(), optimize_bit_field_compare(), optimize_range_tests(), or_comparisons_1(), or_var_with_comparison_1(), place_field(), predict_extra_loop_exits(), print_call_name(), propagate_with_phi(), ptr_difference_cost(), ptr_parm_has_direct_uses(), push_fields_onto_fieldstack(), range_is_nonnull(), range_is_null(), recognize_bits_test(), recognize_single_bit_test(), record_edge_info(), record_nonwrapping_iv(), ref_at_iteration(), refine_bounds_using_guard(), register_edge_assert_for(), register_edge_assert_for_2(), remove_redundant_iv_tests(), remove_unused_ivs(), return_prediction(), rewrite_bittest(), rtl_for_decl_init(), same_bool_comparison_p(), scev_probably_wraps_p(), set_and_canonicalize_value_range(), set_cond_stmt_execution_predicate(), set_mem_attributes_minus_bitpos(), simplify_abs_using_ranges(), simplify_bitwise_binary(), simplify_truth_ops_using_ranges(), size_binop_loc(), some_nonzerop(), std_gimplify_va_arg_expr(), store_expr(), string_constant(), strip_offset_1(), suitable_cond_bb(), suitable_reference_p(), tree_fold_divides_p(), tree_int_cst_min_precision(), tree_mem_ref_addr(), tree_predict_by_opcode(), tree_simplify_using_condition_1(), tree_single_nonzero_warnv_p(), tree_to_aff_combination(), tree_unswitch_single_loop(), update_alignment_for_field(), valid_initializer_p(), vect_analyze_data_ref_access(), vect_analyze_data_refs(), vect_check_gather(), vect_create_data_ref_ptr(), vect_enhance_data_refs_alignment(), vect_recog_divmod_pattern(), vect_recog_rotate_pattern(), vect_vfa_segment_size(), vectorizable_load(), vectorizable_store(), vn_reference_lookup_3(), vrp_evaluate_conditional(), vrp_int_const_binop(), zero_length_string(), zero_sized_field_decl(), and zero_sized_type().
bool is_typedef_decl | ( | ) |
Returns true if X is a typedef decl.
Referenced by typedef_variant_p().
hashval_t iterative_hash_expr | ( | ) |
Generate a hash value for an expression. This can be used iteratively by passing a previous result as the VAL argument. This function is intended to produce the same hash for expressions which would compare equal using operand_equal_p.
References BUILT_IN_NORMAL, builtin_decl_explicit(), builtin_decl_explicit_p(), commutative_tree_code(), fixed_hash(), HOST_WIDE_INT, iterative_hash_hashval_t(), iterative_hash_host_wide_int(), real_hash(), and tcc_declaration.
Referenced by avail_expr_hash(), build_range_type_1(), compare_tree(), gather_mem_refs_stmt(), get_expr_id(), val_ssa_equiv_hasher::hash(), asan_mem_ref_hasher::hash(), cand_chain_hasher::hash(), log_entry_hasher::hash(), tm_memop_hasher::hash(), iterative_hash_canonical_type(), iterative_hash_exprs_commutative(), iterative_hash_hashable_expr(), mem_attrs_htab_hash(), mem_ref_in_stmt(), same_succ_hash(), vn_hash_constant_with_type(), vn_nary_op_compute_hash(), vn_phi_compute_hash(), vn_reference_compute_hash(), and vn_reference_op_compute_hash().
hashval_t iterative_hash_exprs_commutative | ( | const_tree | t1, |
const_tree | t2, | ||
hashval_t | val | ||
) |
Generate a hash value for a pair of expressions. This can be used iteratively by passing a previous result as the VAL argument. The same hash value is always returned for a given pair of expressions, regardless of the order in which they are presented. This is useful in hashing the operands of commutative functions.
References iterative_hash_expr(), and iterative_hash_hashval_t().
Referenced by iterative_hash_hashable_expr().
hashval_t iterative_hash_hashval_t | ( | ) |
Produce good hash value combining VAL and VAL2.
Referenced by build_range_type_1(), asan_mem_ref_hasher::hash(), polymorphic_call_target_hasher::hash(), hash_scc(), hash_tree(), iterative_hash_canonical_type(), iterative_hash_expr(), iterative_hash_exprs_commutative(), iterative_hash_hashable_expr(), iterative_hash_host_wide_int(), phi_trans_add(), phi_trans_lookup(), same_succ_hash(), vn_nary_op_compute_hash(), vn_reference_compute_hash(), and vn_reference_op_compute_hash().
hashval_t iterative_hash_host_wide_int | ( | ) |
Produce good hash value combining VAL and VAL2.
References HOST_WIDE_INT, and iterative_hash_hashval_t().
Referenced by hash_tree(), iterative_hash_expr(), and make_vector_type().
tree lhd_gcc_personality | ( | void | ) |
Return the GCC personality function decl.
References build_personality_function(), and gcc_eh_personality_decl.
bool list_equal_p | ( | ) |
Return true if T1 and T2 are equivalent lists.
int list_length | ( | ) |
Return the length of a chain of nodes chained through TREE_CHAIN. We expect a null pointer to mark the end of the chain. This is the Lisp primitive `length'.
References len.
Referenced by build_constructor_from_list(), decl_attributes(), expand_asm_operands(), expand_call(), gimplify_asm_expr(), merge_attributes(), prepare_call_arguments(), and write_global_declarations().
|
static |
A subroutine of build_common_builtin_nodes. Define a builtin function.
References add_builtin_function(), BUILT_IN_NORMAL, set_builtin_decl(), and set_call_expr_flags().
Referenced by build_common_builtin_nodes().
|
static |
A variant of lookup_attribute() that can be used with an identifier as the first argument, and where the identifier can be either 'text' or '__text__'. Given an attribute ATTR_IDENTIFIER, and a list of attributes LIST, return a pointer to the attribute's list element if the attribute is part of the list, or NULL_TREE if not found. If the attribute appears more than once, this only returns the first occurrence; the TREE_CHAIN of the return value should be passed back in if further occurrences are wanted. ATTR_IDENTIFIER must be an identifier but can be in the form 'text' or '__text__'.
References get_attribute_name().
Referenced by attribute_list_contained(), and merge_attributes().
tree lower_bound_in_type | ( | ) |
Returns the smallest value obtainable by casting something in INNER type to OUTER type.
References double_int_to_tree(), double_int::high, HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, and double_int::low.
Referenced by add_param_constraints(), adjust_range_with_scev(), determine_exit_conditions(), fold_widened_comparison(), infer_loop_bounds_from_pointer_arith(), infer_loop_bounds_from_signedness(), and scev_probably_wraps_p().
tree make_node_stat | ( | ) |
Return a newly allocated node of code CODE. For decl and type nodes, some other fields are initialized. The rest of the node is initialized to zero. This function cannot be used for TREE_VEC or OMP_CLAUSE nodes, which is enforced by asserts in tree_code_size. Achoo! I got a code in the node.
References allocate_decl_uid(), ggc_alloc_cleared_tree_node_stat(), input_location, next_debug_decl_uid, next_type_uid, record_node_allocation_statistics(), targetm, tcc_constant, tcc_declaration, tcc_expression, tcc_statement, tcc_type, and tree_code_size().
Referenced by build0_stat(), build2_stat(), build3_stat(), build4_stat(), build5_stat(), build_decl_stat(), and build_tree_list_stat().
|
static |
Create or reuse an accum type by SIZE, UNSIGNEDP, and SATP.
References make_accum_type().
|
static |
Create or reuse a fract type by SIZE, UNSIGNEDP, and SATP.
References make_fract_type().
|
static |
References make_signed_type(), and make_unsigned_type().
Referenced by build_common_tree_nodes().
simple_ipa_opt_pass* make_pass_ipa_free_lang_data | ( | ) |
tree make_tree_binfo_stat | ( | ) |
Build a BINFO with LEN language slots.
References ggc_alloc_tree_node_stat(), memset(), and record_node_allocation_statistics().
tree make_tree_vec_stat | ( | ) |
Build a newly constructed TREE_VEC node of length LEN.
References ggc_alloc_cleared_tree_node_stat(), len, and record_node_allocation_statistics().
tree make_vector_stat | ( | ) |
Build a newly constructed TREE_VEC node of length LEN.
References ggc_alloc_cleared_tree_node_stat(), len, and record_node_allocation_statistics().
|
static |
Create a new vector type node holding SUBPARTS units of type INNERTYPE, and mapped to the machine mode MODE. Initialize its fields and build the information necessary for debugging output.
References build_type_attribute_qual_variant(), iterative_hash_host_wide_int(), layout_type(), and type_hash_canon().
Referenced by build_opaque_vector_type(), build_vector_type(), and build_vector_type_for_mode().
HOST_WIDE_INT max_int_size_in_bytes | ( | ) |
Return the maximum size of TYPE (in bytes) as a wide integer or return -1 if the size can vary or is larger than an integer.
References host_integerp(), HOST_WIDE_INT, lang_hooks_for_types::max_size, tree_low_cst(), and lang_hooks::types.
Referenced by assign_temp(), and force_constant_size().
|
static |
Computes the canonical argument types from the argument type list ARGTYPES. Upon return, *ANY_STRUCTURAL_P will be true iff either it was true on entry to this function, or if any of the ARGTYPES are structural. Upon return, *ANY_NONCANONICAL_P will be true iff either it was true on entry to this function, or if any of the ARGTYPES are non-canonical. Returns a canonical argument list, which may be ARGTYPES when the canonical argument list is unneeded (i.e., *ANY_STRUCTURAL_P is true) or would not differ from ARGTYPES.
References chainon(), and nreverse().
Referenced by build_function_type(), and build_method_type_directly().
double_int mem_ref_offset | ( | ) |
Return the constant offset of a MEM_REF or TARGET_MEM_REF tree T.
References double_int::sext(), and tree_to_double_int().
Referenced by addr_object_size(), compute_complex_assign_jump_func(), compute_object_offset(), constant_pointer_difference(), copy_ref_info(), decode_addr_const(), dr_analyze_innermost(), expand_expr_real_1(), fold_builtin_memory_op(), forward_propagate_addr_expr_1(), get_addr_base_and_unit_offset_1(), get_ancestor_addr_info(), get_base_constructor(), get_inner_reference(), get_object_alignment_2(), get_ref_base_and_extent(), indirect_ref_may_alias_decl_p(), indirect_refs_may_alias_p(), jump_function_from_stmt(), non_rewritable_mem_ref_base(), restructure_reference(), search_for_addr_array(), sra_ipa_modify_expr(), stmt_kills_ref_p_1(), vect_check_gather(), and vn_reference_maybe_forwprop_address().
tree merge_attributes | ( | ) |
Return an attribute list that is the union of a1 and a2.
References attribute_list_contained(), attribute_value_equal(), copy_node(), get_attribute_name(), list_length(), and lookup_ident_attribute().
Referenced by merge_decl_attributes(), merge_dllimport_decl_attributes(), and merge_type_attributes().
tree merge_decl_attributes | ( | ) |
Given decls OLDDECL and NEWDECL, merge their attributes and return the result.
References merge_attributes().
tree merge_dllimport_decl_attributes | ( | ) |
Specialization of merge_decl_attributes for various Windows targets. This handles the following situation: __declspec (dllimport) int foo; int foo; The second instance of `foo' nullifies the dllimport.
References lookup_attribute(), merge_attributes(), remove_attribute(), and warning().
tree merge_type_attributes | ( | ) |
Given types T1 and T2, merge their attributes and return the result.
References merge_attributes().
|
inlinestatic |
Return true if DECL may need an assembler name to be set.
References BUILT_IN_FRONTEND, and cgraph_get_node().
Referenced by assign_assembler_name_if_neeeded().
bool needs_to_live_in_memory | ( | ) |
Return true if T (assumed to be a DECL) must be assigned a memory location.
References aggregate_value_p(), current_function_decl, and is_global_var().
Referenced by gimplify_bind_expr(), gimplify_compound_literal_expr(), gimplify_function_tree(), gimplify_modify_expr_rhs(), gimplify_target_expr(), is_gimple_reg(), maybe_add_sra_candidate(), and requires_barrier().
tree nreverse | ( | ) |
Reverse the order of elements in the chain T, and return the new head of the chain (old last element).
Referenced by build_function_type_list_1(), build_function_type_skip_args(), dbxout_init(), declare_vars(), fixup_child_record_type(), ipa_modify_formal_parameters(), layout_type(), maybe_canonicalize_argtypes(), remap_decls(), remap_type_1(), sdbout_dequeue_anonymous_types(), sdbout_init(), self_referential_size(), and task_copyfn_remap_type().
tree num_ending_zeros | ( | ) |
Returns number of zeros at the end of binary representation of X. ??? Use ffs if available?
References build_int_cst_type(), HOST_BITS_PER_WIDE_INT, and HOST_WIDE_INT.
Referenced by iv_period(), number_of_iterations_ne(), and number_of_iterations_ne_max().
tree obj_type_ref_class | ( | ) |
REF is OBJ_TYPE_REF, return the class the ref corresponds to.
Referenced by cgraph_create_indirect_edge(), gimple_fold_call(), and ipa_analyze_virtual_call_uses().
void omp_clause_check_failed | ( | const_tree | node, |
const char * | file, | ||
int | line, | ||
const char * | function, | ||
enum omp_clause_code | code | ||
) |
Similar to tree_check_failed but applied to OMP_CLAUSE codes.
References internal_error(), tree_code_name, and trim_filename().
void omp_clause_operand_check_failed | ( | int | idx, |
const_tree | t, | ||
const char * | file, | ||
int | line, | ||
const char * | function | ||
) |
Similar to above, except that the check is for the number of operands of an OMP_CLAUSE node.
References internal_error(), omp_clause_num_ops, and trim_filename().
void omp_clause_range_check_failed | ( | const_tree | node, |
const char * | file, | ||
int | line, | ||
const char * | function, | ||
enum omp_clause_code | c1, | ||
enum omp_clause_code | c2 | ||
) |
Similar to tree_range_check_failed but applied to OMP_CLAUSE codes.
References buffer, internal_error(), strlen(), and trim_filename().
int operand_equal_for_phi_arg_p | ( | ) |
Return nonzero if two operands that are suitable for PHI nodes are necessarily equal. Specifically, both ARG0 and ARG1 must be either SSA_NAME or invariant. Note that this is strictly an optimization. That is, callers of this function can directly call operand_equal_p and get the same result, only slower.
References operand_equal_p().
Referenced by minmax_replacement(), phi_alternatives_equal(), record_equivalences_from_phis(), same_phi_alternatives_1(), simplify_bitwise_binary(), single_non_singleton_phi_for_edges(), tree_transform_and_unroll_loop(), and value_replacement().
|
static |
Print out the statistics for the DECL_DEBUG_EXPR hash table.
References debug_expr_for_decl.
Referenced by dump_tree_statistics().
|
static |
References type_hash_table.
Referenced by dump_tree_statistics().
|
static |
Print out the statistics for the DECL_VALUE_EXPR hash table.
References value_expr_for_decl.
Referenced by dump_tree_statistics().
bool private_is_attribute_p | ( | ) |
The backbone of is_attribute_p(). ATTR_LEN is the string length of ATTR_NAME. Also used internally by remove_attribute().
Referenced by remove_attribute().
tree private_lookup_attribute | ( | ) |
The backbone of lookup_attribute(). ATTR_LEN is the string length of ATTR_NAME, and LIST is not NULL_TREE.
References get_attribute_name().
|
static |
Set various status flags when building a CALL_EXPR object T.
References call_expr_flags().
Referenced by build_call_array_loc(), build_call_valist(), build_call_vec(), substitute_in_expr(), and substitute_placeholder_in_expr().
void protected_set_expr_location | ( | ) |
Like SET_EXPR_LOCATION, but make sure the tree can have a location. LOC is the location to use in tree T.
Referenced by gimplify_arg().
bool prototype_p | ( | ) |
Return true if TYPE has a prototype.
Referenced by add_prototyped_attribute(), build_function_decl_skip_args(), gen_subprogram_die(), go_format_type(), and useless_type_conversion_p().
tree purpose_member | ( | ) |
Return first list element whose TREE_PURPOSE is ELEM. Return 0 if ELEM is not in LIST.
|
static |
Push tree EXP onto vector QUEUE if it is not already present.
References simple_cst_equal().
Referenced by find_placeholder_in_expr().
bool range_in_array_bounds_p | ( | ) |
Returns true if it is possible to prove that the range of an array access REF (an ARRAY_RANGE_REF expression) falls into the array bounds.
References array_ref_low_bound(), array_ref_up_bound(), and tree_int_cst_lt().
Referenced by tree_could_trap_p().
int real_minus_onep | ( | ) |
Return 1 if EXPR is the real constant minus one. Trailing zeroes matter for decimal float constants, so don't return 1 for them.
References dconstm1, and real_zerop().
Referenced by execute_cse_sincos(), fold_binary_loc(), and tree_predict_by_opcode().
int real_onep | ( | ) |
Return 1 if EXPR is the real constant one in real or complex form. Trailing zeroes matter for decimal float constants, so don't return 1 for them.
References dconst1, and real_zerop().
Referenced by eliminate_using_constants(), fold_binary_loc(), fold_builtin_pow(), fold_builtin_powi(), and tree_predict_by_opcode().
int real_twop | ( | ) |
Return 1 if EXPR is the real constant two. Trailing zeroes matter for decimal float constants, so don't return 1 for them.
References dconst2, and real_zerop().
REAL_VALUE_TYPE real_value_from_int_cst | ( | ) |
Return a new REAL_CST node whose type is TYPE and whose value is the integer value of the INTEGER_CST node I.
References memset(), and real_from_integer().
int real_zerop | ( | ) |
Return 1 if EXPR is the real constant zero. Trailing zeroes matter for decimal float constants, so don't return 1 for them.
References dconst0.
Referenced by abs_replacement(), const_with_all_bytes_same(), eliminate_using_constants(), fold_binary_loc(), fold_builtin_cabs(), fold_builtin_cexp(), fold_builtin_hypot(), fold_builtin_load_exponent(), fold_cond_expr_with_comparison(), fold_real_zero_addition_p(), initializer_zerop(), operand_equal_p(), real_minus_onep(), real_onep(), real_twop(), record_edge_info(), and tree_predict_by_opcode().
int really_constant_p | ( | ) |
Nonzero if EXP is a constant or a cast of a constant.
Referenced by expand_expr_real_2().
void recompute_tree_invariant_for_addr_expr | ( | ) |
Low-level constructors for expressions.
A helper function for build1 and constant folders. Set TREE_CONSTANT, and TREE_SIDE_EFFECTS for an ADDR_EXPR.
References lang_hooks::expr_to_decl, handled_component_p(), and staticp().
Referenced by build1_stat(), build_invariant_address(), convert_local_reference_op(), convert_nonlocal_reference_op(), copy_tree_body_r(), expand_omp_regimplify_p(), gimplify_addr_expr(), lower_omp_regimplify_p(), optimize_stmt(), propagate_into_all_uses(), propagate_rhs_into_lhs(), remap_gimple_op_r(), rename_uses(), replace_uses_by(), substitute_and_fold(), tidy_after_forward_propagate_addr(), and verify_address().
tree reconstruct_complex_type | ( | ) |
HACK. GROSS. This is absolutely disgusting. I wish there was a better way. If we requested a pointer to a vector, build up the pointers that we stripped off while looking for the inner type. Similarly for return values from functions. The argument TYPE is the top of the chain, and BOTTOM is the new type which we will point to.
References build_array_type(), build_function_type(), build_method_type_directly(), build_offset_type(), build_pointer_type_for_mode(), build_reference_type_for_mode(), and build_type_attribute_qual_variant().
|
static |
Record interesting allocation statistics for a tree node with CODE and LENGTH.
References b_kind, binfo_kind, c_kind, constr_kind, d_kind, e_kind, id_kind, omp_clause_kind, r_kind, s_kind, ssa_name_kind, t_kind, tcc_binary, tcc_comparison, tcc_constant, tcc_declaration, tcc_exceptional, tcc_expression, tcc_reference, tcc_statement, tcc_type, tcc_unary, tcc_vl_exp, tree_code_counts, tree_node_counts, tree_node_sizes, vec_kind, and x_kind.
Referenced by build1_stat(), build_omp_clause(), build_string(), build_vl_exp_stat(), copy_node_stat(), make_node_stat(), make_tree_binfo_stat(), make_tree_vec_stat(), make_vector_stat(), and tree_cons_stat().
tree reference_alias_ptr_type | ( | ) |
Return the pointer-type relevant for TBAA purposes from the gimple memory reference tree T. This is the type to be used for the offset operand of MEM_REF or TARGET_MEM_REF replacements of T.
References build_pointer_type(), and handled_component_p().
Referenced by build_debug_ref_for_model(), build_ref_for_offset(), create_array_ref(), dr_analyze_indices(), rewrite_use_address(), splice_param_accesses(), turn_representatives_into_adjustments(), vect_setup_realignment(), vectorizable_load(), and vectorizable_store().
tree remove_attribute | ( | ) |
Remove any instances of attribute ATTR_NAME in LIST and return the modified list.
References get_attribute_name(), private_is_attribute_p(), and strlen().
Referenced by merge_dllimport_decl_attributes(), process_common_attributes(), and process_function_and_variable_attributes().
|
static |
For languages with One Definition Rule, work out if trees are actually the same even if the tree representation differs. This handles only decls appearing in TYPE_NAME and TYPE_CONTEXT. That is NAMESPACE_DECL, TYPE_DECL, RECORD_TYPE and IDENTIFIER_NODE.
References decls_same_for_odr(), and types_same_for_odr().
Referenced by decls_same_for_odr(), and types_same_for_odr().
|
static |
Save all language fields needed to generate proper debug information for DECL. This saves most fields cleared out by free_lang_data_in_decl.
References DINFO_LEVEL_TERSE.
Referenced by add_tree_to_fld_list().
|
static |
Save all language fields needed to generate proper debug information for TYPE. This saves most fields cleared out by free_lang_data_in_type.
References DINFO_LEVEL_TERSE.
Referenced by add_tree_to_fld_list().
tree save_expr | ( | ) |
Wrap a SAVE_EXPR around EXPR, if appropriate. Do this to any expression which may be used in more than one place, but must be evaluated only once. Normally, expand_expr would reevaluate the expression each time. Calling save_expr produces something that is evaluated and recorded the first time expand_expr is called on it. Subsequent calls to expand_expr just reuse the recorded value. The call to expand_expr that generates code that actually computes the value is the first call *at compile time*. Subsequent calls *at compile time* generate code to use the saved value. This produces correct result provided that *at run time* control always flows through the insns made by the first expand_expr before reaching the other places where the save_expr was evaluated. You, the caller of save_expr, must make sure this is so. Constants, and certain read-only nodes, are returned with no SAVE_EXPR because that is safe. Expressions containing placeholders are not touched; see tree.def for an explanation of what these are used for.
References contains_placeholder_p(), fold(), skip_simple_arithmetic(), and tree_invariant_p_1().
Referenced by builtin_save_expr(), convert_to_complex(), expand_operands(), fold_comparison(), fold_convert_loc(), fold_inf_compare(), fold_mathfn_compare(), fold_mult_zconjz(), fold_range_test(), gimplify_expr(), lower_reduction_clauses(), stabilize_reference_1(), stabilize_va_list_loc(), and variable_size().
void set_call_expr_flags | ( | ) |
|
static |
Set the type qualifiers for TYPE to TYPE_QUALS, which is a bitmask of the various TYPE_QUAL values.
References TYPE_QUAL_CONST, TYPE_QUAL_RESTRICT, and TYPE_QUAL_VOLATILE.
Referenced by build_qualified_type().
tree signed_or_unsigned_type_for | ( | ) |
If TYPE is an integral or pointer type, return an integer type with the same precision which is unsigned iff UNSIGNEDP is true, or itself if TYPE is already an integer type of signedness UNSIGNEDP.
References build_nonstandard_integer_type(), build_vector_type(), and type().
Referenced by operand_equal_for_comparison_p(), signed_type_for(), store_expr(), and unsigned_type_for().
tree signed_type_for | ( | ) |
If TYPE is an integral or pointer type, return an integer type with the same precision which is signed, or itself if TYPE is already a signed integer type.
References signed_or_unsigned_type_for().
Referenced by affine_fn_op(), all_ones_mask_p(), build_range_check(), convert_to_integer(), difference_cost(), expand_omp_for_generic(), expand_omp_for_init_counts(), expand_omp_for_init_vars(), expand_omp_for_static_chunk(), expand_omp_for_static_nochunk(), expand_omp_simd(), extract_omp_for_data(), fold_binary_loc(), fold_cond_expr_with_comparison(), fold_negate_expr(), fold_single_bit_test_into_sign_test(), fold_ternary_loc(), make_tree(), ptr_difference_cost(), signed_type_for_types(), size_diffop_loc(), unextend(), and vect_create_cond_for_align_checks().
int simple_cst_equal | ( | ) |
Return truthvalue of whether T1 is the same tree structure as T2. Return 1 if they are the same. Return 0 if they are understandably different. Return -1 if either contains tree structure not understood by this function.
References first_const_call_expr_arg(), FIXED_VALUES_IDENTICAL, HOST_WIDE_INT, next_const_call_expr_arg(), tcc_binary, tcc_comparison, tcc_expression, tcc_reference, tcc_statement, tcc_unary, and vec_safe_length().
Referenced by attribute_value_equal(), ccp_lattice_meet(), check_unique_operand_names(), complete_ctor_at_level_p(), compute_record_mode(), count_type_elements(), decl_attributes(), finalize_record_size(), fold_truth_andor_1(), get_maxval_strlen(), gimple_divmod_fixed_value_transform(), gimple_mod_pow2_value_transform(), gimplify_init_ctor_eval(), mode_for_array(), place_field(), push_without_duplicates(), register_edge_assert_for_2(), simple_cst_list_equal(), and type_list_equal().
int simple_cst_list_equal | ( | ) |
Compare two constructor-element-type constants. Return 1 if the lists are known to be equal; otherwise return 0.
References simple_cst_equal().
Referenced by attribute_value_equal().
tree size_in_bytes | ( | ) |
Return the size nominally occupied by an object of type TYPE when it resides in memory. The value is measured in units of bytes, and its data type is that normally used for type sizes (which is the first type created by make_signed_type or make_unsigned_type).
References lang_hooks_for_types::incomplete_type_error, and lang_hooks::types.
Referenced by default_cxx_get_cookie_size(), instrument_derefs(), locate_and_pad_parm(), mudflap_enqueue_constant(), mudflap_finish_file(), std_gimplify_va_arg_expr(), store_one_arg(), subrange_type_die(), and tree_expr_size().
HOST_WIDE_INT size_low_cst | ( | ) |
Return the HOST_WIDE_INT least significant bits of T, a sizetype kind INTEGER_CST. This makes sure to properly sign-extend the constant.
References double_int::low, double_int::sext(), and tree_to_double_int().
Referenced by fold_comparison().
tree skip_simple_arithmetic | ( | ) |
Look inside EXPR into any simple arithmetic operations. Return the outermost non-arithmetic or non-invariant node.
References tree_invariant_p().
Referenced by save_expr(), and tree_invariant_p().
tree skip_simple_constant_arithmetic | ( | ) |
Look inside EXPR into simple arithmetic operations involving constants. Return the outermost non-arithmetic or non-constant node.
Referenced by self_referential_size().
tree stabilize_reference | ( | ) |
Stabilize a reference so that we can use it any number of times without causing its operands to be evaluated more than once. Returns the stabilized reference. This works by means of save_expr, so see the caveats in the comments about save_expr. Also allows conversion expressions whose operands are references. Any other kind of expression is returned unchanged.
References build_nt(), and stabilize_reference_1().
tree stabilize_reference_1 | ( | ) |
Subroutine of stabilize_reference; this is called for subtrees of references. Any expression with side-effects must be put in a SAVE_EXPR to ensure that it is only evaluated once. We don't put SAVE_EXPR nodes around everything, because assigning very simple expressions to temporaries causes us to miss good opportunities for optimizations. Among other things, the opportunity to fold in the addition of a constant into an addressing mode often gets lost, e.g. "y[i+1] += x;". In general, we take the approach that we should not make an assignment unless we are forced into it - i.e., that any non-side effect operator should be allowed, and that cse should take care of coalescing multiple utterances of the same expression should that prove fruitful.
References build_nt(), save_expr(), tcc_binary, tcc_comparison, tcc_constant, tcc_declaration, tcc_exceptional, tcc_expression, tcc_reference, tcc_statement, tcc_type, tcc_unary, tcc_vl_exp, and tree_invariant_p().
Referenced by stabilize_reference().
tree staticp | ( | ) |
If arg is static -- a reference to an object in static storage -- then return the object. This is not the same as the C meaning of `static'. If arg isn't static, return NULL.
Referenced by initializer_constant_valid_p_1(), recompute_tree_invariant_for_addr_expr(), and safe_from_p().
bool stdarg_p | ( | ) |
Return true if TYPE has a variable argument list.
Referenced by allocate_struct_function(), fold_builtin_next_arg(), gen_subprogram_die(), and go_format_type().
tree strip_array_types | ( | ) |
Recursively examines the array elements of TYPE, until a non-array element type is found.
References type().
Referenced by increase_alignment().
tree strip_float_extensions | ( | ) |
Avoid any floating point extensions from EXP.
References build_real(), exact_real_truncate(), exp(), and real_value_truncate().
Referenced by convert_to_integer(), convert_to_real(), fold_binary_loc(), fold_comparison(), fold_fixed_mathfn(), fold_negate_expr(), fold_trunc_transparent_mathfn(), fold_unary_loc(), and negate_expr_p().
const_tree strip_invariant_refs | ( | ) |
Strip out all handled components that produce invariant offsets.
References handled_component_p(), and is_gimple_constant().
Referenced by is_gimple_invariant_address(), is_gimple_ip_invariant_address(), is_gimple_min_lval(), and transaction_invariant_address_p().
bool subrange_type_for_debug_p | ( | ) |
Return true if the debug information for TYPE, a subtype, should be emitted as a subrange type. If so, set LOWVAL to the low bound and HIGHVAL to the high bound, respectively. Sometimes doing so unnecessarily obfuscates the debug info and doesn't reflect the source code.
References lang_hooks_for_types::get_subrange_bounds, int_size_in_bytes(), tree_int_cst_equal(), and lang_hooks::types.
Referenced by dbxout_type(), and modified_type_die().
tree substitute_in_expr | ( | ) |
Given a tree EXP, a FIELD_DECL F, and a replacement value R, return a tree with all occurrences of references to F in a PLACEHOLDER_EXPR replaced by R. Also handle VAR_DECLs and CONST_DECLs. Note that we assume here that EXP contains only arithmetic expressions or CALL_EXPRs with PLACEHOLDER_EXPRs occurring only in their argument list.
References copy_node(), exp(), fold(), maybe_inline_call_in_expr(), process_call_operands(), tcc_binary, tcc_comparison, tcc_constant, tcc_declaration, tcc_exceptional, tcc_expression, tcc_reference, tcc_unary, and tcc_vl_exp.
Referenced by self_referential_size().
tree substitute_placeholder_in_expr | ( | ) |
Similar, but look for a PLACEHOLDER_EXPR in EXP and find a replacement for it within OBJ, a tree that is an object or a chain of references.
References copy_node(), exp(), fold(), process_call_operands(), tcc_binary, tcc_comparison, tcc_constant, tcc_declaration, tcc_exceptional, tcc_expression, tcc_reference, tcc_statement, tcc_unary, and tcc_vl_exp.
tree tree_block | ( | ) |
void tree_check_failed | ( | const_tree | node, |
const char * | file, | ||
int | line, | ||
const char * | function, | ||
... | |||
) |
Complain that the tree code of NODE does not match the expected 0 terminated list of trailing codes. The trailing code list can be empty, for a more vague error message. FILE, LINE, and FUNCTION are of the caller.
References buffer, internal_error(), strlen(), tree_code_name, and trim_filename().
void tree_class_check_failed | ( | const_tree | node, |
const enum tree_code_class | cl, | ||
const char * | file, | ||
int | line, | ||
const char * | function | ||
) |
Similar to tree_check_failed, except that we check for a class of tree code, given in CL.
References internal_error(), tree_code_name, and trim_filename().
size_t tree_code_size | ( | ) |
Compute the number of bytes occupied by a tree with code CODE. This function cannot be used for nodes that have variable sizes, including TREE_VEC, STRING_CST, and CALL_EXPR.
References lang_hooks::identifier_size, tcc_binary, tcc_comparison, tcc_constant, tcc_declaration, tcc_exceptional, tcc_expression, tcc_reference, tcc_statement, tcc_type, tcc_unary, and lang_hooks::tree_size.
Referenced by make_node_stat(), and tree_size().
tree tree_cons_stat | ( | ) |
Return a newly created TREE_LIST node whose purpose and value fields are PURPOSE and VALUE and whose TREE_CHAIN is CHAIN.
References ggc_alloc_tree_node_stat(), memset(), and record_node_allocation_statistics().
void tree_contains_struct_check_failed | ( | const_tree | node, |
const enum tree_node_structure_enum | en, | ||
const char * | file, | ||
int | line, | ||
const char * | function | ||
) |
Similar to tree_class_check_failed, except that we check for whether CODE contains the tree structure identified by EN.
References internal_error(), tree_code_name, and trim_filename().
unsigned int tree_decl_map_hash | ( | ) |
Hash a from tree in a tree_decl_map.
Referenced by init_ttree().
tree tree_expr_size | ( | ) |
Returns a tree for the size of EXP in bytes.
References size_in_bytes().
Referenced by expr_size(), and int_expr_size().
int tree_floor_log2 | ( | ) |
Similar, but return the largest integer Y such that 2 ** Y is less than or equal to EXPR.
References floor_log2(), HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT_M1U, and tree_log2().
Referenced by do_jump(), extract_range_basic(), inverse(), and tree_int_cst_min_precision().
int tree_int_cst_compare | ( | ) |
Returns -1 if T1 < T2, 0 if T1 == T2, and 1 if T1 > T2.
References tree_int_cst_lt().
Referenced by and_comparisons_1(), bump_vector_ptr(), compare_case_labels(), compare_values_warnv(), default_builtin_vector_alignment_reachable(), dr_group_sort_cmp(), find_case_label_for_value(), find_case_label_index(), find_case_label_ranges(), fold_comparison(), idx_infer_loop_bounds(), or_comparisons_1(), preprocess_case_label_vec_for_gimple(), vect_analyze_data_ref_access(), vect_analyze_data_ref_accesses(), vect_analyze_group_access(), vect_compute_data_ref_alignment(), vect_create_cond_for_alias_checks(), vect_create_cond_for_align_checks(), vect_enhance_data_refs_alignment(), vect_gen_niters_for_prolog_loop(), vect_recog_widen_shift_pattern(), vect_setup_realignment(), vect_update_misalignment_for_peel(), vectorizable_load(), and vectorizable_store().
int tree_int_cst_equal | ( | ) |
Nonzero if integer constants T1 and T2 represent the same constant value.
Referenced by adjacent_dr_p(), all_ones_mask_p(), balance_case_nodes(), build_constructors(), byte_from_pos(), c_strlen(), check_array_ref(), collect_switch_conv_info(), compare_constant(), convert_to_integer(), convert_to_vector(), create_component_ref_by_pieces_1(), emit_case_nodes(), expand_expr_real_1(), extr_type_from_vtbl_ptr_store(), fold_binary_loc(), fold_builtin_memory_op(), fold_convert_loc(), fold_convertible_p(), fold_indirect_ref_1(), fold_negate_expr(), fold_relational_const(), get_inner_reference(), gimple_compare_field_offset(), gimple_fold_indirect_ref(), ipa_get_stmt_member_ptr_load_param(), is_gcond_subset_of(), is_value_included_in(), make_range_step(), maybe_canonicalize_comparison_1(), merge_ranges(), node_has_high_bound(), node_has_low_bound(), operand_equal_p(), optimize_minmax_comparison(), optimize_range_tests(), pos_from_bit(), preprocess_case_label_vec_for_gimple(), range_int_cst_singleton_p(), register_edge_assert_for_2(), size_diffop_loc(), stmt_kills_ref_p_1(), subrange_type_for_debug_p(), try_move_mult_to_index(), type_hash_eq(), useless_type_conversion_p(), vect_analyze_data_ref_accesses(), and vect_analyze_data_refs().
int tree_int_cst_lt | ( | ) |
Nonzero if integer constants T1 and T2 represent values that satisfy <. The precise way of comparison depends on their data type.
References tree_int_cst_sgn().
Referenced by addr_object_size(), array_size_for_constructor(), build_constructors(), check_array_ref(), convert_to_integer(), create_iv(), expand_builtin_memory_chk(), expand_builtin_strcmp(), expand_builtin_strncmp(), expand_builtin_strncpy(), expand_case(), extract_omp_for_data(), extract_range_from_binary_expr_1(), find_loop_niter(), find_loop_niter_by_eval(), fold(), fold_binary_loc(), fold_builtin_memory_chk(), fold_builtin_snprintf_chk_1(), fold_builtin_sprintf_chk_1(), fold_builtin_strncat_chk(), fold_builtin_strncpy(), fold_builtin_stxcpy_chk(), fold_builtin_stxncpy_chk(), get_maxval_strlen(), gimple_verify_flow_info(), in_array_bounds_p(), indirect_ref_may_alias_decl_p(), layout_type(), lto_symtab_resolve_symbols(), make_range_step(), may_eliminate_iv(), maybe_emit_chk_warning(), maybe_emit_sprintf_chk_warning(), node_has_high_bound(), node_has_low_bound(), optimize_minmax_comparison(), range_in_array_bounds_p(), set_and_canonicalize_value_range(), simplify_builtin_call(), size_diffop_loc(), tree_int_cst_compare(), try_move_mult_to_index(), and verify_gimple_switch().
unsigned int tree_int_cst_min_precision | ( | ) |
Return the minimum number of bits needed to represent VALUE in a signed or unsigned type, UNSIGNEDP says which.
References integer_zerop(), tree_floor_log2(), and tree_int_cst_sgn().
Referenced by tree_binary_nonnegative_warnv_p().
int tree_int_cst_sgn | ( | ) |
Return an indication of the sign of the integer constant T. The return value is -1 if T < 0, 0 if T == 0, and 1 if T > 0. Note that -1 will never be returned if T's type is unsigned.
Referenced by build_addr_arg_loc(), chrec_apply(), chrec_is_positive(), compare_tree_int(), compare_values_warnv(), compute_object_offset(), convert_to_integer(), dump_generic_node(), expand_builtin_object_size(), expand_omp_for_generic(), expand_vector_divmod(), extract_muldiv_1(), extract_range_from_binary_expr_1(), fold_binary_loc(), fold_builtin_object_size(), fold_builtin_strncmp(), fold_comparison(), fold_div_compare(), fully_constant_vn_reference_p(), get_maxval_strlen(), go_format_type(), layout_type(), maybe_canonicalize_comparison_1(), multiple_of_p(), return_prediction(), tree_binary_nonnegative_warnv_p(), tree_int_cst_lt(), tree_int_cst_min_precision(), tree_single_nonnegative_warnv_p(), vect_create_data_ref_ptr(), vect_recog_divmod_pattern(), vrp_int_const_binop(), and zero_nonzero_bits_from_vr().
int tree_int_cst_sign_bit | ( | ) |
Return the most significant (sign) bit of T.
References HOST_BITS_PER_WIDE_INT, and HOST_WIDE_INT.
Referenced by derive_constant_upper_bound_ops(), determine_exit_conditions(), idx_infer_loop_bounds(), number_of_iterations_cond(), number_of_iterations_ne(), record_nonwrapping_iv(), scev_direction(), scev_probably_wraps_p(), and valid_constant_size_p().
|
static |
Return true if T is function-invariant (internal function, does not handle arithmetic; that's handled in skip_simple_arithmetic and tree_invariant_p).
Referenced by skip_simple_arithmetic(), stabilize_reference_1(), and tree_invariant_p_1().
|
static |
Return true if T is function-invariant.
References skip_simple_arithmetic(), and tree_invariant_p_1().
|
static |
References decl_address_invariant_p(), handled_component_p(), and tree_invariant_p().
Referenced by save_expr(), and tree_invariant_p().
tree tree_last | ( | ) |
Return the last node in a chain of nodes (chained through TREE_CHAIN).
Referenced by fold_builtin_next_arg(), and ipa_modify_formal_parameters().
int tree_log2 | ( | ) |
Return the power of two represented by a tree node known to be a power of two.
References exact_log2(), HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, and HOST_WIDE_INT_M1U.
Referenced by expand_vector_divmod(), fold_binary_loc(), fold_single_bit_test(), fold_ternary_loc(), recognize_single_bit_test(), simplify_div_or_mod_using_ranges(), tree_floor_log2(), and vect_recog_divmod_pattern().
HOST_WIDE_INT tree_low_cst | ( | ) |
Return the HOST_WIDE_INT least significant bits of T if it is an INTEGER_CST and there is no overflow. POS is nonzero if the result must be non-negative. We must be able to satisfy the above conditions.
References host_integerp().
Referenced by add_bit_offset_attribute(), add_bit_size_attribute(), add_bound_info(), add_data_member_location_attribute(), add_descr_info_field(), add_or_mark_expr(), add_pure_or_virtual_attribute(), add_stack_var(), add_subscript_strides(), addr_object_size(), adjust_last_stmt(), adjust_offset_for_component_ref(), alloc_object_size(), analyze_all_variable_accesses(), ao_ref_init_from_vn_reference(), asan_add_global(), assemble_noswitch_variable(), assemble_variable(), assemble_variable_contents(), bit_value_assume_aligned(), build_fn_info(), build_nonstandard_integer_type(), build_replicated_const(), build_tm_load(), build_tm_store(), build_user_friendly_ref_for_offset(), c_getstr(), c_strlen(), categorize_ctor_elements_1(), cgraph_create_indirect_edge(), check_all_va_list_escapes(), check_range(), completely_scalarize_record(), completely_scalarize_var(), compute_object_offset(), compute_object_sizes(), const_binop(), count_type_elements(), create_temp_arrays(), dbxout_expand_expr(), dbxout_range_type(), dbxout_type(), dbxout_type_fields(), dbxout_type_method_1(), decide_one_param_reduction(), decode_addr_const(), default_vector_alignment(), defer_stack_allocation(), descr_info_loc(), determine_known_aggregate_parts(), do_mpfr_bessel_n(), dump_case_nodes(), dw_sra_loc_expr(), emit_case_bit_tests(), emit_case_dispatch_table(), excess_unit_span(), expand_builtin_atomic_compare_exchange(), expand_builtin_eh_common(), expand_builtin_eh_return_data_regno(), expand_builtin_frame_address(), expand_builtin_memset_args(), expand_builtin_object_size(), expand_builtin_strncpy(), expand_constructor(), expand_expr_real_2(), expand_omp_atomic(), expand_omp_simd(), expand_one_stack_var(), expand_one_var(), expand_vector_addition(), expand_vector_divmod(), expand_vector_parallel(), expand_vector_piecewise(), find_param_candidates(), finish_bitfield_representative(), fold_binary_loc(), fold_builtin_load_exponent(), fold_builtin_memchr(), fold_builtin_memcmp(), fold_builtin_memory_op(), fold_builtin_memset(), fold_builtin_object_size(), fold_builtin_snprintf(), fold_builtin_strncmp(), fold_indirect_ref_1(), fold_ternary_loc(), fold_unary_loc(), fortran_common(), gcd_of_steps_may_divide_p(), gen_descr_array_type_die(), get_binfo_at_offset(), get_bit_range(), get_inner_reference(), get_mem_align_offset(), get_narrower(), get_object_alignment_2(), get_stridx(), gimple_extract_devirt_binfo_from_cst(), gimple_fold_indirect_ref(), gimple_get_virt_method_for_binfo(), go_format_type(), go_output_typedef(), handle_builtin_memcpy(), handle_pointer_plus(), highest_pow2_factor(), init_eh(), init_offset_limit(), instrument_builtin_call(), int_bit_position(), int_byte_position(), int_expr_size(), ipa_analyze_virtual_call_uses(), ipa_intraprocedural_devirtualization(), ipa_print_node_jump_functions_for_edge(), is_aligning_offset(), iv_period(), loc_list_from_tree(), locate_and_pad_parm(), lower_rec_simd_input_clauses(), make_bit_field_ref(), max_int_size_in_bytes(), maybe_add_sra_candidate(), mode_for_array(), mode_for_size_tree(), move_stmt_eh_region_tree_nr(), native_encode_initializer(), native_encode_string(), number_of_iterations_ne(), number_of_iterations_ne_max(), optimize_location_into_implicit_ptr(), output_constant(), output_constructor_array_range(), output_constructor_bitfield(), output_constructor_regular_field(), output_object_block(), place_block_symbol(), place_field(), plain_type_1(), plus_stmt_object_size(), predict_loops(), prepare_call_arguments(), propagate_aggs_accross_jump_function(), register_edge_assert_for_2(), remap_eh_region_tree_nr(), rtx_addr_can_trap_p_1(), sdbout_one_type(), self_reuse_distance(), set_mem_attributes_minus_bitpos(), simple_type_size_in_bits(), simplify_builtin_call(), simplify_rotate(), splice_param_accesses(), sra_modify_expr(), stack_protect_classify_type(), store_constructor(), strips_small_constant(), tm_log_add(), tm_log_emit_stmt(), try_unroll_loop_completely(), va_list_counter_bump(), vect_check_gather(), vect_create_epilog_for_reduction(), vect_model_reduction_cost(), vect_recog_divmod_pattern(), vect_recog_pow_pattern(), vect_recog_rotate_pattern(), and widen_memory_access().
int tree_map_base_eq | ( | ) |
Return true if the from tree in both tree maps are equal.
References tree_map_base::from.
Referenced by stridxlist_hasher::equal().
unsigned int tree_map_base_hash | ( | ) |
Hash a from tree in a tree_base_map.
References tree_map_base::from.
Referenced by tree_int_map_hasher::hash().
int tree_map_base_marked_p | ( | ) |
Return true if this tree map structure is marked for garbage collection purposes. We simply return true if the from tree is marked, so that this structure goes away when the from tree goes away.
References tree_map_base::from, and ggc_marked_p().
unsigned int tree_map_hash | ( | ) |
Hash a from tree in a tree_map.
Referenced by move_sese_region_to_fn(), record_tm_clone_pair(), and record_tm_replacement().
enum tree_node_structure_enum tree_node_structure | ( | ) |
Return which tree structure is used by T.
References tree_node_structure_for_code().
|
inlinestatic |
Return the tree node structure used by tree code CODE.
References tcc_binary, tcc_comparison, tcc_declaration, tcc_expression, tcc_reference, tcc_statement, tcc_type, tcc_unary, and tcc_vl_exp.
Referenced by initialize_tree_contains_struct(), and tree_node_structure().
location_t tree_nonartificial_location | ( | ) |
If EXP is inlined from an __attribute__((__artificial__)) function, return the location of the original call expression.
References block_nonartificial_location().
Referenced by expand_builtin_memory_chk(), expand_expr_real_1(), maybe_emit_chk_warning(), maybe_emit_free_warning(), and maybe_emit_sprintf_chk_warning().
|
inlinestatic |
Return true iff conversion in EXP generates no instruction. Mark it inline so that we fully inline into the stripping functions even though we have two uses of this function.
Referenced by tree_sign_nop_conversion(), and tree_strip_nop_conversions().
void tree_not_check_failed | ( | const_tree | node, |
const char * | file, | ||
int | line, | ||
const char * | function, | ||
... | |||
) |
Complain that the tree code of NODE does match the expected 0 terminated list of trailing codes. FILE, LINE, and FUNCTION are of the caller.
References buffer, internal_error(), strlen(), tree_code_name, and trim_filename().
void tree_not_class_check_failed | ( | const_tree | node, |
const enum tree_code_class | cl, | ||
const char * | file, | ||
int | line, | ||
const char * | function | ||
) |
Similar to tree_check_failed, except that we check that a tree does not have the specified code, given in CL.
References internal_error(), tree_code_name, and trim_filename().
void tree_operand_check_failed | ( | int | idx, |
const_tree | exp, | ||
const char * | file, | ||
int | line, | ||
const char * | function | ||
) |
Similar to above, except that the check is for the bounds of the operand vector of an expression node EXP.
References internal_error(), tree_code_name, and trim_filename().
void tree_range_check_failed | ( | const_tree | node, |
const char * | file, | ||
int | line, | ||
const char * | function, | ||
enum tree_code | c1, | ||
enum tree_code | c2 | ||
) |
Similar to tree_check_failed, except that instead of specifying a dozen codes, use the knowledge that they're all sequential.
References buffer, internal_error(), strlen(), tree_code_name, and trim_filename().
void tree_set_block | ( | ) |
References line_table.
|
static |
Return true iff conversion in EXP generates no instruction. Don't consider conversions changing the signedness.
References tree_nop_conversion().
Referenced by tree_strip_sign_nop_conversions().
size_t tree_size | ( | ) |
Compute the number of bytes occupied by NODE. This routine only looks at TREE_CODE, except for those nodes that have variable sizes.
References omp_clause_num_ops, tcc_vl_exp, and tree_code_size().
Referenced by copy_node_stat(), fold_checksum_tree(), and release_ssa_name().
tree tree_strip_nop_conversions | ( | ) |
Strip conversions from EXP according to tree_nop_conversion and return the resulting expression.
References exp(), and tree_nop_conversion().
Referenced by fold_binary_loc().
tree tree_strip_sign_nop_conversions | ( | ) |
Strip conversions from EXP according to tree_sign_nop_conversion and return the resulting expression.
References exp(), and tree_sign_nop_conversion().
void tree_vec_elt_check_failed | ( | int | idx, |
int | len, | ||
const char * | file, | ||
int | line, | ||
const char * | function | ||
) |
Similar to above, except that the check is for the bounds of a TREE_VEC's (dynamically sized) vector.
References internal_error(), and trim_filename().
tree truth_type_for | ( | ) |
If TYPE is a vector type, return a signed integer vector type with the same width and number of subparts. Otherwise return boolean_type_node.
References build_opaque_vector_type(), lang_hooks_for_types::type_for_size, and lang_hooks::types.
Referenced by and_comparisons_1(), and or_comparisons_1().
|
static |
Return true if any part of the structure of TYPE involves a PLACEHOLDER_EXPR directly. This includes size, bounds, qualifiers (for QUAL_UNION_TYPE) and field positions.
References type_contains_placeholder_p().
Referenced by type_contains_placeholder_p().
bool type_contains_placeholder_p | ( | ) |
Wrapper around above function used to cache its result.
References type_contains_placeholder_1().
Referenced by fold(), fold_ternary_loc(), intra_create_variable_infos(), and type_contains_placeholder_1().
|
static |
Add an entry to the type-hash-table for a type TYPE whose hash code is HASHCODE.
References type_hash::hash, type_hash::type, type(), and type_hash_table.
Referenced by type_hash_canon().
tree type_hash_canon | ( | ) |
Given TYPE, and HASHCODE its hash code, return the canonical object for an identical type if one already exists. Otherwise, return TYPE, and record it as the canonical object. To use this function, first create a type of the sort you want. Then compute its hash code from the fields of the type that make it different from other similar types. Then call this function and use the value.
References t_kind, tree_code_counts, tree_node_counts, tree_node_sizes, type(), type_hash_add(), and type_hash_lookup().
Referenced by build_array_type_1(), build_complex_type(), build_function_type(), build_method_type_directly(), build_nonstandard_integer_type(), build_offset_type(), build_range_type_1(), build_type_attribute_qual_variant(), build_word_mode_vector_type(), and make_vector_type().
|
static |
These are the Hashtable callback functions.
Returns true iff the types are equivalent.
References attribute_list_equal(), type_hash::hash, tree_int_cst_equal(), type_hash::type, lang_hooks_for_types::type_hash_eq, type_list_equal(), and lang_hooks::types.
Referenced by init_ttree().
|
static |
Return the cached hash value.
Referenced by init_ttree().
|
static |
Hashing of types so that we don't make duplicates. The entry point is `type_hash_canon'.
Compute a hash code for a list of types (chain of TREE_LIST nodes with types in the TREE_VALUE slots), by adding the hash codes of the individual types.
Referenced by build_function_type(), build_method_type_directly(), and build_type_attribute_qual_variant().
|
static |
Look in the type hash table for a type isomorphic to TYPE. If one is found, return it. Otherwise return 0.
References type_hash::hash, layout_type(), type_hash::type, type(), and type_hash_table.
Referenced by type_hash_canon().
|
static |
See if the data pointed to by the type hash table is marked. We consider it marked if the type is marked or if a debug type number or symbol table entry has been made for the type.
References ggc_marked_p().
bool type_in_anonymous_namespace_p | ( | ) |
Return true if T is in anonymous namespace.
Referenced by analyze_functions(), get_odr_type(), hash_type_name(), and types_same_for_odr().
int type_list_equal | ( | ) |
Given two lists of types (chains of TREE_LIST nodes with types in the TREE_VALUE slots) return 1 if the lists contain the same types in the same order. Also, the TREE_PURPOSEs must match.
References simple_cst_equal().
Referenced by ehspec_hasher::equal(), and type_hash_eq().
int type_num_arguments | ( | ) |
Returns the number of arguments to the FUNCTION_TYPE or METHOD_TYPE given by TYPE. If the argument list accepts variable arguments, then this function counts only the ordinary arguments.
bool typedef_variant_p | ( | ) |
Returns true iff TYPE is a type variant created for a typedef.
References is_typedef_decl().
Referenced by gen_type_die_with_usage().
bool types_same_for_odr | ( | ) |
For languages with One Definition Rule, work out if types are same even if the tree representation differs. This is non-trivial for LTO where minnor differences in the type representation may have prevented type merging to merge two copies of otherwise equivalent type.
References decls_same_for_odr(), same_for_odr(), type_in_anonymous_namespace_p(), and types_compatible_p().
Referenced by odr_hasher::equal(), get_binfo_at_offset(), gimple_extract_devirt_binfo_from_cst(), record_binfo(), and same_for_odr().
tree uniform_vector_p | ( | ) |
Check if vector VEC consists of all the equal elements and that the number of elements corresponds to the type of VEC. The function returns first element of the vector or NULL_TREE if the vector is not uniform.
References first, and operand_equal_p().
Referenced by expand_vector_operations_1(), and fold_binary_loc().
tree unsigned_type_for | ( | ) |
If TYPE is an integral or pointer type, return an integer type with the same precision which is unsigned, or itself if TYPE is already an unsigned integer type.
References signed_or_unsigned_type_for().
Referenced by build_range_check(), chrec_convert_1(), convert_to_integer(), emit_case_bit_tests(), fold_binary_loc(), fold_negate_expr(), fold_ternary_loc(), fold_unary_loc(), generic_type_for(), get_computation_aff(), ifcombine_ifandif(), interpret_rhs_expr(), iv_period(), make_tree(), number_of_iterations_cond(), number_of_iterations_lt(), number_of_iterations_ne(), record_nonwrapping_iv(), scev_probably_wraps_p(), and vect_gen_niters_for_prolog_loop().
tree upper_bound_in_type | ( | ) |
Returns the largest value obtainable by casting something in INNER type to OUTER type.
References double_int_to_tree(), double_int::high, HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, and double_int::low.
Referenced by add_param_constraints(), adjust_range_with_scev(), derive_constant_upper_bound_ops(), determine_exit_conditions(), fold_widened_comparison(), infer_loop_bounds_from_pointer_arith(), infer_loop_bounds_from_signedness(), and scev_probably_wraps_p().
bool valid_constant_size_p | ( | ) |
Return true if SIZE represents a constant size that is in bounds of what the middle-end and the backend accepts (covering not more than half of the address-space).
References host_integerp(), and tree_int_cst_sign_bit().
Referenced by asan_protect_global(), assemble_variable(), and expand_one_var().
tree value_member | ( | ) |
Return first list element whose TREE_VALUE is ELEM. Return 0 if ELEM is not in LIST.
Referenced by assemble_external().
bool variably_modified_type_p | ( | ) |
Returns true if T is, contains, or refers to a type with variable size. For METHOD_TYPEs and FUNCTION_TYPEs we exclude the arguments, but not the return type. If FN is nonzero, only return true if a modifier of the type or position of FN is a variable or parameter inside FN. This concept is more general than that of C99 'variably modified types': in C99, a struct type is never variably modified because a VLA may not appear as a structure member. However, in GNU C code like: struct S { int i[f()]; }; is valid, and other languages may define similar constructs.
Test if T is either variable (if FN is zero) or an expression containing a variable in FN. If TYPE isn't gimplified, return true also if gimplify_one_sizepos would gimplify the expression into a local variable.
References lang_hooks::tree_inlining, and lang_hooks_for_tree_inlining::var_mod_type_p.
Referenced by check_for_nested_with_variably_modified(), create_task_copyfn(), finalize_nesting_tree_1(), fixup_child_record_type(), gen_formal_parameter_die(), gen_variable_die(), get_nonlocal_debug_decl(), gimplify_modify_expr_rhs(), note_nonlocal_block_vlas(), remap_type(), remap_vla_decls(), and tree_is_indexable().
bool vec_member | ( | ) |
Return true if ELEM is in V.
bool virtual_method_call_p | ( | ) |
TARGET is a call target of GIMPLE call statement (obtained by gimple_call_fn). Return true if it is OBJ_TYPE_REF representing an virtual call of C++ method. (As opposed to OBJ_TYPE_REF representing objc calls through a cast where middle-end devirtualization machinery can't apply.)
Referenced by cgraph_create_indirect_edge(), gimple_fold_call(), and ipa_analyze_call_uses().
tree walk_tree_1 | ( | tree * | tp, |
walk_tree_fn | func, | ||
void * | data, | ||
struct pointer_set_t * | pset, | ||
walk_tree_lh | lh | ||
) |
Apply FUNC to all the sub-trees of TP in a pre-order traversal. FUNC is called with the DATA and the address of each sub-tree. If FUNC returns a non-NULL value, the traversal is stopped, and the value returned by FUNC is returned. If PSET is non-NULL it is used to record the nodes visited, and to avoid visiting a node more than once.
References HOST_WIDE_INT, len, OMP_CLAUSE__SIMDUID_, OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_COPYIN, OMP_CLAUSE_COPYPRIVATE, OMP_CLAUSE_DEFAULT, OMP_CLAUSE_FINAL, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_IF, OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_LINEAR, OMP_CLAUSE_MERGEABLE, OMP_CLAUSE_NOWAIT, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_ORDERED, OMP_CLAUSE_PRIVATE, OMP_CLAUSE_REDUCTION, OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_SHARED, OMP_CLAUSE_UNIFORM, OMP_CLAUSE_UNTIED, pointer_set_insert(), tsi_end_p(), tsi_next(), tsi_start(), tsi_stmt_ptr(), constructor_elt_d::value, vec_safe_iterate(), and walk_type_fields().
Referenced by walk_tree_without_duplicates_1().
tree walk_tree_without_duplicates_1 | ( | tree * | tp, |
walk_tree_fn | func, | ||
void * | data, | ||
walk_tree_lh | lh | ||
) |
Like walk_tree, but does not walk duplicate nodes more than once.
References pointer_set_create(), pointer_set_destroy(), and walk_tree_1().
|
static |
This is a subroutine of walk_tree that walks field of TYPE that are to be walked whenever a type is seen in the tree. Rest of operands and return value are as for walk_tree.
Referenced by walk_tree_1().
void warn_deprecated_use | ( | ) |
Warn about a use of an identifier which was marked deprecated.
References expand_location(), lookup_attribute(), and warning().
HOST_WIDEST_INT widest_int_cst_value | ( | ) |
Return value of a constant X and sign-extend it.
References HOST_BITS_PER_WIDE_INT, HOST_BITS_PER_WIDEST_INT, and HOST_WIDEST_INT.
Referenced by find_bswap_1().
A vector of all translation-units.
Referenced by gen_compile_unit_die(), and unpack_ts_translation_unit_decl_value_fields().
|
static |
Hash table for optimization flags and target option flags. Use the same hash table for both sets of options. Nodes for building the current optimization and target option nodes. The assumption is most of the time the options created will already be in the hash table, so we avoid allocating and freeing up a node repeatably.
Referenced by build_optimization_node(), and init_ttree().
|
static |
Referenced by build_optimization_node(), build_target_option_node(), and init_ttree().
|
static |
Referenced by build_target_option_node(), and init_ttree().
|
static |
Referenced by decl_debug_args_insert(), and decl_debug_args_lookup().
|
static |
General tree->tree mapping structure for use in hash tables.
Referenced by decl_debug_expr_insert(), decl_debug_expr_lookup(), init_ttree(), and print_debug_expr_statistics().
|
static |
Referenced by lhd_gcc_personality().
|
static |
Referenced by build_int_cst_wide(), cache_integer_cst(), and init_ttree().
|
static |
Hash table and temporary node for larger integer const values.
Referenced by build_int_cst_wide(), and init_ttree().
|
static |
Unique id for next debug decl created. Use negative numbers, to catch erroneous uses.
Referenced by copy_node_stat(), and make_node_stat().
|
static |
Unique id for next decl created.
Referenced by allocate_decl_uid().
|
static |
Unique id for next type created.
Referenced by copy_node_stat(), and make_node_stat().
|
static |
Referenced by build_nonstandard_integer_type().
const char* const omp_clause_code_name[] |
Referenced by dequeue_and_dump(), and print_node().
const char* const tree_code_class_strings[] |
Each tree code class has an associated string representation. These must correspond to the tree_code_class entries.
|
static |
Statistics-gathering stuff.
Referenced by dump_tree_statistics(), record_node_allocation_statistics(), and type_hash_canon().
const unsigned char tree_code_length[] |
Number of argument-words in each kind of tree-node.
const char* const tree_code_name[] |
Names of tree components.
Referenced by dequeue_and_dump(), DFS_write_tree(), do_niy(), dump_asserts_for(), dump_binary_rhs(), dump_generic_node(), dump_gimple_assign(), dump_gimple_cond(), dump_gimple_omp_for(), dump_ternary_rhs(), dump_tree_statistics(), dump_unary_rhs(), gimple_check_failed(), ipa_print_node_jump_functions_for_edge(), lto_tag_name(), lto_write_tree(), omp_clause_check_failed(), print_expr_hash_elt(), print_lto_report(), print_node(), print_node_brief(), print_pre_expr(), tree_check_failed(), tree_class_check_failed(), tree_contains_struct_check_failed(), tree_not_check_failed(), tree_not_class_check_failed(), tree_operand_check_failed(), tree_range_check_failed(), and vect_create_data_ref_ptr().
enum tree_code_class tree_code_type[] |
int tree_node_counts[(int) all_kinds] |
Referenced by dump_tree_statistics(), record_node_allocation_statistics(), and type_hash_canon().
|
static |
Keep in sync with tree.h:enum tree_node_kind.
Referenced by dump_tree_statistics().
int tree_node_sizes[(int) all_kinds] |
Referenced by dump_tree_statistics(), record_node_allocation_statistics(), and type_hash_canon().
|
static |
|
static |
Now here is the hash table. When recording a type, it is added to the slot whose index is the hash code. Note that the hash table is used for several kinds of types (function types, array types and array index range types, for now). While all these live in the same table, they are completely independent, and the hash code is computed differently for each of these.
Referenced by init_ttree(), print_type_hash_statistics(), type_hash_add(), and type_hash_lookup().
|
static |
Referenced by decl_value_expr_insert(), decl_value_expr_lookup(), init_ttree(), and print_value_expr_statistics().