Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
irbdata.cxx File Reference
#include "defs.h"
#include "tracing.h"
#include "irbdata.h"
#include "ir_a2b_util.h"
Include dependency graph for irbdata.cxx:

Go to the source code of this file.

Classes

struct  find_inito_predicate
struct  EnumToStr_t
class  Print_INITV_fnctr

Functions

INITO_IDX New_INITO (ST_IDX st, INITV_IDX val)
INITV_IDX New_INITV (void)
void add_initv (INITV_IDX ninv, INITO_IDX ino, INITV_IDX inv)
INITV_IDX Copy_INITV (INITV_IDX parent_inv, INITO_IDX ino, INITV_IDX inv)
void INITV_Init_Integer (INITV_IDX inv, TYPE_ID mtype, INT64 val, UINT16 repeat)
void INITV_Init_Float (INITV_IDX inv, TYPE_ID mtype, double val, UINT16 repeat)
void INITV_Init_String (INITV_IDX inv, char *str, INT size, UINT16 repeat)
void INITV_Init_Symoff (INITV_IDX inv, ST *st, INT64 ofst, UINT16 repeat)
void INITV_Init_Label (INITV_IDX inv, LABEL_IDX lab, UINT16 repeat)
void INITV_Init_Symdiff (INITV_IDX inv, LABEL_IDX lab1, ST *st2, BOOL halfword, UINT16 repeat)
void INITV_Init_Pad (INITV_IDX inv, UINT32 pad_bytes)
void INITV_Init_Block (INITV_IDX inv, INITV_IDX bval, UINT16 repeat)
INITV_IDX Irb_Init_Symoff (INITO_IDX ino, INITV_IDX inv, mUINT16 repeat, ST *st, INT64 ofst)
INITV_IDX Irb_Init_Label (INITO_IDX ino, INITV_IDX inv, mUINT16 repeat, LABEL_IDX lab)
INITV_IDX Irb_Init_Symdiff (INITO_IDX ino, INITV_IDX inv, mUINT16 repeat, LABEL_IDX lab1, ST *st2, BOOL halfword)
INITV_IDX Irb_Init_Val (INITO_IDX ino, INITV_IDX inv, UINT32 repeat, TCON_IDX tc)
INITV_IDX Irb_Init_Pad (INITO_IDX ino, INITV_IDX inv, UINT32 pad_bytes)
INITV_IDX Irb_Init_Block (INITO_IDX ino, INITV_IDX inv, mUINT16 repeat)
static INITV_IDX Irb_Init_predefined_integer (INITO_IDX ino, INITV_IDX inv, INT32 repeat, TYPE_ID mtype, INT32 val)
INITV_IDX Irb_Init_Integer_Of_Type (TYPE_ID mtype, INT64 value, INT32 repeat, INITO_IDX ino, INITV_IDX inv)
INITV_IDX Irb_Init_Integer (INT size, INT64 value, INT32 repeat, INITO_IDX ino, INITV_IDX inv)
INITV_IDX Irb_Init_String (INT size, char *str, INT32 repeat, INITO_IDX ino, INITV_IDX inv)
INITO_IDX Find_INITO_For_Symbol (const ST *st)
template<class OP >
void For_all_initv (INITV_IDX idx, const OP op)
const char * InitvKind_Name (INITVKIND knd)
INITVKIND Name_To_InitvKind (const char *nm)
void Print_INITV (const INITV &initv)
void Print_INITVs (INITV_IDX idx)
void Print_INITVs (FILE *f, INITV_IDX idx)
void Print_INITO (const INITO &ino)
void Print_Inits (UINT level)
void dump_INITO_idx (INITO_IDX idx)
void dump_INITV_idx (INITV_IDX idx)
static UINT Get_INITV_Size (INITV_IDX inv)
UINT Get_INITO_Size (INITO_IDX ino)

Variables

EnumToStr_t InitvKindToNameTbl [INITVKIND_COUNT]

Function Documentation

void add_initv ( INITV_IDX  ninv,
INITO_IDX  ino,
INITV_IDX  inv 
) [inline]

Definition at line 84 of file irbdata.cxx.

References Inito_Table, Initv_Table, and Set_INITO_val().

Referenced by Copy_INITV(), Irb_Init_Block(), Irb_Init_Label(), Irb_Init_Pad(), Irb_Init_predefined_integer(), Irb_Init_Symdiff(), Irb_Init_Symoff(), and Irb_Init_Val().

Here is the call graph for this function:

INITV_IDX Copy_INITV ( INITV_IDX  parent_inv,
INITO_IDX  ino,
INITV_IDX  inv 
)

Definition at line 93 of file irbdata.cxx.

References add_initv(), idx, Initv_Table, and SEGMENTED_ARRAY< T, block_size >::New_entry().

Referenced by IPO_SYMTAB::Clone_INITVs_For_EH(), and Rename_INITV_Labels().

Here is the call graph for this function:

void dump_INITO_idx ( INITO_IDX  idx)

Definition at line 592 of file irbdata.cxx.

References Get_Trace_File(), Inito_Table, Print_INITO(), and Set_Trace_File_internal().

Here is the call graph for this function:

void dump_INITV_idx ( INITV_IDX  idx)

Definition at line 602 of file irbdata.cxx.

References Get_Trace_File(), Initv_Table, Print_INITV(), and Set_Trace_File_internal().

Here is the call graph for this function:

Definition at line 386 of file irbdata.cxx.

References For_all_until(), idx, Inito_Table, ST_IDX_level(), ST_st_idx(), ST_type(), and TY_is_shared().

Referenced by write_st::operator()(), ST2C_decl_var(), ST2C_Get_Common_Ty2c_List(), and ST2F_decl_var().

Here is the call graph for this function:

template<class OP >
void For_all_initv ( INITV_IDX  idx,
const OP  op 
)

Definition at line 403 of file irbdata.cxx.

References idx, INITV_next(), and Initv_Table.

Referenced by Print_INITVs().

Here is the call graph for this function:

Definition at line 654 of file irbdata.cxx.

References Get_INITV_Size(), INITO_val(), and INITV_next().

Here is the call graph for this function:

void INITV_Init_Block ( INITV_IDX  inv,
INITV_IDX  bval,
UINT16  repeat 
)

Definition at line 161 of file irbdata.cxx.

References INITV_Set_BLOCK(), and Initv_Table.

Here is the call graph for this function:

void INITV_Init_Float ( INITV_IDX  inv,
TYPE_ID  mtype,
double  val,
UINT16  repeat 
)

Definition at line 119 of file irbdata.cxx.

References Enter_tcon(), Host_To_Targ_Float(), INITV_Set_VAL(), and Initv_Table.

Here is the call graph for this function:

void INITV_Init_Integer ( INITV_IDX  inv,
TYPE_ID  mtype,
INT64  val,
UINT16  repeat 
)

Definition at line 106 of file irbdata.cxx.

References Enter_tcon(), Host_To_Targ(), INITV_Set_ONE(), INITV_Set_VAL(), INITV_Set_ZERO(), and Initv_Table.

Here is the call graph for this function:

void INITV_Init_Label ( INITV_IDX  inv,
LABEL_IDX  lab,
UINT16  repeat 
)

Definition at line 141 of file irbdata.cxx.

References INITV_Set_LABEL(), and Initv_Table.

Here is the call graph for this function:

void INITV_Init_Pad ( INITV_IDX  inv,
UINT32  pad_bytes 
)

Definition at line 155 of file irbdata.cxx.

References INITV_Set_PAD(), and Initv_Table.

Referenced by Assign_ST_To_Named_Section().

Here is the call graph for this function:

void INITV_Init_String ( INITV_IDX  inv,
char *  str,
INT  size,
UINT16  repeat 
)

Definition at line 126 of file irbdata.cxx.

References Enter_tcon(), Host_To_Targ_String(), INITV_Set_VAL(), Initv_Table, and MTYPE_STR.

Here is the call graph for this function:

void INITV_Init_Symdiff ( INITV_IDX  inv,
LABEL_IDX  lab1,
ST st2,
BOOL  halfword,
UINT16  repeat 
)

Definition at line 147 of file irbdata.cxx.

References INITV_Set_SYMDIFF(), Initv_Table, and ST_st_idx().

Here is the call graph for this function:

void INITV_Init_Symoff ( INITV_IDX  inv,
ST st,
INT64  ofst,
UINT16  repeat 
)

Definition at line 135 of file irbdata.cxx.

References INITV_Set_SYMOFF(), Initv_Table, and ST_st_idx().

Here is the call graph for this function:

const char* InitvKind_Name ( INITVKIND  knd)

Definition at line 449 of file irbdata.cxx.

References EnumToStr_t(), INITVKIND_COUNT, InitvKindToNameTbl, and ir_a2b::MapEnumToStr().

Here is the call graph for this function:

INITV_IDX Irb_Init_Block ( INITO_IDX  ino,
INITV_IDX  inv,
mUINT16  repeat 
)

Definition at line 238 of file irbdata.cxx.

References add_initv(), idx, INITV_Set_BLOCK(), Initv_Table, and SEGMENTED_ARRAY< T, block_size >::New_entry().

Referenced by emit_inits_for_symbol().

Here is the call graph for this function:

INITV_IDX Irb_Init_Integer ( INT  size,
INT64  value,
INT32  repeat,
INITO_IDX  ino,
INITV_IDX  inv 
)

Definition at line 280 of file irbdata.cxx.

References Irb_Init_Integer_Of_Type(), MTYPE_I1, MTYPE_I2, MTYPE_I4, and MTYPE_I8.

Here is the call graph for this function:

INITV_IDX Irb_Init_Integer_Of_Type ( TYPE_ID  mtype,
INT64  value,
INT32  repeat,
INITO_IDX  ino,
INITV_IDX  inv 
)

Definition at line 267 of file irbdata.cxx.

References Enter_tcon(), Host_To_Targ(), Irb_Init_predefined_integer(), and Irb_Init_Val().

Referenced by Irb_Init_Integer().

Here is the call graph for this function:

INITV_IDX Irb_Init_Label ( INITO_IDX  ino,
INITV_IDX  inv,
mUINT16  repeat,
LABEL_IDX  lab 
)

Definition at line 188 of file irbdata.cxx.

References add_initv(), idx, INITV_Set_LABEL(), Initv_Table, and SEGMENTED_ARRAY< T, block_size >::New_entry().

Here is the call graph for this function:

INITV_IDX Irb_Init_Pad ( INITO_IDX  ino,
INITV_IDX  inv,
UINT32  pad_bytes 
)

Definition at line 226 of file irbdata.cxx.

References add_initv(), idx, INITV_Set_PAD(), Initv_Table, and SEGMENTED_ARRAY< T, block_size >::New_entry().

Referenced by emit_inits_for_symbol().

Here is the call graph for this function:

static INITV_IDX Irb_Init_predefined_integer ( INITO_IDX  ino,
INITV_IDX  inv,
INT32  repeat,
TYPE_ID  mtype,
INT32  val 
) [static]

Definition at line 250 of file irbdata.cxx.

References add_initv(), idx, INITV_Set_ONE(), INITV_Set_ZERO(), Initv_Table, and SEGMENTED_ARRAY< T, block_size >::New_entry().

Referenced by Irb_Init_Integer_Of_Type().

Here is the call graph for this function:

INITV_IDX Irb_Init_String ( INT  size,
char *  str,
INT32  repeat,
INITO_IDX  ino,
INITV_IDX  inv 
)

Definition at line 305 of file irbdata.cxx.

References Enter_tcon(), Host_To_Targ_String(), Irb_Init_Val(), and MTYPE_STR.

Here is the call graph for this function:

INITV_IDX Irb_Init_Symdiff ( INITO_IDX  ino,
INITV_IDX  inv,
mUINT16  repeat,
LABEL_IDX  lab1,
ST st2,
BOOL  halfword 
)

Definition at line 200 of file irbdata.cxx.

References add_initv(), idx, INITV_Set_SYMDIFF(), Initv_Table, SEGMENTED_ARRAY< T, block_size >::New_entry(), and ST_st_idx().

Here is the call graph for this function:

INITV_IDX Irb_Init_Symoff ( INITO_IDX  ino,
INITV_IDX  inv,
mUINT16  repeat,
ST st,
INT64  ofst 
)

Definition at line 168 of file irbdata.cxx.

References add_initv(), idx, INITV_Set_SYMOFF(), Initv_Table, SEGMENTED_ARRAY< T, block_size >::New_entry(), and ST_st_idx().

Referenced by data_element_s::create_initv(), and create_initv().

Here is the call graph for this function:

INITV_IDX Irb_Init_Val ( INITO_IDX  ino,
INITV_IDX  inv,
UINT32  repeat,
TCON_IDX  tc 
)

Definition at line 214 of file irbdata.cxx.

References add_initv(), idx, INITV_Set_VAL(), Initv_Table, and SEGMENTED_ARRAY< T, block_size >::New_entry().

Referenced by data_element_s::create_initv(), create_initv(), Irb_Init_Integer_Of_Type(), and Irb_Init_String().

Here is the call graph for this function:

Definition at line 457 of file irbdata.cxx.

References EnumToStr_t(), INITVKIND_COUNT, InitvKindToNameTbl, and ir_a2b::MapStrToEnum().

Here is the call graph for this function:

INITV_IDX New_INITV ( void  )

Definition at line 76 of file irbdata.cxx.

References idx, Initv_Table, and SEGMENTED_ARRAY< T, block_size >::New_entry().

Referenced by Assign_ST_To_Named_Section().

Here is the call graph for this function:

void Print_INITO ( const INITO ino)

Definition at line 577 of file irbdata.cxx.

References INITO::Print(), and TFile.

Referenced by dump_INITO_idx(), Print_INITO(), and Print_Inits().

Here is the call graph for this function:

void Print_Inits ( UINT  level)

Definition at line 584 of file irbdata.cxx.

References SCOPE::inito_tab, Print_INITO(), Scope_tab, size, and SEGMENTED_ARRAY< T, block_size >::Size().

Here is the call graph for this function:

void Print_INITVs ( INITV_IDX  idx)

Definition at line 550 of file irbdata.cxx.

References For_all_initv().

Referenced by INITO::Print(), Print_INITV(), and Print_INITVs().

Here is the call graph for this function:

void Print_INITVs ( FILE *  f,
INITV_IDX  idx 
)

Definition at line 556 of file irbdata.cxx.

References Get_Trace_File(), Print_INITVs(), and Set_Trace_File_internal().

Here is the call graph for this function:


Variable Documentation

Initial value:
 {
  EnumToStr_t(INITVKIND_UNK,       "INITV_UNK"),
  EnumToStr_t(INITVKIND_SYMOFF,    "INITV_SYMOFF"),
  EnumToStr_t(INITVKIND_ZERO,      "INITV_ZERO"),
  EnumToStr_t(INITVKIND_ONE,       "INITV_ONE"),
  EnumToStr_t(INITVKIND_VAL,       "INITV_VAL"),
  EnumToStr_t(INITVKIND_BLOCK,     "INITV_BLOCK"),
  EnumToStr_t(INITVKIND_PAD,       "INITV_PAD"),
  EnumToStr_t(INITVKIND_SYMDIFF,   "INITV_SYMDIFF"),
  EnumToStr_t(INITVKIND_SYMDIFF16, "INITV_SYMDIFF16"),
  EnumToStr_t(INITVKIND_LABEL,     "INITV_LABEL"),
}

Definition at line 434 of file irbdata.cxx.

Referenced by InitvKind_Name(), and Name_To_InitvKind().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines