#include "config.h"#include "system.h"#include "toplev.h"#include "tree.h"#include "tree-inline.h"#include "rtl.h"#include "expr.h"#include "flags.h"#include "params.h"#include "input.h"#include "insn-config.h"#include "integrate.h"#include "varray.h"#include "hashtab.h"#include "splay-tree.h"#include "langhooks.h"#include "c-common.h"

Go to the source code of this file.
| #define INSNS_PER_STMT (10) |
| #define WALK_SUBTREE | ( | NODE | ) |
| #define WALK_SUBTREE_TAIL | ( | NODE | ) |
| static tree copy_body | ( | inline_data * | id | ) | [static] |
Definition at line 592 of file tree-inline.c.
References copy_body_r(), DECL_SAVED_TREE, NULL, VARRAY_TOP_TREE, and walk_tree().
Referenced by clone_body(), expand_call_inline(), save_body(), and tree_function_versioning().
Definition at line 421 of file tree-inline.c.
References abort, BLOCK, build(), build1, build_stmt(), copy_node, copy_scope_stmt(), copy_tree_r(), DECL_CONTEXT, DECL_EXTERNAL, inline_data::decl_map, DECL_NAMESPACE_SCOPE_P, inline_data::fns, GOTO_FAKE_P, inline_data::in_target_cleanup_p, n, new_block, nonstatic_local_decl_p(), NULL, NULL_TREE, remap_block(), remap_decl(), remap_save_expr(), inline_data::ret_label, RETURN_STMT_EXPR, splay_tree_insert(), splay_tree_lookup(), STMT_IS_FULL_EXPR_P, STRIP_TYPE_NOPS, TREE_CHAIN, TREE_CODE, TREE_CONSTANT, TREE_OPERAND, TREE_READONLY_DECL_P, TREE_SIDE_EFFECTS, TREE_STATIC, splay_tree_node_s::value, VARRAY_TOP_TREE, VARRAY_TREE, and void_type_node.
Referenced by copy_bb(), copy_body(), copy_body_r(), copy_generic_body(), fixup_remapped_decl(), remap_decl(), remap_type(), and remap_type_1().
| static void copy_scope_stmt | ( | tree * | tp, | |
| int * | walk_subtrees, | |||
| inline_data * | id | |||
| ) | [static] |
Definition at line 396 of file tree-inline.c.
References copy_tree_r(), NULL, NULL_TREE, remap_block(), and SCOPE_STMT_BLOCK.
Referenced by copy_body_r().
Definition at line 1819 of file tree-inline.c.
References copy_node, IS_EXPR_CODE_CLASS, NULL_TREE, SCOPE_STMT_BLOCK, statement_code_p, TREE_CHAIN, TREE_CODE, TREE_CODE_CLASS, and variably_modified_type_p().
Referenced by bot_manip(), copy_bind_expr(), copy_body_r(), copy_scope_stmt(), cp_unsave_r(), mostly_copy_tree_r(), and unsave_r().
| static tree declare_return_variable | ( | struct inline_data * | id, | |
| tree * | use_stmt | |||
| ) | [static] |
Definition at line 805 of file tree-inline.c.
References build1, build_stmt(), DECL_IGNORED_P, DECL_RESULT, NULL_TREE, result, splay_tree_insert(), TREE_ADDRESSABLE, TREE_TYPE, VARRAY_TOP_TREE, VARRAY_TREE, and VOID_TYPE_P.
Referenced by expand_call_inline().
Definition at line 1076 of file tree-inline.c.
References abort, add_stmt_to_compound(), BLOCK, BLOCK_ABSTRACT_ORIGIN, BLOCK_EXPR_BODY, BLOCK_VARS, build(), build1, build_decl, build_expr_wfl(), build_stmt(), chainon(), COMPOUND_BODY, copy_body(), DECL_ABSTRACT_ORIGIN, DECL_ARGUMENTS, DECL_CONTEXT, DECL_IN_SYSTEM_HEADER, DECL_INITIAL, DECL_INLINE, DECL_INLINED_FNS, inline_data::decl_map, DECL_NUM_STMTS, DECL_ORIGIN, DECL_SAVED_TREE, DECL_SOURCE_FILE, DECL_SOURCE_LINE, DECL_SOURCE_LINE_FIRST, declare_return_variable(), DID_INLINE_FUNC, expand_calls_inline(), EXPR_WFL_EMIT_LINE_NOTE, EXPR_WFL_FILENAME, EXPR_WFL_LINENO, EXPR_WFL_NODE, inline_data::first_inlined_fn, first_rtl_op(), inline_data::fns, get_callee_fndecl(), i, initialize_inlined_parameters(), inlinable_function_p(), inline_data::inlined_fns, len, make_node, next, NULL, NULL_TREE, pop_srcloc(), push_srcloc(), remap_block(), inline_data::ret_label, SCOPE_BEGIN_P, SCOPE_NO_CLEANUPS_P, SCOPE_STMT_BLOCK, splay_tree_compare_pointers(), splay_tree_delete(), splay_tree_new(), STMT_EXPR_NO_SCOPE, STMT_EXPR_STMT, inline_data::target_exprs, TREE_CHAIN, TREE_CODE, TREE_OPERAND, inline_data::tree_pruner, TREE_SIDE_EFFECTS, TREE_TYPE, TREE_USED, TYPE_P, VARRAY_ACTIVE_SIZE, VARRAY_POP, VARRAY_PUSH_TREE, VARRAY_TREE, void_type_node, walk_tree(), warn_inline, and warning.
Referenced by expand_call_inline(), expand_calls_inline(), and gimple_expand_calls_inline().
| static void expand_calls_inline | ( | tree * | tp, | |
| inline_data * | id | |||
| ) | [static] |
Definition at line 1430 of file tree-inline.c.
References expand_call_inline(), inline_data::tree_pruner, and walk_tree().
Referenced by expand_call_inline(), expand_calls_inline(), and optimize_inline_calls().
Definition at line 901 of file tree-inline.c.
References find_alloca_call_1(), NULL, and walk_tree_without_duplicates().
Referenced by inlinable_function_p().
Definition at line 889 of file tree-inline.c.
References alloca_call_p(), and NULL.
Referenced by find_alloca_call().
Definition at line 927 of file tree-inline.c.
References find_builtin_longjmp_call_1(), NULL, and walk_tree_without_duplicates().
Referenced by inlinable_function_p().
Definition at line 908 of file tree-inline.c.
References BUILT_IN_NORMAL, DECL_BUILT_IN_CLASS, DECL_FUNCTION_CODE, exp, NULL, TREE_CODE, and TREE_OPERAND.
Referenced by find_builtin_longjmp_call().
| static tree initialize_inlined_parameters | ( | inline_data * | id, | |
| tree | args, | |||
| tree | fn | |||
| ) | [static] |
Definition at line 608 of file tree-inline.c.
References a, abort, add_stmt_to_compound(), BLOCK_VARS, build(), build1, build_stmt(), cleanup(), copy_decl_for_inlining(), DECL_ARGUMENTS, decl_constant_value(), DECL_INITIAL, DECL_P, fold(), nreverse(), NULL_TREE, p, POINTER_TYPE_P, splay_tree_insert(), TREE_ADDRESSABLE, TREE_CHAIN, TREE_CONSTANT, TREE_READONLY, TREE_READONLY_DECL_P, TREE_SIDE_EFFECTS, TREE_TYPE, TREE_VALUE, TYPE_NEEDS_CONSTRUCTING, VARRAY_TREE, and vars.
Referenced by expand_call_inline().
| static int inlinable_function_p | ( | tree | fn, | |
| inline_data * | id | |||
| ) | [static] |
Definition at line 938 of file tree-inline.c.
References DECL_ATTRIBUTES, DECL_INLINE, DECL_INLINED_FNS, DECL_NUM_STMTS, DECL_SAVED_TREE, DECL_UNINLINABLE, DID_INLINE_FUNC, find_alloca_call(), find_builtin_longjmp_call(), flag_inline_trees, inline_data::fns, i, inlinable, INSNS_PER_STMT, lookup_attribute(), MAX_INLINE_INSNS, MAX_INLINE_INSNS_AUTO, MAX_INLINE_INSNS_SINGLE, MAX_INLINE_SLOPE, METHOD_SYNCHRONIZED, MIN_INLINE_INSNS, NULL, TREE_VEC_ELT, TREE_VEC_LENGTH, VARRAY_ACTIVE_SIZE, and VARRAY_TREE.
Referenced by expand_call_inline(), and tree_inlinable_function_p().
Definition at line 1446 of file tree-inline.c.
Referenced by c_expand_body(), cgraph_decide_inlining_incrementally(), optimize_function(), and tree_rest_of_compilation().
| static void copy_scope_stmt PARAMS | ( | (tree *, int *, inline_data *) | ) | [static] |
| static void remap_block PARAMS | ( | (tree, tree, inline_data *) | ) | [static] |
| static tree initialize_inlined_parameters PARAMS | ( | (inline_data *, tree, tree) | ) | [static] |
| static int inlinable_function_p PARAMS | ( | (tree, inline_data *) | ) | [static] |
| static void expand_calls_inline PARAMS | ( | (tree *, inline_data *) | ) | [static] |
| static tree copy_body PARAMS | ( | (inline_data *) | ) | [static] |
| static tree declare_return_variable PARAMS | ( | (inline_data *, tree *) | ) | [static] |
| static void remap_block | ( | tree | scope_stmt, | |
| tree | decls, | |||
| inline_data * | id | |||
| ) | [static] |
Definition at line 228 of file tree-inline.c.
References abort, BLOCK, BLOCK_ABSTRACT_ORIGIN, BLOCK_CHAIN, BLOCK_SUBBLOCKS, BLOCK_VARS, inline_data::cloning_p, current_function_decl, DECL_ABSTRACT_ORIGIN, DECL_INITIAL, inline_data::decl_map, DECL_P, DECL_SAVED_TREE, inline_data::fns, inline_data::in_target_cleanup_p, LOCAL_CLASS_INITIALIZATION_FLAG_P, make_node, n, new_block, nreverse(), NULL, NULL_TREE, remap_decl(), SCOPE_BEGIN_P, SCOPE_END_P, SCOPE_STMT_BLOCK, splay_tree_insert(), splay_tree_lookup(), TREE_CHAIN, TREE_SIDE_EFFECTS, TREE_TYPE, TREE_USED, splay_tree_node_s::value, and VARRAY_TREE.
Referenced by copy_bind_expr(), copy_body_r(), copy_scope_stmt(), expand_call_inline(), and remap_blocks().
| static tree remap_decl | ( | tree | decl, | |
| inline_data * | id | |||
| ) | [static] |
Definition at line 143 of file tree-inline.c.
References abort, copy_body_r(), copy_decl_for_inlining(), copy_node, DECL_ANON_UNION_ELEMS, inline_data::decl_map, DECL_NAME, DECL_TOO_LATE, inline_data::fns, member(), members, n, nreverse(), NULL, NULL_TREE, splay_tree_insert(), splay_tree_lookup(), src, TREE_CHAIN, TREE_CODE, tree_cons, TREE_PURPOSE, TREE_TYPE, TREE_VALUE, TYPE_DOMAIN, TYPE_MAX_VALUE, splay_tree_node_s::value, VARRAY_TOP_TREE, VARRAY_TREE, and walk_tree().
Referenced by copy_arguments_for_versioning(), copy_body_r(), copy_static_chain(), expand_call_inline(), fixup_remapped_decl(), remap_block(), remap_decl(), remap_decl_1(), remap_decls(), remap_type(), remap_type_1(), scan_omp_1(), and tree_function_versioning().
Definition at line 1872 of file tree-inline.c.
References copy_node, error_mark_node, n, NULL_RTX, SAVE_EXPR_CONTEXT, SAVE_EXPR_RTL, splay_tree_insert(), splay_tree_lookup(), and splay_tree_node_s::value.
Referenced by copy_body_r(), cp_unsave_r(), and unsave_r().
| int tree_inlinable_function_p | ( | tree | fn | ) |
Definition at line 881 of file tree-inline.c.
Referenced by c_expand_body(), cgraph_analyze_function(), and tree_versionable_function_p().
| tree walk_tree | ( | tree * | tp, | |
| walk_tree_fn | func, | |||
| void * | data, | |||
| void * | htab_ | |||
| ) |
Definition at line 1535 of file tree-inline.c.
References abort, BLOCK, COMPLEX_TYPE, CONSTRUCTOR_ELTS, DECL_INITIAL, DECL_P, DECL_SIZE, DECL_SIZE_UNIT, DECL_STMT_DECL, first_rtl_op(), htab_find_slot(), i, INSERT, IS_EXPR_CODE_CLASS, len, lineno, NULL_TREE, result, statement_code_p, STMT_LINENO, STMT_LINENO_FOR_FN_P, TREE_CHAIN, TREE_CODE, TREE_CODE_CLASS, TREE_IMAGPART, TREE_OPERAND, TREE_REALPART, TREE_TYPE, TREE_VALUE, TREE_VEC_ELT, TREE_VEC_LENGTH, TYPE_ARG_TYPES, TYPE_DOMAIN, TYPE_MAX_VALUE, TYPE_METHOD_BASETYPE, TYPE_MIN_VALUE, TYPE_OFFSET_BASETYPE, TYPE_SIZE, TYPE_SIZE_UNIT, variably_modified_type_p(), WALK_SUBTREE, and WALK_SUBTREE_TAIL.
Referenced by add_candidate_1(), add_referenced_var(), analyze_function(), analyze_variable(), break_out_target_exprs(), browse_tree(), c_expand_body(), cgraph_create_edges(), cgraph_varpool_analyze_pending_decls(), collect_dfa_stats(), computation_cost(), contains_label_p(), convert_local_reference(), convert_nonlocal_reference(), convert_tramp_reference(), copy_bb(), copy_body(), copy_body_r(), copy_generic_body(), copy_if_shared_r(), count_uses_and_derefs(), cp_genericize(), cxx_unsave_expr_now(), determine_use_iv_cost_condition(), diagnose_sb_1(), diagnose_sb_2(), discover_nonconstant_array_refs(), estimate_num_insns(), execute_early_warn_uninitialized(), execute_optimize_stdarg(), expand_call_inline(), expand_calls_inline(), finalize_nrv(), find_new_referenced_vars(), find_referenced_vars(), find_single_pointer_decl(), fixup_remapped_decl(), fold_stmt(), fold_stmt_inplace(), fold_stmt_r(), for_each_template_parm(), force_var_cost(), gimplify_body(), gimplify_decl_expr(), gimplify_init_constructor(), gimplify_init_ctor_preeval(), instantiate_decls(), instantiate_decls_1(), mark_all_vars_used(), memory_address_same(), move_block_to_fn(), move_stmt_r(), record_call_1(), remap_decl(), remap_type(), remap_type_1(), scalarize_ldst(), scan_for_refs(), scan_for_static_refs(), scan_function(), split_address_cost(), sra_walk_expr(), TB_update_up(), tree_nrv(), tree_overlaps_hard_reg_set(), unsave_expr_now(), unshare_all_trees(), unshare_body(), unshare_expr(), unvisit_body(), verify_stmt(), verify_stmt_tree(), verify_stmts(), walk_stmts(), and walk_tree_without_duplicates().
| tree walk_tree_without_duplicates | ( | tree * | tp, | |
| walk_tree_fn | func, | |||
| void * | data | |||
| ) |
Definition at line 1802 of file tree-inline.c.
Referenced by build_throw(), c_cannot_inline_tree_fn(), c_expand_body(), c_expand_deferred_function(), calls_setjmp_p(), check_default_argument(), count_trees(), create_structure_vars(), create_variable_info_for(), debug_find_tree(), estimate_num_insns(), expand_body(), expand_or_defer_fn(), expand_pending_sizes(), find_alloca_call(), find_builtin_longjmp_call(), find_tree(), finish_function(), genrtl_finish_function(), gimplify_parameters(), inline_forbidden_p(), mf_xform_decls(), no_linkage_check(), tree_lowering_passes(), tree_rest_of_compilation(), type_visibility(), unsave_expr_now(), verify_cgraph_node(), and walk_type_fields().
| int flag_inline_trees = 0 |
Definition at line 57 of file tree-inline.c.
Referenced by c_common_post_options(), c_expand_body(), cgraph_gate_early_inlining(), cgraph_gate_inlining(), cgraph_optimize(), cxx_init_decl_processing(), expand_body(), genrtl_finish_function(), grokdeclarator(), grokfndecl(), inlinable_function_p(), instantiate_decl(), optimize_function(), and tree_rest_of_compilation().
1.5.6