GCC Middle and Back End API Reference
|
Go to the source code of this file.
Enumerations | |
enum | { OST_SUBOBJECT = 1 , OST_MINIMUM = 2 , OST_DYNAMIC = 4 , OST_END = 8 } |
Functions | |
void | init_object_sizes (void) |
void | fini_object_sizes (void) |
bool | compute_builtin_object_size (tree, int, tree *) |
tree | decl_init_size (tree, bool) |
anonymous enum |
Declarations for tree-object-size.cc. Copyright (C) 2013-2024 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
Bits in object_size_type.
Enumerator | |
---|---|
OST_SUBOBJECT | |
OST_MINIMUM | |
OST_DYNAMIC | |
OST_END |
Compute __builtin_object_size value for PTR and set *PSIZE to the resulting value. If the declared object is known and PDECL is nonnull, sets *PDECL to the object's DECL. OBJECT_SIZE_TYPE is the second argument to __builtin_object_size. Returns true on success and false when the object size could not be determined.
References addr_object_size(), BITMAP_ALLOC, bitmap_bit_p, bitmap_clear(), bitmap_copy(), bitmap_empty_p(), BITMAP_FREE, bitmap_set_bit, object_size_info::changed, check_for_plus_in_loops(), collect_object_sizes_for(), compare_tree_int(), compute_builtin_object_size(), computed, object_size_info::depths, dump_file, dump_flags, EXECUTE_IF_SET_IN_BITMAP, free(), gcc_assert, gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), gimplify_size_expressions(), i, init_offset_limit(), NULL, num_ssa_names, object_size_info::object_size_type, object_sizes_get(), object_sizes_grow(), object_sizes_unknown_p(), offset, offset_limit, OST_DYNAMIC, OST_END, OST_MINIMUM, OST_SUBOBJECT, object_size_info::pass, POINTER_TYPE_P, print_generic_expr(), object_size_info::reexamine, size_for_offset(), size_unknown(), size_unknown_p(), ssa_name, SSA_NAME_DEF_STMT, SSA_NAME_VERSION, object_size_info::stack, TDF_DETAILS, object_size_info::tos, TREE_CODE, tree_fits_shwi_p(), TREE_TYPE, and object_size_info::visited.
Referenced by addr_object_size(), compute_builtin_object_size(), early_object_sizes_execute_one(), fold_builtin_object_size(), gimple_fold_builtin_strncat(), instrument_object_size(), and strdup_object_size().
Returns the size of the object designated by DECL considering its initializer if it either has one or if it would not affect its size, otherwise the size of the object without the initializer when MIN is true, else null. An object's initializer affects the object's size if it's a struct type with a flexible array member.
References build3(), byte_position(), component_ref_size(), DECL_SIZE_UNIT, fold_build2, last, last_field(), NULL_TREE, TREE_CODE, TREE_TYPE, TYPE_SIZE, and TYPE_SIZE_UNIT.
Referenced by addr_object_size(), and handle_decl().
|
extern |
Destroy data structures after the object size computation.
References BITMAP_FREE, computed, object_size_info::object_size_type, object_sizes_release(), and OST_END.
Referenced by object_sizes_execute().
|
extern |
Initialize data structures for the object size computation.
References BITMAP_ALLOC, computed, init_offset_limit(), NULL, object_size_info::object_size_type, object_sizes_grow(), and OST_END.
Referenced by object_sizes_execute().