#include "config.h"#include "system.h"#include "coretypes.h"#include "tm.h"#include "tree.h"#include "rtl.h"#include "tm_p.h"#include "flags.h"#include "function.h"#include "expr.h"#include "toplev.h"#include "ggc.h"#include "target.h"#include "langhooks.h"#include "regs.h"#include "params.h"#include "gt-stor-layout.h"

Go to the source code of this file.
| #define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (DImode) |
Definition at line 169 of file stor-layout.c.
Definition at line 544 of file stor-layout.c.
References bitsize_unit_node, bitsizetype, fold_convert(), and size_binop().
Definition at line 553 of file stor-layout.c.
References bitsize_unit_node, fold_convert(), size_binop(), and sizetype.
Definition at line 1258 of file stor-layout.c.
References BIGGEST_ALIGNMENT, bit_position(), DECL_MODE, DECL_SIZE, GET_MODE_ALIGNMENT, GET_MODE_SIZE, host_integerp(), integer_zerop(), MEMBER_TYPE_FORCES_BLK, mode, mode_for_size_tree(), MODE_INT, simple_cst_equal(), STRICT_ALIGNMENT, TREE_CHAIN, TREE_CODE, TREE_TYPE, TYPE_ALIGN, TYPE_FIELDS, TYPE_MODE, TYPE_NO_FORCE_BLK, and TYPE_SIZE.
| void debug_rli | ( | record_layout_info | rli | ) |
Definition at line 678 of file stor-layout.c.
Definition at line 275 of file stor-layout.c.
References DECL_ALIGN, DECL_USER_ALIGN, TREE_CODE, TYPE_ALIGN, and TYPE_USER_ALIGN.
Referenced by layout_decl().
| static void finalize_record_size | ( | record_layout_info | rli | ) | [static] |
Definition at line 1176 of file stor-layout.c.
References record_layout_info_s::bitpos, BITS_PER_UNIT, DECL_NAME, IDENTIFIER_POINTER, integer_zerop(), MAX, normalize_rli(), record_layout_info_s::offset_align, record_layout_info_s::packed_maybe_necessary, record_layout_info_s::record_align, rli_size_so_far(), rli_size_unit_so_far(), ROUND_TYPE_ALIGN, round_up(), simple_cst_equal(), size_binop(), size_one_node, STRICT_ALIGNMENT, record_layout_info_s::t, TREE_CODE, TREE_CONSTANT, TYPE_ALIGN, TYPE_ALIGN_UNIT, TYPE_NAME, TYPE_PACKED, TYPE_SIZE, TYPE_SIZE_UNIT, record_layout_info_s::unpacked_align, warn_packed, warn_padded, and warning.
Definition at line 1332 of file stor-layout.c.
References BITS_PER_UNIT, bitsize_unit_node, fold_convert(), GET_MODE_ALIGNMENT, mode, ROUND_TYPE_ALIGN, round_up(), size_binop(), sizetype, STRICT_ALIGNMENT, TREE_CODE, TYPE_ALIGN, TYPE_ALIGN_UNIT, TYPE_MAIN_VARIANT, TYPE_MODE, TYPE_NEXT_VARIANT, TYPE_SIZE, TYPE_SIZE_UNIT, TYPE_USER_ALIGN, and variable_size().
Definition at line 1445 of file stor-layout.c.
Referenced by build_ctr_info_type(), build_fn_info_type(), build_gcov_info(), build_ptrmemfunc_type(), create_pseudo_type_info(), and create_tinfo_types().
| void finish_record_layout | ( | record_layout_info | rli, | |
| int | free_p | |||
| ) |
Definition at line 1413 of file stor-layout.c.
References compute_record_mode(), finalize_record_size(), finalize_type_size(), free(), layout_decl(), record_layout_info_s::pending_statics, record_layout_info_s::t, TREE_CHAIN, and TREE_VALUE.
Definition at line 1978 of file stor-layout.c.
References HOST_BITS_PER_WIDE_INT, layout_type(), set_min_and_max_values_for_integral_type(), and TYPE_PRECISION.
Definition at line 2000 of file stor-layout.c.
References HOST_BITS_PER_WIDE_INT, layout_type(), set_min_and_max_values_for_integral_type(), TYPE_PRECISION, and TYPE_UNSIGNED.
| enum machine_mode get_best_mode | ( | int | bitsize, | |
| int | bitpos, | |||
| unsigned int | align, | |||
| enum machine_mode | largest_mode, | |||
| int | volatilep | |||
| ) |
Definition at line 2035 of file stor-layout.c.
References BIGGEST_ALIGNMENT, BITS_PER_WORD, GET_CLASS_NARROWEST_MODE, GET_MODE_BITSIZE, GET_MODE_WIDER_MODE, MIN, mode, MODE_INT, and SLOW_BYTE_ACCESS.
| unsigned int get_mode_alignment | ( | enum machine_mode | mode | ) |
Definition at line 265 of file stor-layout.c.
References BIGGEST_ALIGNMENT, BITS_PER_UNIT, MAX, MIN, and mode_base_align.
| void get_mode_bounds | ( | enum machine_mode | mode, | |
| int | sign, | |||
| enum machine_mode | target_mode, | |||
| rtx * | mmin, | |||
| rtx * | mmax | |||
| ) |
Definition at line 2089 of file stor-layout.c.
Definition at line 88 of file stor-layout.c.
| static GTY | ( | () | ) | [static] |
Definition at line 1834 of file stor-layout.c.
| enum machine_mode int_mode_for_mode | ( | enum machine_mode | mode | ) |
Definition at line 231 of file stor-layout.c.
References gcc_unreachable, GET_MODE_BITSIZE, GET_MODE_CLASS, MODE_CC, MODE_COMPLEX_FLOAT, MODE_COMPLEX_INT, MODE_FLOAT, mode_for_size(), MODE_INT, MODE_PARTIAL_INT, MODE_RANDOM, MODE_VECTOR_FLOAT, and MODE_VECTOR_INT.
Definition at line 299 of file stor-layout.c.
References ADJUST_FIELD_ALIGN, BIGGEST_FIELD_ALIGNMENT, BITS_PER_UNIT, bitsize_unit_node, compare_tree_int(), DECL_ALIGN, DECL_BIT_FIELD, DECL_BIT_FIELD_TYPE, DECL_EXTERNAL, DECL_FIELD_CONTEXT, DECL_MODE, DECL_NONADDRESSABLE_P, DECL_PACKED, DECL_RTL_IF_SET, DECL_SIZE, DECL_SIZE_UNIT, DECL_UNSIGNED, DECL_USER_ALIGN, do_type_align(), EMPTY_FIELD_BOUNDARY, error_mark_node, fold_convert(), gcc_assert, GET_MODE_ALIGNMENT, GET_MODE_CLASS, integer_zerop(), larger_than_size, MAX, maximum_field_alignment, MIN, mode_for_size_tree(), MODE_INT, gcc_target::ms_bitfield_layout_p, NULL_RTX, PCC_BITFIELD_TYPE_MATTERS, PUT_MODE, SET_DECL_RTL, set_mem_attributes(), size, size_binop(), sizetype, targetm, TREE_CODE, TREE_INT_CST_LOW, TREE_TYPE, TYPE_ALIGN, TYPE_MODE, TYPE_SIZE, TYPE_SIZE_UNIT, TYPE_UNSIGNED, variable_size(), void_type_node, warn_larger_than, and warning.
Definition at line 1485 of file stor-layout.c.
References AGGREGATE_TYPE_P, BIGGEST_ALIGNMENT, BITS_PER_UNIT, bitsize_int, bitsizetype, build2, build_int_cst(), build_pointer_type(), COMPLEX_TYPE, element, element_size, error_mark_node, finalize_type_size(), finish_record_layout(), fold(), fold_convert(), FUNCTION_BOUNDARY, gcc_assert, gcc_unreachable, GET_MODE_ALIGNMENT, GET_MODE_BITSIZE, GET_MODE_CLASS, GET_MODE_INNER, GET_MODE_NUNITS, GET_MODE_SIZE, GET_MODE_WIDER_MODE, have_regs_of_mode, host_integerp(), index(), int_const_binop(), integer_one_node, integer_onep(), integer_zerop(), INTEGRAL_TYPE_P, lang_adjust_rli, length, MAX, MEMBER_TYPE_FORCES_BLK, mode, MODE_COMPLEX_FLOAT, MODE_COMPLEX_INT, MODE_FLOAT, mode_for_size(), mode_for_size_tree(), MODE_INT, nreverse(), NULL_TREE, place_field(), Pmode, POINTER_SIZE, reference_types_internal, ROUND_TYPE_ALIGN, simple_cst_equal(), size_binop(), size_int, size_one_node, size_zero_node, sizetype, smallest_mode_for_size(), start_record_layout(), STRICT_ALIGNMENT, targetm, TREE_CHAIN, TREE_CODE, tree_int_cst_sgn(), tree_low_cst(), TREE_TYPE, TYPE_ALIAS_SET, TYPE_ALIAS_SET_KNOWN_P, TYPE_ALIGN, TYPE_DOMAIN, TYPE_FIELDS, TYPE_MAX_VALUE, TYPE_MIN_VALUE, TYPE_MODE, TYPE_NO_FORCE_BLK, TYPE_PACKED, TYPE_PRECISION, TYPE_SIZE, TYPE_SIZE_UNIT, TYPE_UNSIGNED, TYPE_USER_ALIGN, TYPE_VECTOR_SUBPARTS, and gcc_target::vector_mode_supported_p.
| tree make_signed_type | ( | int | precision | ) |
Definition at line 1807 of file stor-layout.c.
References fixup_signed_type(), make_node, and TYPE_PRECISION.
| tree make_unsigned_type | ( | int | precision | ) |
Definition at line 1820 of file stor-layout.c.
References fixup_unsigned_type(), make_node, and TYPE_PRECISION.
| enum machine_mode mode_for_size | ( | unsigned int | size, | |
| enum mode_class | class, | |||
| int | limit | |||
| ) |
Definition at line 178 of file stor-layout.c.
References GET_CLASS_NARROWEST_MODE, GET_MODE_PRECISION, GET_MODE_WIDER_MODE, MAX_FIXED_MODE_SIZE, and mode.
| enum machine_mode mode_for_size_tree | ( | tree | size, | |
| enum mode_class | class, | |||
| int | limit | |||
| ) |
Definition at line 197 of file stor-layout.c.
References compare_tree_int(), mode_for_size(), TREE_CODE, tree_low_cst(), and TREE_OVERFLOW.
Definition at line 577 of file stor-layout.c.
References BITS_PER_UNIT, bitsize_int, compare_tree_int(), fold_convert(), size_binop(), size_int, and sizetype.
| void normalize_rli | ( | record_layout_info | rli | ) |
Definition at line 623 of file stor-layout.c.
References record_layout_info_s::bitpos, normalize_offset(), record_layout_info_s::offset, and record_layout_info_s::offset_align.
| void place_field | ( | record_layout_info | rli, | |
| tree | field | |||
| ) |
Definition at line 787 of file stor-layout.c.
References ADJUST_FIELD_ALIGN, BIGGEST_ALIGNMENT, BITFIELD_NBYTES_LIMITED, record_layout_info_s::bitpos, BITS_PER_UNIT, bitsize_unit_node, bitsize_zero_node, DECL_BIT_FIELD, DECL_BIT_FIELD_TYPE, DECL_FIELD_BIT_OFFSET, DECL_FIELD_OFFSET, DECL_OFFSET_ALIGN, DECL_PACKED, DECL_SIZE, DECL_SIZE_UNIT, error_mark_node, fold_convert(), host_integerp(), integer_zerop(), layout_decl(), MAX, maximum_field_alignment, MIN, gcc_target::ms_bitfield_layout_p, normalize_rli(), NULL, NULL_TREE, record_layout_info_s::offset, record_layout_info_s::offset_align, record_layout_info_s::packed_maybe_necessary, PCC_BITFIELD_TYPE_MATTERS, record_layout_info_s::pending_statics, place_union_field(), record_layout_info_s::prev_field, record_layout_info_s::remaining_in_alignment, round_up(), SET_DECL_OFFSET_ALIGN, simple_cst_equal(), size_binop(), sizetype, STRICT_ALIGNMENT, record_layout_info_s::t, targetm, TREE_CODE, tree_cons, TREE_CONSTANT, TREE_CONSTANT_OVERFLOW, tree_low_cst(), TREE_TYPE, TYPE_ALIGN, TYPE_SIZE, TYPE_USER_ALIGN, update_alignment_for_field(), warn_packed, warn_padded, and warning.
| static void place_union_field | ( | record_layout_info | rli, | |
| tree | field | |||
| ) | [static] |
Definition at line 744 of file stor-layout.c.
References BIGGEST_ALIGNMENT, bitsize_zero_node, build3, DECL_FIELD_BIT_OFFSET, DECL_FIELD_OFFSET, DECL_QUALIFIER, DECL_SIZE_UNIT, fold(), record_layout_info_s::offset, SET_DECL_OFFSET_ALIGN, size_binop(), size_zero_node, sizetype, record_layout_info_s::t, TREE_CODE, and update_alignment_for_field().
Definition at line 562 of file stor-layout.c.
References BITS_PER_UNIT, bitsize_int, fold_convert(), size_binop(), size_int, and sizetype.
Definition at line 99 of file stor-layout.c.
References NULL_TREE, skip_simple_arithmetic(), TREE_CODE, and tree_cons.
Definition at line 483 of file stor-layout.c.
Referenced by cp_genericize(), decl_attributes(), and require_complete_types_for_parms().
| tree rli_size_so_far | ( | record_layout_info | rli | ) |
Definition at line 639 of file stor-layout.c.
References bit_from_pos(), record_layout_info_s::bitpos, and record_layout_info_s::offset.
| tree rli_size_unit_so_far | ( | record_layout_info | rli | ) |
Definition at line 631 of file stor-layout.c.
References record_layout_info_s::bitpos, byte_from_pos(), and record_layout_info_s::offset.
| void set_lang_adjust_rli | ( | void(*)(record_layout_info) | f | ) |
Definition at line 499 of file stor-layout.c.
Definition at line 1926 of file stor-layout.c.
Referenced by finish_enum(), fixup_signed_type(), fixup_unsigned_type(), and initialize_sizetypes().
Definition at line 1863 of file stor-layout.c.
References BITS_PER_UNIT_LOG, bitsizetype, build_distinct_type_copy(), fixup_signed_type(), fixup_unsigned_type(), gcc_assert, get_identifier(), HOST_BITS_PER_WIDE_INT, make_node, make_signed_type(), memcpy, MIN, sbitsizetype, sizetype, ssizetype, tree_size(), TREE_TYPE, TYPE_CACHED_VALUES, TYPE_CACHED_VALUES_P, TYPE_IS_SIZETYPE, TYPE_MAIN_VARIANT, TYPE_NAME, TYPE_PRECISION, TYPE_UID, and TYPE_UNSIGNED.
| enum machine_mode smallest_mode_for_size | ( | unsigned int | size, | |
| enum mode_class | class | |||
| ) |
Definition at line 214 of file stor-layout.c.
References gcc_unreachable, GET_CLASS_NARROWEST_MODE, GET_MODE_PRECISION, GET_MODE_WIDER_MODE, and mode.
| record_layout_info start_record_layout | ( | tree | t | ) |
Definition at line 512 of file stor-layout.c.
References BIGGEST_ALIGNMENT, record_layout_info_s::bitpos, BITS_PER_UNIT, bitsize_zero_node, MAX, record_layout_info_s::offset, record_layout_info_s::offset_align, record_layout_info_s::packed_maybe_necessary, record_layout_info_s::pending_statics, record_layout_info_s::prev_field, record_layout_info_s::record_align, size_zero_node, STRUCTURE_SIZE_BOUNDARY, record_layout_info_s::t, TYPE_ALIGN, TYPE_PACKED, record_layout_info_s::unpacked_align, and xmalloc().
| unsigned int update_alignment_for_field | ( | record_layout_info | rli, | |
| tree | field, | |||
| unsigned int | known_align | |||
| ) |
Definition at line 650 of file stor-layout.c.
Definition at line 123 of file stor-layout.c.
References cfun, CONTAINS_PLACEHOLDER_P, error(), put_pending_size(), save, save_expr(), size_one_node, skip_simple_arithmetic(), and TREE_CONSTANT.
| unsigned int initial_max_fld_align = TARGET_DEFAULT_PACK_STRUCT |
Definition at line 52 of file stor-layout.c.
Referenced by common_handle_option(), layout_decl(), and update_alignment_for_field().
Referenced by layout_type(), and set_lang_adjust_rli().
| unsigned int maximum_field_alignment = TARGET_DEFAULT_PACK_STRUCT * BITS_PER_UNIT |
Definition at line 50 of file stor-layout.c.
int reference_types_internal = 0 [static] |
Definition at line 61 of file stor-layout.c.
| unsigned int set_alignment = 0 |
Definition at line 56 of file stor-layout.c.
| tree sizetype_tab[(int) TYPE_KIND_LAST] |
Definition at line 46 of file stor-layout.c.
1.5.6