osprey/kg++fe/gnu/stor-layout.c File Reference

#include "config.h"
#include "system.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 "gt-stor-layout.h"

Include dependency graph for stor-layout.c:

Go to the source code of this file.

Defines

#define MAX_FIXED_MODE_SIZE   GET_MODE_BITSIZE (DImode)
#define SET_WORD_SIZE   BITS_PER_WORD

Functions/Subroutines

static void finalize_record_size PARAMS ((record_layout_info))
static void finalize_type_size PARAMS ((tree))
static void place_union_field PARAMS ((record_layout_info, tree))
static unsigned int
update_alignment_for_field 
PARAMS ((record_layout_info, tree, unsigned int))
static GTY (())
tree get_pending_sizes ()
int is_pending_size (tree expr)
void put_pending_size (tree expr)
void put_pending_sizes (tree chain)
tree variable_size (tree size)
enum machine_mode mode_for_size (unsigned int size, enum mode_class class, int limit)
enum machine_mode mode_for_size_tree (tree size, enum mode_class class, int limit)
enum machine_mode smallest_mode_for_size (unsigned int size, enum mode_class class)
enum machine_mode int_mode_for_mode (enum machine_mode mode)
unsigned int get_mode_alignment (enum machine_mode mode)
tree round_up (tree value, int divisor)
tree round_down (tree value, int divisor)
void layout_decl (tree decl, unsigned int known_align)
void set_lang_adjust_rli (f)
record_layout_info start_record_layout (tree t)
tree bit_from_pos (tree offset, tree bitpos)
tree byte_from_pos (tree offset, tree bitpos)
void pos_from_byte (tree *poffset, tree *pbitpos, unsigned int off_align, tree pos)
void pos_from_bit (tree *poffset, tree *pbitpos, unsigned int off_align, tree pos)
void normalize_offset (tree *poffset, tree *pbitpos, unsigned int off_align)
void debug_rli (record_layout_info rli)
void normalize_rli (record_layout_info rli)
tree rli_size_unit_so_far (record_layout_info rli)
tree rli_size_so_far (record_layout_info rli)
static unsigned int update_alignment_for_field (record_layout_info rli, tree field, unsigned int known_align)
static void place_union_field (record_layout_info rli, tree field)
void place_field (record_layout_info rli, tree field)
static void finalize_record_size (record_layout_info rli)
void compute_record_mode (tree type)
static void finalize_type_size (tree type)
void finish_record_layout (record_layout_info rli, int free_p)
void layout_type (tree type)
tree make_signed_type (int precision)
tree make_unsigned_type (int precision)
void initialize_sizetypes ()
void set_sizetype (tree type)
void fixup_signed_type (tree type)
void fixup_unsigned_type (tree type)
enum machine_mode get_best_mode (int bitsize, int bitpos, unsigned int align, enum machine_mode largest_mode, int volatilep)

Variables

static int sizetype_set
static tree early_type_list
tree sizetype_tab [(int) TYPE_KIND_LAST]
unsigned int maximum_field_alignment
unsigned int set_alignment = 0
static int reference_types_internal = 0


Define Documentation

#define MAX_FIXED_MODE_SIZE   GET_MODE_BITSIZE (DImode)

Definition at line 211 of file stor-layout.c.

#define SET_WORD_SIZE   BITS_PER_WORD

Referenced by layout_type().


Function Documentation

tree bit_from_pos ( tree  offset,
tree  bitpos 
)

Definition at line 599 of file stor-layout.c.

Referenced by bit_position(), and rli_size_so_far().

tree byte_from_pos ( tree  offset,
tree  bitpos 
)

Definition at line 608 of file stor-layout.c.

Referenced by byte_position(), and rli_size_unit_so_far().

void compute_record_mode ( tree  type  ) 

Definition at line 1381 of file stor-layout.c.

Referenced by finish_record_layout(), and finish_struct_1().

void debug_rli ( record_layout_info  rli  ) 

Definition at line 678 of file stor-layout.c.

static void finalize_record_size ( record_layout_info  rli  )  [static]

static void finalize_type_size ( tree  type  )  [static]

void finish_record_layout ( record_layout_info  rli,
int  free_p 
)

Definition at line 1555 of file stor-layout.c.

Referenced by layout_class_type(), layout_type(), and layout_virtual_bases().

void fixup_signed_type ( tree  type  ) 

void fixup_unsigned_type ( tree  type  ) 

enum machine_mode get_best_mode ( int  bitsize,
int  bitpos,
unsigned int  align,
enum machine_mode  largest_mode,
int  volatilep 
)

unsigned int get_mode_alignment ( enum machine_mode  mode  ) 

Definition at line 315 of file stor-layout.c.

Referenced by emit_move_complex().

tree get_pending_sizes ( void   ) 

static GTY ( ()   )  [static]

Definition at line 80 of file stor-layout.c.

References reference_types_internal.

void initialize_sizetypes (  ) 

enum machine_mode int_mode_for_mode ( enum machine_mode  mode  ) 

int is_pending_size ( tree  expr  ) 

Definition at line 115 of file stor-layout.c.

References TREE_CHAIN, and TREE_VALUE.

void layout_decl ( tree  decl,
unsigned int  known_align 
)

Definition at line 373 of file stor-layout.c.

References abort, BITS_PER_UNIT, bitsize_unit_node, compare_tree_int(), convert(), DECL_ALIGN, DECL_BIT_FIELD, DECL_BIT_FIELD_TYPE, DECL_EXTERNAL, DECL_MODE, DECL_NONADDRESSABLE_P, DECL_PACKED, DECL_RTL_IF_SET, DECL_SIZE, DECL_SIZE_UNIT, DECL_USER_ALIGN, error_mark_node, GET_MODE_ALIGNMENT, GET_MODE_CLASS, larger_than_size, MAX, maximum_field_alignment, MIN, mode_for_size_tree(), MODE_INT, NULL_RTX, PUT_MODE, SET_DECL_RTL, set_mem_attributes(), size, size_binop(), sizetype, TREE_CODE, TREE_INT_CST_LOW, TREE_TYPE, TREE_UNSIGNED, TYPE_ALIGN, TYPE_MODE, TYPE_SIZE, TYPE_SIZE_UNIT, variable_size(), void_type_node, and warn_larger_than.

Referenced by assemble_variable(), build_compound_literal(), build_cplus_new(), build_decl(), build_decl_stat(), build_jni_stub(), build_local_temp(), build_target_expr_with_type(), build_utf8_ref(), c_finish_incomplete_decl(), compile_resource_file(), decl_attributes(), duplicate_decls(), expand_expr(), expand_expr_real_1(), expand_load_internal(), finalize_nesting_tree_1(), finish_builtin_struct(), finish_builtin_type(), finish_decl(), finish_record_layout(), finish_struct(), initialize_reference(), java_lang_expand_expr(), layout_class_type(), layout_var_decl(), layout_vtable_decl(), maybe_deduce_size_from_array_init(), merge_decls(), place_field(), push_jvm_slot(), relayout_decl(), require_complete_types_for_parms(), split_complex_args(), store_init_value(), store_parm_decls(), store_parm_decls_oldstyle(), tsubst_decl(), and update_alignment_for_field().

void layout_type ( tree  type  ) 

Definition at line 1592 of file stor-layout.c.

Referenced by alpha_build_builtin_va_list(), alpha_build_va_list(), build_array_type(), build_common_tree_nodes_2(), build_complex_type(), build_cplus_method_type(), build_dtable_decl(), build_function_type(), build_java_array_type(), build_method_type(), build_method_type_directly(), build_offset_type(), build_pointer_type(), build_pointer_type_for_mode(), build_reference_type(), build_reference_type_for_mode(), clipper_build_va_list(), complete_array_type(), complete_type(), cp_finish_decl(), cxx_init_decl_processing(), d30v_build_va_list(), duplicate_decls(), end_final(), ffecom_f2c_make_type_(), ffecom_finish_global_(), ffecom_init_0(), ffecom_make_complex_type_(), ffecom_type_namelist_(), ffecom_type_vardesc_(), ffeste_io_cilist_(), ffeste_io_cllist_(), ffeste_io_ialist_(), ffeste_io_icilist_(), ffeste_io_inlist_(), ffeste_io_olist_(), ffeste_R1001(), finalize_nesting_tree_1(), finish_builtin_struct(), finish_builtin_type(), finish_enum(), finish_struct(), finish_vector_type(), fixup_child_record_type(), fixup_signed_type(), fixup_unsigned_type(), grokdeclarator(), GTY(), i860_build_builtin_va_list(), i860_build_va_list(), ia64_init_builtins(), init_eh(), ix86_build_builtin_va_list(), ix86_build_va_list(), ix86_init_mmx_sse_builtins(), java_init_decl_processing(), layout_array_type(), layout_class(), layout_class_methods(), layout_vtable_decl(), m88k_build_va_list(), make_vector_type(), merge_decls(), mf_make_mf_cache_struct_type(), mips_build_builtin_va_list(), mips_build_va_list(), push_promoted_type(), record_builtin_java_type(), rs6000_build_builtin_va_list(), rs6000_build_va_list(), s390_build_builtin_va_list(), s390_build_va_list(), scan_omp_parallel(), scan_omp_single(), set_sizetype(), sh_build_builtin_va_list(), sh_build_va_list(), store_init_value(), synth_module_prologue(), tsubst(), type_hash_lookup(), xstormy16_build_builtin_va_list(), xstormy16_build_va_list(), xtensa_build_builtin_va_list(), and xtensa_build_va_list().

tree make_signed_type ( int  precision  ) 

tree make_unsigned_type ( int  precision  ) 

enum machine_mode mode_for_size ( unsigned int  size,
enum mode_class  class,
int  limit 
)

Definition at line 220 of file stor-layout.c.

Referenced by add_subweb_2(), alpha_expand_block_clear(), alpha_expand_block_move(), alter_reg(), arm_function_value(), assemble_integer(), assign_parm_setup_block(), can_store_by_pieces(), combine_instructions(), compute_argument_addresses(), construct_container(), do_jump(), emit_library_call_value_1(), emit_move_insn_1(), expand_builtin_powi(), expand_expr(), expand_expr_real_1(), expand_field_assignment(), expand_vector_parallel(), extract_bit_field(), extract_force_align_mem_bit_field(), function_arg(), function_arg_record_value_3(), function_value(), gen_edge_profiler(), gen_lowpart_common(), get_builtin_sync_mode(), hfa_element_mode(), init_emit_once(), init_integral_libfuncs(), init_optabs(), int_mode_for_mode(), layout_type(), make_extraction(), mips_block_move_straight(), mips_expand_unaligned_store(), mips_function_value(), mode_for_size_tree(), move_block_from_reg(), move_by_pieces(), move_by_pieces_ninsns(), optimize_bit_field(), output_constant(), output_func_start_profiler(), rs6000_darwin64_record_arg_advance_flush(), rs6000_darwin64_record_arg_flush(), rtl_coverage_counter_ref(), rtl_gen_const_delta_profiler(), rtl_gen_interval_profiler(), rtl_gen_one_value_profiler_no_edge_manipulation(), rtl_gen_pow2_profiler(), simplify_comparison(), simplify_shift_const(), simplify_shift_const_1(), simplify_subreg(), store_bit_field(), store_by_pieces_1(), store_constructor(), store_one_arg(), and subreg_offset_representable_p().

enum machine_mode mode_for_size_tree ( tree  size,
enum mode_class  class,
int  limit 
)

void normalize_offset ( tree poffset,
tree pbitpos,
unsigned int  off_align 
)

Definition at line 654 of file stor-layout.c.

Referenced by normalize_rli().

void normalize_rli ( record_layout_info  rli  ) 

static unsigned int update_alignment_for_field PARAMS ( (record_layout_info, tree, unsigned int)   )  [static]

static void place_union_field PARAMS ( (record_layout_info, tree  )  [static]

static void finalize_type_size PARAMS ( (tree  )  [static]

static void finalize_record_size PARAMS ( (record_layout_info  )  [static]

void place_field ( record_layout_info  rli,
tree  field 
)

Definition at line 884 of file stor-layout.c.

Referenced by layout_class_type(), layout_nonempty_base_or_field(), and layout_type().

static void place_union_field ( record_layout_info  rli,
tree  field 
) [static]

void pos_from_bit ( tree poffset,
tree pbitpos,
unsigned int  off_align,
tree  pos 
)

Definition at line 637 of file stor-layout.c.

void pos_from_byte ( tree poffset,
tree pbitpos,
unsigned int  off_align,
tree  pos 
)

void put_pending_size ( tree  expr  ) 

Definition at line 129 of file stor-layout.c.

Referenced by variable_size().

void put_pending_sizes ( tree  chain  ) 

Definition at line 147 of file stor-layout.c.

Referenced by c_cannot_inline_tree_fn(), ffecom_sym_transform_(), and grokdeclarator().

tree rli_size_so_far ( record_layout_info  rli  ) 

Definition at line 720 of file stor-layout.c.

Referenced by finalize_record_size(), and layout_class_type().

tree rli_size_unit_so_far ( record_layout_info  rli  ) 

tree round_down ( tree  value,
int  divisor 
)

Definition at line 350 of file stor-layout.c.

Referenced by floor(), include_empty_classes(), and pad_to_arg_alignment().

tree round_up ( tree  value,
int  divisor 
)

void set_lang_adjust_rli ( f   ) 

Definition at line 520 of file stor-layout.c.

References f, and lang_adjust_rli.

void set_sizetype ( tree  type  ) 

enum machine_mode smallest_mode_for_size ( unsigned int  size,
enum mode_class  class 
)

record_layout_info start_record_layout ( tree  t  ) 

Definition at line 565 of file stor-layout.c.

Referenced by layout_class_type(), and layout_type().

static unsigned int update_alignment_for_field ( record_layout_info  rli,
tree  field,
unsigned int  known_align 
) [static]

tree variable_size ( tree  size  ) 


Variable Documentation

Definition at line 51 of file stor-layout.c.

Referenced by layout_type(), and set_sizetype().

int reference_types_internal = 0 [static]

Definition at line 68 of file stor-layout.c.

Referenced by GTY(), and layout_type().

unsigned int set_alignment = 0

Definition at line 63 of file stor-layout.c.

Referenced by layout_type().

int sizetype_set [static]

Definition at line 47 of file stor-layout.c.

Referenced by layout_type(), and set_sizetype().

tree sizetype_tab[(int) TYPE_KIND_LAST]

Definition at line 55 of file stor-layout.c.

Referenced by set_sizetype(), size_int_kind(), and size_int_wide().


Generated on Wed Apr 8 15:44:58 2009 for Open64 by  doxygen 1.5.6