Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
pu_info.h File Reference
#include <elf.h>
#include "dwarf_DST_mem.h"
#include "symtab.h"
Include dependency graph for pu_info.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pu_info

Defines

#define PU_HEADER_VERSION   1
#define WT_SYMTAB   0x0 /* symbol table */
#define WT_TREE   0x1 /* WHIRL tree nodes */
#define WT_DEPGRAPH   0x2 /* dependence graph */
#define WT_PREFETCH   0x3 /* prefetch pointers */
#define WT_REGIONS   0x4 /* RID trees */
#define WT_FEEDBACK   0x5 /* feedback data */
#define WT_FREQ   0x6 /* obsolete */
#define WT_AC_INTERNAL   0x7 /* alias classification temporary */
#define WT_ALIAS_CLASS   0x8 /* alias classification */
#define WT_SUBSECTIONS   0x9 /* number of subsection types */
#define WT_PROC_SYM   -1 /* special value for proc sym state */
#define PU_HAS_GLOBALS
#define PU_HAS_NESTED_PU   0x2 /* has other PU nested under this one */
#define PU_IS_COMPILER_GENERATED   0x4 /* compiler_generated PU */
#define PU_IS_DRA_CLONE   0x8 /* clone generated for reshaped arrays */
#define PU_PREGS_RENUMBERED
#define PU_INTERNAL_MASK   0xf0000000
#define PU_DELETED   0x10000000 /* only used internally within IPA */
#define PU_Info_proc_sym(pu)   (pu)->proc_sym
#define PU_Info_proc_id(pu)   (pu)->proc_sym
#define PU_Info_subsect_offset(pu, scn)   (pu)->subsect[scn].offset
#define PU_Info_subsect_size(pu, scn)   (pu)->subsect[scn].u.size
#define PU_Info_subsect_ptr(pu, scn)   (pu)->subsect[scn].u.ptr
#define PU_Info_flags(pu)   (pu)->flags
#define PU_Info_pu_dst(pu)   (pu)->pu_dst
#define PU_Info_cu_dst(pu)   (pu)->cu_dst
#define PU_Info_cu_dst(pu)   (pu)->cu_dst
#define PU_Info_maptab(pu)   (pu)->maptab
#define PU_Info_next(pu)   (pu)->next
#define PU_Info_child(pu)   (pu)->child
#define Set_PU_Info_flags(pu, flag_value)   (pu)->flags |= (flag_value)
#define Clear_PU_Info_flags(pu, flag_value)   (pu)->flags &= ~(flag_value)
#define Is_Set_PU_Info_flags(pu, flag_value)   ((pu)->flags & (flag_value))
#define PU_Info_state(pu, ndx)   (Subsect_State)(((pu)->state >> (((ndx) + 1) << 1)) & 0x3)
#define Set_PU_Info_state(pu, ndx, st)
#define PU_Info_symtab_ptr(pu)   (LOCAL_SYMTAB_HEADER_TABLE *) PU_Info_subsect_ptr((pu), WT_SYMTAB)
#define PU_Info_tree_ptr(pu)   (WN *)PU_Info_subsect_ptr((pu), WT_TREE)
#define PU_Info_depgraph_ptr(pu)   (void *)PU_Info_subsect_ptr((pu), WT_DEPGRAPH)
#define PU_Info_regions_ptr(pu)   (struct region_id *)PU_Info_subsect_ptr((pu), WT_REGIONS)
#define PU_Info_feedback_ptr(pu)   (void *)PU_Info_subsect_ptr((pu), WT_FEEDBACK)
#define PU_Info_frequencies_ptr(pu)   (INT32 *) PU_Info_subsect_ptr((pu), WT_FREQ)
#define PU_Info_alias_class_ptr(pu)   (INT32 *) PU_Info_subsect_ptr((pu), WT_ALIAS_CLASS)
#define PU_Info_ac_internal_ptr(pu)   (void *) PU_Info_subsect_ptr((pu), WT_AC_INTERNAL)
#define Set_PU_Info_tree_ptr(pu, x)   PU_Info_subsect_ptr((pu), WT_TREE) = (void *)(x)
#define Set_PU_Info_symtab_ptr(pu, x)   PU_Info_subsect_ptr((pu), WT_SYMTAB) = (void *)(x)
#define Set_PU_Info_depgraph_ptr(pu, x)   PU_Info_subsect_ptr((pu), WT_DEPGRAPH) = (void *)(x)
#define Set_PU_Info_regions_ptr(pu, x)   PU_Info_subsect_ptr((pu), WT_REGIONS) = (void *)(x)
#define Set_PU_Info_feedback_ptr(pu, x)   PU_Info_subsect_ptr((pu), WT_FEEDBACK) = (void *)(x)
#define Set_PU_Info_frequencies_ptr(pu, x)   PU_Info_subsect_ptr((pu), WT_FREQ) = (void *) (x)
#define Set_PU_Info_alias_class_ptr(pu, x)   PU_Info_subsect_ptr((pu), WT_ALIAS_CLASS) = (void *) (x)
#define Set_PU_Info_ac_internal_ptr(pu, x)   PU_Info_subsect_ptr((pu), WT_AC_INTERNAL) = (void *) (x)
#define Set_PU_Info_pu_dst(pu, x)   PU_Info_pu_dst(pu) = x;
#define Set_PU_Info_cu_dst(pu, x)   PU_Info_cu_dst(pu) = x;

Typedefs

typedef struct pu_info PU_Info
typedef enum subsect_state Subsect_State

Enumerations

enum  subsect_state { Subsect_Missing = 0, Subsect_Exists = 1, Subsect_InMem = 2, Subsect_Written = 3 }

Functions

void PU_Info_init (PU_Info *pu)
INT Sizeof_PU_Infos (PU_Info *pu_tree)
INT Write_PU_Infos (PU_Info *pu_tree, char *base)
PU_InfoRead_PU_Infos (char *base, INT32 size, INT32 *p_num_PUs)
void Save_Local_Symtab (SYMTAB_IDX level, PU_Info *pu)
void Restore_Local_Symtab (PU_Info *pu)

Variables

PU_InfoCurrent_PU_Info

Define Documentation

#define Clear_PU_Info_flags (   pu,
  flag_value 
)    (pu)->flags &= ~(flag_value)

Definition at line 166 of file pu_info.h.

#define Is_Set_PU_Info_flags (   pu,
  flag_value 
)    ((pu)->flags & (flag_value))

Definition at line 167 of file pu_info.h.

Referenced by Post_LNO_Processing(), and Preprocess_PU().

#define PU_DELETED   0x10000000 /* only used internally within IPA */

Definition at line 99 of file pu_info.h.

#define PU_HAS_GLOBALS
Value:
0x1 /* has globals symbols in local symtab,
                                        i.e., ST_EXPORT != EXPORT_LOCAL */

Definition at line 91 of file pu_info.h.

Referenced by PDGCS_do_proc().

#define PU_HAS_NESTED_PU   0x2 /* has other PU nested under this one */

Definition at line 92 of file pu_info.h.

Referenced by PDGCS_new_proc().

#define PU_HEADER_VERSION   1

Definition at line 61 of file pu_info.h.

Referenced by Read_PU_Infos(), and Write_PU_Infos().

#define PU_Info_ac_internal_ptr (   pu)    (void *) PU_Info_subsect_ptr((pu), WT_AC_INTERNAL)

Definition at line 211 of file pu_info.h.

Definition at line 209 of file pu_info.h.

#define PU_Info_cu_dst (   pu)    (pu)->cu_dst

Definition at line 160 of file pu_info.h.

Referenced by PU_Info_init().

#define PU_Info_cu_dst (   pu)    (pu)->cu_dst

Definition at line 160 of file pu_info.h.

#define PU_Info_depgraph_ptr (   pu)    (void *)PU_Info_subsect_ptr((pu), WT_DEPGRAPH)

Definition at line 201 of file pu_info.h.

Referenced by LNO_Processing().

#define PU_Info_feedback_ptr (   pu)    (void *)PU_Info_subsect_ptr((pu), WT_FEEDBACK)

Definition at line 205 of file pu_info.h.

Referenced by ir_b2a_process_PUs(), and Preprocess_PU().

#define PU_Info_flags (   pu)    (pu)->flags

Definition at line 157 of file pu_info.h.

Referenced by PDGCS_do_proc(), PU_Info_init(), Read_PU_Infos(), and write_PU_fields().

#define PU_Info_frequencies_ptr (   pu)    (INT32 *) PU_Info_subsect_ptr((pu), WT_FREQ)

Definition at line 207 of file pu_info.h.

#define PU_Info_proc_id (   pu)    (pu)->proc_sym

Definition at line 143 of file pu_info.h.

Referenced by PU_Info_init(), and Read_PU_Infos().

#define PU_Info_pu_dst (   pu)    (pu)->pu_dst
#define PU_Info_regions_ptr (   pu)    (struct region_id *)PU_Info_subsect_ptr((pu), WT_REGIONS)

Definition at line 203 of file pu_info.h.

#define PU_Info_subsect_ptr (   pu,
  scn 
)    (pu)->subsect[scn].u.ptr

Definition at line 197 of file pu_info.h.

Referenced by process_pu(), Restore_Local_Symtab(), and Save_Local_Symtab().

#define PU_INTERNAL_MASK   0xf0000000

Definition at line 98 of file pu_info.h.

#define PU_IS_COMPILER_GENERATED   0x4 /* compiler_generated PU */

Definition at line 93 of file pu_info.h.

Referenced by DRA_Add_Clone(), Post_LNO_Processing(), and Preprocess_PU().

#define PU_IS_DRA_CLONE   0x8 /* clone generated for reshaped arrays */

Definition at line 94 of file pu_info.h.

Referenced by DRA_Add_Clone(), and Preprocess_PU().

Value:
0x10 /* Preopt for IPL has processed
                                        this PU; used to decide
                                        whether to repeat alias
                                        classification within preopt
                                        for LNO */

Definition at line 95 of file pu_info.h.

#define Set_PU_Info_ac_internal_ptr (   pu,
 
)    PU_Info_subsect_ptr((pu), WT_AC_INTERNAL) = (void *) (x)

Definition at line 228 of file pu_info.h.

Referenced by WN_write_tree().

#define Set_PU_Info_alias_class_ptr (   pu,
 
)    PU_Info_subsect_ptr((pu), WT_ALIAS_CLASS) = (void *) (x)

Definition at line 226 of file pu_info.h.

Referenced by WN_write_tree().

#define Set_PU_Info_cu_dst (   pu,
 
)    PU_Info_cu_dst(pu) = x;

Definition at line 233 of file pu_info.h.

Referenced by PDGCS_do_proc().

#define Set_PU_Info_depgraph_ptr (   pu,
 
)    PU_Info_subsect_ptr((pu), WT_DEPGRAPH) = (void *)(x)

Definition at line 218 of file pu_info.h.

Referenced by Backend_Processing(), DRA_Add_Clone(), and LNO_Processing().

#define Set_PU_Info_feedback_ptr (   pu,
 
)    PU_Info_subsect_ptr((pu), WT_FEEDBACK) = (void *)(x)

Definition at line 222 of file pu_info.h.

Referenced by WN_get_feedback().

#define Set_PU_Info_flags (   pu,
  flag_value 
)    (pu)->flags |= (flag_value)

Definition at line 165 of file pu_info.h.

Referenced by DRA_Add_Clone(), PDGCS_do_proc(), and PDGCS_new_proc().

#define Set_PU_Info_frequencies_ptr (   pu,
 
)    PU_Info_subsect_ptr((pu), WT_FREQ) = (void *) (x)

Definition at line 224 of file pu_info.h.

#define Set_PU_Info_pu_dst (   pu,
 
)    PU_Info_pu_dst(pu) = x;

Definition at line 231 of file pu_info.h.

Referenced by DRA_Add_Clone(), and PDGCS_do_proc().

#define Set_PU_Info_regions_ptr (   pu,
 
)    PU_Info_subsect_ptr((pu), WT_REGIONS) = (void *)(x)

Definition at line 220 of file pu_info.h.

#define Set_PU_Info_state (   pu,
  ndx,
  st 
)
#define Set_PU_Info_symtab_ptr (   pu,
 
)    PU_Info_subsect_ptr((pu), WT_SYMTAB) = (void *)(x)

Definition at line 216 of file pu_info.h.

Referenced by DRA_Add_Clone(), and Save_Local_Symtab().

#define Set_PU_Info_tree_ptr (   pu,
 
)    PU_Info_subsect_ptr((pu), WT_TREE) = (void *)(x)
#define WT_AC_INTERNAL   0x7 /* alias classification temporary */

Definition at line 82 of file pu_info.h.

Referenced by Read_Local_Info(), and WN_write_tree().

#define WT_ALIAS_CLASS   0x8 /* alias classification */

Definition at line 83 of file pu_info.h.

Referenced by Read_Local_Info(), WN_write_tree(), and Write_PU_Info().

#define WT_DEPGRAPH   0x2 /* dependence graph */
#define WT_FEEDBACK   0x5 /* feedback data */

Definition at line 80 of file pu_info.h.

Referenced by Preprocess_PU(), size_of_each_pu(), and WN_get_feedback().

#define WT_FREQ   0x6 /* obsolete */

Definition at line 81 of file pu_info.h.

Referenced by DRA_Add_Clone().

#define WT_PREFETCH   0x3 /* prefetch pointers */
#define WT_PROC_SYM   -1 /* special value for proc sym state */
#define WT_REGIONS   0x4 /* RID trees */

Definition at line 79 of file pu_info.h.

#define WT_SUBSECTIONS   0x9 /* number of subsection types */

Definition at line 85 of file pu_info.h.

Referenced by fdump_PU_Info_state(), Read_PU_Infos(), Sizeof_PU_Infos(), and Write_PU_Infos().

#define WT_SYMTAB   0x0 /* symbol table */
#define WT_TREE   0x1 /* WHIRL tree nodes */

Typedef Documentation

typedef struct pu_info PU_Info

Enumeration Type Documentation

Enumerator:
Subsect_Missing 
Subsect_Exists 
Subsect_InMem 
Subsect_Written 

Definition at line 180 of file pu_info.h.


Function Documentation

PU_Info* Read_PU_Infos ( char *  base,
INT32  size,
INT32 p_num_PUs 
)
void Restore_Local_Symtab ( PU_Info pu)

Definition at line 412 of file pu_info.cxx.

References Current_scope, FmtAssert, SAVED_SCOPE::Get_Scope(), PU_Info_proc_sym, PU_Info_state, PU_Info_symtab_ptr, PU_lexical_level(), Scope_tab, St_Table, Subsect_InMem, and WT_SYMTAB.

Referenced by DRA_Add_Clone(), and Preprocess_PU().

Here is the call graph for this function:

INT Sizeof_PU_Infos ( PU_Info pu_tree)

Definition at line 89 of file pu_info.cxx.

References number_PU_Infos(), and WT_SUBSECTIONS.

Referenced by ir_size(), and WN_write_PU_Infos().

Here is the call graph for this function:

INT Write_PU_Infos ( PU_Info pu_tree,
char *  base 
)

Definition at line 144 of file pu_info.cxx.

References PU_HEADER_VERSION, write_PU_fields(), write_PU_subsect_info(), and WT_SUBSECTIONS.

Referenced by WN_write_PU_Infos().

Here is the call graph for this function:


Variable Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines