osprey/wgen/wgen_spin_symbol.cxx File Reference

#include "gspin-wgen-interface.h"
#include <values.h>
#include "defs.h"
#include "errors.h"
#include "symtab.h"
#include "strtab.h"
#include "wn.h"
#include "wgen_expr.h"
#include "wgen_decl.h"
#include "wgen_misc.h"
#include "wgen_dst.h"
#include "ir_reader.h"
#include "wgen_spin_symbol.h"
#include "wgen_stmt.h"
#include <map>
#include "erfe.h"
#include <ext/hash_set>
#include <ext/hash_map>

Include dependency graph for wgen_spin_symbol.cxx:

Go to the source code of this file.

Data Types

type  void_ptr_hash

Functions/Subroutines

void Push_Deferred_Function (gs_t)
char * WGEN_Tree_Node_Name (gs_t op)
void add_duplicates (gs_t newdecl, gs_t olddecl)
void erase_duplicates (gs_t decl)
static STget_duplicate_st (gs_t decl)
static char * Get_Name (gs_t node)
static void dump_field (gs_t field)
gs_t get_first_real_or_virtual_field (gs_t type_tree)
gs_t get_virtual_field (gs_t type_tree)
gs_t get_first_real_field (gs_t type_tree)
gs_t next_real_field (gs_t type_tree, gs_t field)
static void Do_Base_Types (gs_t type_tree)
size_t Roundup (size_t offset, int alignment)
size_t Type_Size_Without_Vbases (gs_t type_tree)
bool is_empty_base_class (gs_t type_tree)
gs_t lookup_attribute (char *attr_name, gs_t attr_list)
TY_IDX Create_TY_For_Tree (gs_t type_tree, TY_IDX idx)
void Create_DST_For_Tree (gs_t decl_node, ST *st)
STSearch_decl_arguments (char *name)
STCreate_ST_For_Tree (gs_t decl_node)
TY_IDXTYPE_TY_IDX (gs_t t)
BOOLexpanded_decl (gs_t t)
void set_DECL_ST (gs_t t, ST *st)
ST *& get_DECL_ST (gs_t t)
BOOLfunc_PU_uplevel (gs_t t)
INT32WEAK_WORKAROUND (ST *st)
SYMTAB_IDXDECL_SYMTAB_IDX (gs_t t)
LABEL_IDXDECL_LABEL_IDX (gs_t t)
ST *& TREE_STRING_ST (gs_t t)
BOOLDECL_LABEL_DEFINED (gs_t t)
INT32DECL_FIELD_ID (gs_t t)
INT32TYPE_FIELD_IDS_USED (gs_t t)
INT32SCOPE_NUMBER (gs_t t)
gs_tLABEL_SCOPE (gs_t t)
ST *& DECL_ST2 (gs_t t)
DST_INFO_IDXDECL_DST_IDX (gs_t t)
DST_INFO_IDXDECL_DST_SPECIFICATION_IDX (gs_t t)
DST_INFO_IDXDECL_DST_FIELD_IDX (gs_t t)
DST_INFO_IDXTYPE_DST_IDX (gs_t t)
DST_INFO_IDXDECL_DST_ABSTRACT_ROOT_IDX (gs_t t)
LABEL_IDXHANDLER_LABEL (gs_t t)

Variables

int pstatic_as_global
BOOL flag_no_common
gs_t decl_arguments
std::multimap< gs_t, gs_tduplicate_of
hash_map< gs_t, TY_IDX, ptrhash > ty_idx_map
hash_map< gs_t, ST *, ptrhash > st_map
hash_map< gs_t, SYMTAB_IDX,
ptrhash > 
symtab_idx_map
hash_map< gs_t, LABEL_IDX,
ptrhash > 
label_idx_map
hash_map< gs_t, ST *, ptrhash > string_st_map
hash_map< gs_t, BOOL, ptrhash > bool_map
hash_map< gs_t, INT32, ptrhash > field_id_map
hash_map< gs_t, INT32, ptrhash > type_field_ids_used_map
hash_map< gs_t, INT32, ptrhash > scope_number_map
hash_map< gs_t, gs_t, ptrhash > label_scope_map
hash_map< gs_t, DST_INFO_IDX,
ptrhash > 
decl_idx_map
hash_map< gs_t, DST_INFO_IDX,
ptrhash > 
decl_field_idx_map
hash_map< gs_t, DST_INFO_IDX,
ptrhash > 
decl_specification_idx_map
hash_map< gs_t, DST_INFO_IDX,
ptrhash > 
type_idx_map
hash_map< gs_t, LABEL_IDX,
ptrhash > 
handler_label_map
hash_map< gs_t, DST_INFO_IDX,
ptrhash > 
abstract_root_map
hash_map< gs_t, ST *, ptrhash > decl_st2_map


Function Documentation

void add_duplicates ( gs_t  newdecl,
gs_t  olddecl 
)

Definition at line 117 of file wgen_spin_symbol.cxx.

References duplicate_of.

Referenced by decls_match().

void Create_DST_For_Tree ( gs_t  decl_node,
ST st 
)

Definition at line 1395 of file wgen_spin_symbol.cxx.

References Create_DST_decl_For_Tree(), DECL_DST_IDX(), and dst.

Referenced by Get_ST().

ST* Create_ST_For_Tree ( gs_t  decl_node  ) 

Definition at line 1462 of file wgen_spin_symbol.cxx.

References Add_Current_Scope_Alloca_St(), Aggregate_Alignment, base, BOOL, CLASS_FUNC, CLASS_VAR, Clear_TY_is_volatile(), Create_DST_decl_For_Tree(), Current_Entry_WN(), Current_Function_Decl(), CURRENT_SYMTAB, Debug_Level, DECL_DST_IDX(), DECL_ST, DECL_SYMTAB_IDX(), DevWarn, dst, Enable_WFE_DFE, expanded_decl(), EXPORT_LOCAL, EXPORT_LOCAL_INTERNAL, EXPORT_PREEMPTIBLE, Fail_FmtAssertion(), FALSE, flag_no_common, FmtAssert, Get_Current_PU, get_DECL_ST(), get_duplicate_st(), Get_TY(), GLOBAL_SYMTAB, gs_decl_align_unit(), gs_decl_asmreg(), gs_decl_friend_pseudo_template_instantiation(), gs_decl_template_specialization, gs_decl_uid(), GS_FUNCTION_DECL, GS_IDENTIFIER_NODE, gs_identifier_pointer(), GS_INTEGER_CST, GS_METHOD_TYPE, GS_NAMESPACE_DECL, GS_PARM_DECL, GS_RECORD_TYPE, GS_RESULT_DECL, gs_tree_code(), gs_tree_string_pointer(), GS_VAR_DECL, idx, INT, Is_True, KIND_ARRAY, lang_cplus, Make_Pointer_Type(), make_symbols_weak, MTYPE_M, New_PU(), New_ST(), New_ST_ATTR(), not, NULL, p, Pointer_Mtype, pstatic_as_global, pu, PU_Init(), Pu_Table, Push_Deferred_Function(), Save_Str(), SCLASS_AUTO, SCLASS_COMMON, SCLASS_EXTERN, SCLASS_FORMAL, SCLASS_FSTATIC, SCLASS_PSTATIC, SCLASS_UGLOBAL, Search_decl_arguments(), Set_Current_Scope_Alloca_St(), Set_Current_Scope_Has_Alloca(), set_DECL_ST(), Set_PU_base_class(), Set_PU_has_alloca(), Set_PU_has_syscall_linkage(), Set_PU_is_constructor(), Set_ST_assigned_to_dedicated_preg(), Set_ST_base_idx(), Set_ST_has_named_section(), Set_ST_init_value_zero, Set_ST_is_initialized, Set_ST_is_temp_var, Set_ST_is_thread_private, Set_ST_is_value_parm, Set_ST_is_weak_symbol, Set_ST_pt_to_unique_mem, Set_ST_type, Set_TY_align, Set_TY_is_const, Set_TY_is_volatile, Set_TY_size, size, sprintf(), ST_ATTR_DEDICATED_REGISTER, ST_ATTR_Init(), ST_ATTR_SECTION_NAME, ST_Init(), ST_name, ST_pu(), ST_sclass, ST_st_idx, ST_type, strcmp(), strncmp(), TRUE, TY_align, TY_kind, TY_mtype, TY_size, WEAK_WORKAROUND(), WGEN_add_pragma_to_enclosing_regions(), WGEN_Alloca_0(), WGEN_Expand_Decl(), WGEN_Expand_Expr(), WGEN_Stmt_Append(), WGEN_Tree_Node_Name(), wn, WN_CreateAlloca(), WN_formal, WN_PRAGMA_LOCAL, WN_st(), and WN_Stid().

TY_IDX Create_TY_For_Tree ( gs_t  type_tree,
TY_IDX  idx 
)

Definition at line 345 of file wgen_spin_symbol.cxx.

References align, ARB_Init(), basetypes, Be_Type_Tbl, BOOL, Clear_ARB_const_stride(), Clear_ARB_const_ubnd(), Clear_TY_is_volatile(), cp_type_quals(), Create_DST_type_For_Tree(), Debug_Level, DECL_FIELD_ID(), defer_decl(), defer_DST_type(), defer_field(), DevWarn, Do_Base_Types(), dst, EMPTY, FLD_HANDLE::Entry(), ErrMsg(), exit(), expanding_function_definition, Fail_FmtAssertion(), FALSE, field_type(), FLD_Init(), FLD_next, Fld_Table, FmtAssert, Gen_Temp_Symbol(), get_first_real_field(), get_first_real_or_virtual_field(), Get_Name(), Get_TY(), get_virtual_field(), GS_ARRAY_TYPE, GS_BOOLEAN_TYPE, GS_CHAR_TYPE, gs_classtype_size(), GS_COMPLEX_TYPE, GS_CONST_DECL, GS_ENUMERAL_TYPE, GS_ERROR_MARK, GS_FIELD_DECL, GS_FUNCTION_TYPE, gs_get_integer_value(), gs_identifier_pointer(), GS_INTEGER_CST, GS_INTEGER_TYPE, GS_LANG_TYPE, GS_METHOD_TYPE, gs_n(), GS_OFFSET_TYPE, gs_operand(), GS_POINTER_TYPE, GS_REAL_TYPE, GS_RECORD_TYPE, GS_REFERENCE_TYPE, GS_TCC_TYPE, GS_TEMPLATE_DECL, gs_tree_code(), GS_TREE_LIST, gs_type_align(), GS_TYPE_DECL, gs_type_mode(), GS_UNION_TYPE, GS_VAR_DECL, GS_VECTOR_TYPE, GS_VOID_TYPE, i, INT32, INT64, is_empty_base_class(), Is_Target_64bit, Is_True, KIND_ARRAY, KIND_FUNCTION, KIND_POINTER, KIND_SCALAR, KIND_STRUCT, lineno, lookup_attribute(), Make_Pointer_Type(), mtype, MTYPE_C10, MTYPE_C4, MTYPE_C8, MTYPE_complement, MTYPE_CQ, MTYPE_F10, MTYPE_F4, MTYPE_F8, MTYPE_FQ, MTYPE_I1, MTYPE_I2, MTYPE_I4, MTYPE_I8, MTYPE_M, MTYPE_To_TY, MTYPE_U1, MTYPE_U2, MTYPE_U4, MTYPE_U8, MTYPE_UNKNOWN, MTYPE_V, New_ARB(), New_FLD(), New_TY(), New_TYLIST(), next_real_field(), NULL, NULL_TREE, offset, OPC_U4I4CVT, OPC_U8I8CVT, OPR_LDID, p, Pointer_Size, printf(), Roundup, Save_Str(), Set_ARB_const_lbnd(), Set_ARB_const_stride(), Set_ARB_const_ubnd(), Set_ARB_dimension(), Set_ARB_first_dimen(), Set_ARB_last_dimen(), Set_ARB_lbnd_val(), Set_ARB_stride_val(), Set_ARB_stride_var(), Set_ARB_ubnd_val(), Set_ARB_ubnd_var(), Set_FLD_bofst(), Set_FLD_bsize(), Set_FLD_is_anonymous(), Set_FLD_is_base_class(), Set_FLD_is_bit_field, Set_FLD_last_field(), Set_FLD_type(), Set_TY_align, Set_TY_anonymous, Set_TY_arb(), Set_TY_etype(), Set_TY_fld(), Set_TY_has_prototype, Set_TY_is_const, Set_TY_is_packed, Set_TY_is_restrict, Set_TY_is_union, Set_TY_is_varargs, Set_TY_is_volatile, Set_TY_no_ansi_alias, Set_TY_return_to_param, Set_TY_size, Set_TY_tylist(), Set_TYLIST_type(), SEGMENTED_ARRAY< T, block_size >::Size(), ST_st_idx, ST_type, strcmp(), strncasecmp(), strncmp(), strtol(), TARGET_64BIT, toupper(), TREE_CHAIN, TRUE, TY_align, TY_etype, TY_fld, TY_IDX_ZERO, TY_Init(), TY_is_incomplete(), TY_is_packed, TY_is_varargs, TY_kind, TY_mtype, TY_pointed, TY_size, Ty_Table, Tylist_Table, TYPE_DST_IDX(), TYPE_FIELD_IDS_USED(), TYPE_ID, Type_Size_Without_Vbases(), TYPE_TY_IDX(), TYPE_UNQUALIFIED, UINT, variable_size(), WGEN_add_pragma_to_enclosing_regions(), WGEN_Expand_Decl(), WGEN_Expand_Expr(), WGEN_Keep_Zero_Length_Structs, WGEN_Set_ST_Addr_Saved(), WGEN_Stmt_Append(), wn, WN_CreateXpragma, WN_Div, WN_Intconst(), WN_kid0(), WN_Ldid(), WN_opcode(), WN_operator(), WN_PRAGMA_COPYIN_BOUND, WN_PRAGMA_LOCAL, WN_st(), and WN_Stid().

DST_INFO_IDX& DECL_DST_ABSTRACT_ROOT_IDX ( gs_t  t  ) 

Definition at line 2316 of file wgen_spin_symbol.cxx.

References abstract_root_map, and DST_INVALID_IDX.

DST_INFO_IDX& DECL_DST_FIELD_IDX ( gs_t  t  ) 

Definition at line 2288 of file wgen_spin_symbol.cxx.

References decl_field_idx_map, decl_idx_map, and DST_INVALID_IDX.

DST_INFO_IDX& DECL_DST_IDX ( gs_t  t  ) 

Definition at line 2251 of file wgen_spin_symbol.cxx.

References decl_idx_map, and DST_INVALID_IDX.

DST_INFO_IDX& DECL_DST_SPECIFICATION_IDX ( gs_t  t  ) 

Definition at line 2269 of file wgen_spin_symbol.cxx.

References decl_specification_idx_map, and DST_INVALID_IDX.

INT32& DECL_FIELD_ID ( gs_t  t  ) 

Definition at line 2237 of file wgen_spin_symbol.cxx.

References field_id_map.

BOOL& DECL_LABEL_DEFINED ( gs_t  t  ) 

Definition at line 2236 of file wgen_spin_symbol.cxx.

References bool_map.

LABEL_IDX& DECL_LABEL_IDX ( gs_t  t  ) 

Definition at line 2234 of file wgen_spin_symbol.cxx.

References label_idx_map.

ST* & DECL_ST2 ( gs_t  t  ) 

SYMTAB_IDX& DECL_SYMTAB_IDX ( gs_t  t  ) 

Definition at line 2233 of file wgen_spin_symbol.cxx.

References symtab_idx_map.

static void Do_Base_Types ( gs_t  type_tree  )  [static]

Definition at line 281 of file wgen_spin_symbol.cxx.

References basetypes, EMPTY, Get_TY(), and gs_operand().

static void dump_field ( gs_t  field  )  [static]

Definition at line 204 of file wgen_spin_symbol.cxx.

References DECL_FIELD_ID(), Get_Name(), and printf().

void erase_duplicates ( gs_t  decl  ) 

Definition at line 125 of file wgen_spin_symbol.cxx.

References count, duplicate_of, i, iter, and t2.

Referenced by build_decl().

BOOL& expanded_decl ( gs_t  t  ) 

BOOL& func_PU_uplevel ( gs_t  t  ) 

Definition at line 2225 of file wgen_spin_symbol.cxx.

References FmtAssert, GS_FUNCTION_DECL, and gs_tree_code().

Referenced by WFE_Start_Function(), and WGEN_Start_Function().

ST*& get_DECL_ST ( gs_t  t  ) 

static ST* get_duplicate_st ( gs_t  decl  )  [static]

Definition at line 150 of file wgen_spin_symbol.cxx.

References count, DECL_ST, duplicate_of, GS_FUNCTION_DECL, gs_tree_code(), i, iter, and NULL.

Referenced by Create_ST_For_Tree().

gs_t get_first_real_field ( gs_t  type_tree  ) 

Definition at line 242 of file wgen_spin_symbol.cxx.

References Is_True, lang_cplus, and NULL.

Referenced by Create_TY_For_Tree().

gs_t get_first_real_or_virtual_field ( gs_t  type_tree  ) 

static char* Get_Name ( gs_t  node  )  [static]

gs_t get_virtual_field ( gs_t  type_tree  ) 

Definition at line 229 of file wgen_spin_symbol.cxx.

References lang_cplus, and NULL.

Referenced by Create_TY_For_Tree().

LABEL_IDX& HANDLER_LABEL ( gs_t  t  ) 

Definition at line 2329 of file wgen_spin_symbol.cxx.

References handler_label_map.

bool is_empty_base_class ( gs_t  type_tree  ) 

Definition at line 322 of file wgen_spin_symbol.cxx.

References gs_tree_code(), and GS_TYPE_DECL.

gs_t& LABEL_SCOPE ( gs_t  t  ) 

Definition at line 2243 of file wgen_spin_symbol.cxx.

References label_scope_map.

gs_t lookup_attribute ( char *  attr_name,
gs_t  attr_list 
)

Definition at line 330 of file wgen_spin_symbol.cxx.

References gs_tree_code(), GS_TREE_LIST, is_attribute(), Is_True, and NULL.

gs_t next_real_field ( gs_t  type_tree,
gs_t  field 
)

void Push_Deferred_Function ( gs_t   ) 

Definition at line 136 of file wgen_decl.cxx.

References deferred_function_i, deferred_function_max, i, INT32, and realloc.

size_t Roundup ( size_t  offset,
int  alignment 
)

Definition at line 293 of file wgen_spin_symbol.cxx.

INT32& SCOPE_NUMBER ( gs_t  t  ) 

Definition at line 2239 of file wgen_spin_symbol.cxx.

References scope_number_map.

ST* Search_decl_arguments ( char *  name  ) 

Definition at line 1407 of file wgen_spin_symbol.cxx.

References DECL_ST, gs_identifier_pointer(), NULL, p, and strcmp().

Referenced by Create_ST_For_Tree().

void set_DECL_ST ( gs_t  t,
ST st 
)

ST*& TREE_STRING_ST ( gs_t  t  ) 

Definition at line 2235 of file wgen_spin_symbol.cxx.

References string_st_map.

DST_INFO_IDX& TYPE_DST_IDX ( gs_t  t  ) 

Definition at line 2302 of file wgen_spin_symbol.cxx.

References DST_INVALID_IDX, and type_idx_map.

INT32& TYPE_FIELD_IDS_USED ( gs_t  t  ) 

Definition at line 2238 of file wgen_spin_symbol.cxx.

References type_field_ids_used_map.

size_t Type_Size_Without_Vbases ( gs_t  type_tree  ) 

TY_IDX& TYPE_TY_IDX ( gs_t  t  ) 

Definition at line 2097 of file wgen_spin_symbol.cxx.

References ty_idx_map.

INT32& WEAK_WORKAROUND ( ST st  ) 

char* WGEN_Tree_Node_Name ( gs_t  op  ) 

Definition at line 8780 of file wgen_expr.cxx.


Variable Documentation

hash_map<gs_t, DST_INFO_IDX,ptrhash> abstract_root_map [static]

Definition at line 2079 of file wgen_spin_symbol.cxx.

hash_map<gs_t, BOOL, ptrhash> bool_map [static]

Definition at line 2069 of file wgen_spin_symbol.cxx.

Definition at line 103 of file wgen_decl.cxx.

hash_map<gs_t, DST_INFO_IDX,ptrhash> decl_field_idx_map [static]

Definition at line 2075 of file wgen_spin_symbol.cxx.

hash_map<gs_t, DST_INFO_IDX,ptrhash> decl_idx_map [static]

Definition at line 2074 of file wgen_spin_symbol.cxx.

hash_map<gs_t, DST_INFO_IDX,ptrhash> decl_specification_idx_map [static]

Definition at line 2076 of file wgen_spin_symbol.cxx.

hash_map<gs_t, ST*, ptrhash> decl_st2_map [static]

Definition at line 2094 of file wgen_spin_symbol.cxx.

Referenced by DECL_ST2().

std::multimap<gs_t, gs_t> duplicate_of

Definition at line 115 of file wgen_spin_symbol.cxx.

Referenced by add_duplicates(), erase_duplicates(), and get_duplicate_st().

hash_map<gs_t, INT32, ptrhash> field_id_map [static]

Definition at line 2070 of file wgen_spin_symbol.cxx.

Definition at line 817 of file toplev.c.

hash_map<gs_t, LABEL_IDX, ptrhash> handler_label_map [static]

Definition at line 2078 of file wgen_spin_symbol.cxx.

hash_map<gs_t, LABEL_IDX, ptrhash> label_idx_map [static]

Definition at line 2067 of file wgen_spin_symbol.cxx.

hash_map<gs_t, gs_t, ptrhash> label_scope_map [static]

Definition at line 2073 of file wgen_spin_symbol.cxx.

Definition at line 56 of file main.c.

hash_map<gs_t, INT32, ptrhash> scope_number_map [static]

Definition at line 2072 of file wgen_spin_symbol.cxx.

hash_map<gs_t, ST*, ptrhash> st_map [static]

Definition at line 2065 of file wgen_spin_symbol.cxx.

hash_map<gs_t, ST*, ptrhash> string_st_map [static]

Definition at line 2068 of file wgen_spin_symbol.cxx.

hash_map<gs_t, SYMTAB_IDX, ptrhash> symtab_idx_map [static]

Definition at line 2066 of file wgen_spin_symbol.cxx.

hash_map<gs_t, TY_IDX, ptrhash> ty_idx_map [static]

Definition at line 2064 of file wgen_spin_symbol.cxx.

hash_map<gs_t, INT32, ptrhash> type_field_ids_used_map [static]

Definition at line 2071 of file wgen_spin_symbol.cxx.

hash_map<gs_t, DST_INFO_IDX,ptrhash> type_idx_map [static]

Definition at line 2077 of file wgen_spin_symbol.cxx.


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