#include "config.h"#include "system.h"#include "coretypes.h"#include "tm.h"#include "tree.h"#include "diagnostic.h"#include "tree-flow.h"#include "tree-pass.h"#include "tree-ssa-propagate.h"

Go to the source code of this file.
| static unsigned HOST_WIDE_INT addr_object_size | ( | tree | ptr, | |
| int | object_size_type | |||
| ) | [static] |
Definition at line 154 of file tree-object-size.c.
References bytes, compute_object_offset(), error_mark_node, gcc_assert, get_base_address(), host_integerp(), HOST_WIDE_INT, offset_limit, REFERENCE_CLASS_P, size_binop(), size_zero_node, SSA_VAR_P, TREE_CODE, tree_int_cst_lt(), tree_low_cst(), TREE_OPERAND, TREE_TYPE, TYPE_SIZE_UNIT, and unknown.
Referenced by compute_builtin_object_size(), and expr_object_size().
| static unsigned HOST_WIDE_INT alloc_object_size | ( | tree | call, | |
| int | object_size_type | |||
| ) | [static] |
Definition at line 228 of file tree-object-size.c.
References a, BUILT_IN_NORMAL, bytes, callee, DECL_BUILT_IN_CLASS, DECL_FUNCTION_CODE, fold_convert(), gcc_assert, get_callee_fndecl(), host_integerp(), NULL_TREE, size_binop(), sizetype, TREE_CHAIN, TREE_CODE, tree_low_cst(), TREE_OPERAND, TREE_VALUE, and unknown.
Referenced by compute_builtin_object_size(), and expr_object_size().
| static void check_for_plus_in_loops | ( | struct object_size_info * | osi, | |
| tree | var | |||
| ) | [static] |
Definition at line 888 of file tree-object-size.c.
References check_for_plus_in_loops_1(), object_size_info::depths, gcc_assert, integer_zerop(), pass_through_call(), SSA_NAME, SSA_NAME_DEF_STMT, SSA_NAME_VERSION, STRIP_NOPS, object_size_info::tos, TREE_CODE, and TREE_OPERAND.
Referenced by compute_builtin_object_size().
| static void check_for_plus_in_loops_1 | ( | struct object_size_info * | osi, | |
| tree | var, | |||
| unsigned int | depth | |||
| ) | [static] |
Definition at line 783 of file tree-object-size.c.
References bitmap_bit_p(), bitmap_clear_bit(), bitmap_set_bit(), computed, object_size_info::depths, gcc_assert, gcc_unreachable, i, integer_zerop(), object_size_info::object_size_type, object_sizes, pass_through_call(), PHI_ARG_DEF, PHI_NUM_ARGS, object_size_info::reexamine, sp, SSA_NAME, SSA_NAME_DEF_STMT, SSA_NAME_VERSION, object_size_info::stack, STRIP_NOPS, object_size_info::tos, TREE_CODE, and TREE_OPERAND.
Referenced by check_for_plus_in_loops().
| static void collect_object_sizes_for | ( | struct object_size_info * | osi, | |
| tree | var | |||
| ) | [static] |
Definition at line 645 of file tree-object-size.c.
References bitmap_bit_p(), bitmap_clear_bit(), bitmap_set_bit(), computed, DECL_INITIAL, dump_file, dump_flags, expr_object_size(), fprintf(), gcc_assert, gcc_unreachable, i, IS_EMPTY_STMT, merge_object_sizes(), object_size_info::object_size_type, object_sizes, object_size_info::pass, pass_through_call(), PHI_ARG_DEF, PHI_NUM_ARGS, plus_expr_object_size(), POINTER_TYPE_P, print_generic_expr(), object_size_info::reexamine, SSA_NAME, SSA_NAME_DEF_STMT, SSA_NAME_VAR, SSA_NAME_VERSION, STRIP_NOPS, TDF_DETAILS, TREE_CODE, TREE_OPERAND, TREE_TYPE, unknown, and object_size_info::visited.
Referenced by compute_builtin_object_size(), and merge_object_sizes().
| unsigned HOST_WIDE_INT compute_builtin_object_size | ( | tree | ptr, | |
| int | object_size_type | |||
| ) |
Definition at line 322 of file tree-object-size.c.
References addr_object_size(), alloc_object_size(), BITMAP_ALLOC, bitmap_bit_p(), bitmap_copy(), bitmap_empty_p, BITMAP_FREE, bitmap_set_bit(), object_size_info::changed, check_for_plus_in_loops(), collect_object_sizes_for(), compute_builtin_object_size(), computed, object_size_info::depths, dump_file, dump_flags, EXECUTE_IF_SET_IN_BITMAP, fprintf(), free(), gcc_assert, HOST_WIDE_INT_PRINT_UNSIGNED, i, init_offset_limit(), NULL, num_ssa_names, object_size_info::object_size_type, object_sizes, offset_limit, object_size_info::pass, pass_through_call(), POINTER_TYPE_P, print_generic_expr(), object_size_info::reexamine, SSA_NAME, ssa_name, SSA_NAME_VERSION, object_size_info::stack, TDF_DETAILS, object_size_info::tos, TREE_CODE, TREE_TYPE, unknown, object_size_info::visited, XCNEWVEC, and XNEWVEC.
Referenced by compute_builtin_object_size(), fold_builtin_object_size(), and plus_expr_object_size().
Definition at line 90 of file tree-object-size.c.
References base, BITS_PER_UNIT, DECL_FIELD_BIT_OFFSET, DECL_FIELD_OFFSET, error_mark_node, fold_build1, fold_convert(), size_binop(), size_int, size_zero_node, sizetype, TREE_CODE, tree_int_cst_sgn(), tree_low_cst(), TREE_OPERAND, TREE_TYPE, and TYPE_SIZE_UNIT.
Referenced by addr_object_size().
| static unsigned int compute_object_sizes | ( | void | ) | [static] |
Definition at line 986 of file tree-object-size.c.
References bsi_end_p(), bsi_next(), bsi_start(), bsi_stmt_ptr(), BUILT_IN_NORMAL, call(), callee, DECL_BUILT_IN_CLASS, DECL_FUNCTION_CODE, dump_file, dump_flags, fini_object_sizes(), fold_builtin(), fold_convert(), FOR_EACH_BB, fprintf(), gcc_unreachable, get_callee_fndecl(), get_rhs(), host_integerp(), HOST_WIDE_INT, i, init_object_sizes(), integer_minus_one_node, NULL, object_size_info::object_size_type, POINTER_TYPE_P, print_generic_stmt(), result, set_rhs(), size_type_node, size_zero_node, TDF_DETAILS, TREE_CHAIN, TREE_CODE, tree_low_cst(), TREE_OPERAND, TREE_TYPE, TREE_VALUE, and update_stmt().
| static void expr_object_size | ( | struct object_size_info * | osi, | |
| tree | ptr, | |||
| tree | value | |||
| ) | [static] |
Definition at line 467 of file tree-object-size.c.
References addr_object_size(), alloc_object_size(), bytes, gcc_assert, HOST_WIDE_INT, object_size_info::object_size_type, object_sizes, object_size_info::pass, POINTER_TYPE_P, SSA_NAME, SSA_NAME_VERSION, TREE_CODE, TREE_OPERAND, TREE_TYPE, and unknown.
Referenced by collect_object_sizes_for().
Definition at line 970 of file tree-object-size.c.
References BITMAP_FREE, computed, free(), NULL, object_size_info::object_size_type, and object_sizes.
Referenced by compute_object_sizes().
Definition at line 950 of file tree-object-size.c.
References BITMAP_ALLOC, computed, HOST_WIDE_INT, init_offset_limit(), NULL, num_ssa_names, object_size_info::object_size_type, object_sizes, and XNEWVEC.
Referenced by compute_object_sizes().
Definition at line 76 of file tree-object-size.c.
References host_integerp(), offset_limit, sizetype, tree_low_cst(), and TYPE_MAX_VALUE.
Referenced by compute_builtin_object_size(), and init_object_sizes().
| static bool merge_object_sizes | ( | struct object_size_info * | osi, | |
| tree | dest, | |||
| tree | orig, | |||
| unsigned HOST_WIDE_INT | offset | |||
| ) | [static] |
Definition at line 508 of file tree-object-size.c.
References bitmap_bit_p(), object_size_info::changed, collect_object_sizes_for(), HOST_WIDE_INT, object_size_info::object_size_type, object_sizes, offset_limit, object_size_info::pass, object_size_info::reexamine, SSA_NAME_VERSION, and unknown.
Referenced by collect_object_sizes_for(), and plus_expr_object_size().
Definition at line 284 of file tree-object-size.c.
References BUILT_IN_NORMAL, callee, DECL_BUILT_IN_CLASS, DECL_FUNCTION_CODE, get_callee_fndecl(), NULL_TREE, TREE_OPERAND, and TREE_VALUE.
Referenced by check_for_plus_in_loops(), check_for_plus_in_loops_1(), collect_object_sizes_for(), and compute_builtin_object_size().
| static bool plus_expr_object_size | ( | struct object_size_info * | osi, | |
| tree | var, | |||
| tree | value | |||
| ) | [static] |
Definition at line 556 of file tree-object-size.c.
References bytes, compute_builtin_object_size(), gcc_assert, host_integerp(), HOST_WIDE_INT, merge_object_sizes(), object_size_info::object_size_type, object_sizes, offset_limit, POINTER_TYPE_P, SSA_NAME, SSA_NAME_VERSION, TREE_CODE, tree_low_cst(), TREE_OPERAND, TREE_TYPE, and unknown.
Referenced by collect_object_sizes_for().
Definition at line 68 of file tree-object-size.c.
Referenced by check_for_plus_in_loops_1(), collect_object_sizes_for(), compute_builtin_object_size(), CG_LOOP::Determine_SWP_Unroll_Factor(), fini_object_sizes(), and init_object_sizes().
unsigned HOST_WIDE_INT* object_sizes[4] [static] |
Definition at line 65 of file tree-object-size.c.
Referenced by check_for_plus_in_loops_1(), collect_object_sizes_for(), compute_builtin_object_size(), expr_object_size(), fini_object_sizes(), init_object_sizes(), merge_object_sizes(), and plus_expr_object_size().
unsigned HOST_WIDE_INT offset_limit [static] |
Definition at line 71 of file tree-object-size.c.
Referenced by addr_object_size(), compute_builtin_object_size(), init_offset_limit(), merge_object_sizes(), and plus_expr_object_size().
Initial value:
{
"objsz",
NULL,
compute_object_sizes,
NULL,
NULL,
0,
0,
PROP_cfg | PROP_ssa | PROP_alias,
0,
0,
0,
TODO_dump_func | TODO_verify_ssa,
0
}
Definition at line 1060 of file tree-object-size.c.
Referenced by init_optimization_passes().
unsigned HOST_WIDE_INT unknown[4] = { -1, -1, 0, 0 } [static] |
Definition at line 42 of file tree-object-size.c.
1.5.6