osprey-gcc/gcc/stor-layout.c File Reference

#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"

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)

Functions/Subroutines

static void finalize_record_size (record_layout_info)
static void finalize_type_size (tree)
static void place_union_field (record_layout_info, tree)
void debug_rli (record_layout_info)
static GTY (())
tree get_pending_sizes (void)
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)
static void do_type_align (tree type, tree decl)
void layout_decl (tree decl, unsigned int known_align)
void relayout_decl (tree decl)
void set_lang_adjust_rli (void(*f)(record_layout_info))
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_bit (tree *poffset, tree *pbitpos, unsigned int off_align, tree pos)
void normalize_offset (tree *poffset, tree *pbitpos, unsigned int off_align)
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)
unsigned int update_alignment_for_field (record_layout_info rli, tree field, unsigned int known_align)
void place_field (record_layout_info rli, tree field)
void compute_record_mode (tree type)
void finish_record_layout (record_layout_info rli, int free_p)
void finish_builtin_struct (tree type, const char *name, tree fields, tree align_type)
void layout_type (tree type)
tree make_signed_type (int precision)
tree make_unsigned_type (int precision)
void initialize_sizetypes (bool signed_p)
void set_sizetype (tree type)
void set_min_and_max_values_for_integral_type (tree type, int precision, bool is_unsigned)
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)
void get_mode_bounds (enum machine_mode mode, int sign, enum machine_mode target_mode, rtx *mmin, rtx *mmax)

Variables

tree sizetype_tab [(int) TYPE_KIND_LAST]
unsigned int maximum_field_alignment = TARGET_DEFAULT_PACK_STRUCT * BITS_PER_UNIT
unsigned int initial_max_fld_align = TARGET_DEFAULT_PACK_STRUCT
unsigned int set_alignment = 0
static int reference_types_internal = 0
void(* lang_adjust_rli )(record_layout_info)=0


Define Documentation

#define MAX_FIXED_MODE_SIZE   GET_MODE_BITSIZE (DImode)

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


Function Documentation

tree bit_from_pos ( tree  offset,
tree  bitpos 
)

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

References bitsize_unit_node, bitsizetype, fold_convert(), and size_binop().

tree byte_from_pos ( tree  offset,
tree  bitpos 
)

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

References bitsize_unit_node, fold_convert(), size_binop(), and sizetype.

void compute_record_mode ( tree  type  ) 

void debug_rli ( record_layout_info  rli  ) 

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

static void do_type_align ( tree  type,
tree  decl 
) [inline, static]

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]

static void finalize_type_size ( tree  type  )  [static]

void finish_builtin_struct ( tree  type,
const char *  name,
tree  fields,
tree  align_type 
)

void finish_record_layout ( record_layout_info  rli,
int  free_p 
)

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 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.

tree get_pending_sizes ( void   ) 

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

static GTY ( ()   )  [static]

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

References reference_types_internal.

void initialize_sizetypes ( bool  signed_p  ) 

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

enum machine_mode int_mode_for_mode ( enum machine_mode  mode  ) 

void layout_decl ( tree  decl,
unsigned int  known_align 
)

void layout_type ( tree  type  ) 

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 
)

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 
)

void normalize_rli ( record_layout_info  rli  ) 

void place_field ( record_layout_info  rli,
tree  field 
)

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 562 of file stor-layout.c.

References BITS_PER_UNIT, bitsize_int, fold_convert(), size_binop(), size_int, and sizetype.

void put_pending_size ( tree  expr  ) 

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

References NULL_TREE, skip_simple_arithmetic(), TREE_CODE, and tree_cons.

void put_pending_sizes ( tree  chain  ) 

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

References gcc_assert.

void relayout_decl ( tree  decl  ) 

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  ) 

tree rli_size_unit_so_far ( record_layout_info  rli  ) 

void set_lang_adjust_rli ( void(*)(record_layout_info f  ) 

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

void set_min_and_max_values_for_integral_type ( tree  type,
int  precision,
bool  is_unsigned 
)

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  ) 

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.

tree variable_size ( tree  size  ) 


Variable Documentation

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.


Generated on Wed Apr 8 15:45:03 2009 for Open64 by  doxygen 1.5.6