Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
mem_ctr.cxx File Reference
#include "mem_ctr.h"
#include "wn.h"
#include "stab.h"
#include "strtab.h"
#include "mtypes.h"
#include "targ_const.h"
#include "wn_util.h"
#include "config_targ.h"
#include "const.h"
#include "cxx_template.h"
#include "cxx_hash.h"
Include dependency graph for mem_ctr.cxx:

Go to the source code of this file.

Defines

#define Set_Parent(wn, p)   (WN_MAP_Set(Parent_Map, wn, (void*) p))
#define Get_Parent(wn)   ((WN*) WN_MAP_Get(Parent_Map, (WN*) wn))

Typedefs

typedef STACK< WN * > STACK_OF_WN
typedef HASH_TABLE< ST *, BOOLSTBOOL_HASH_TABLE

Functions

void MemCtr_Add (WN *pu)
static STDeclare_Function (char *ty_name, char *st_name, INT nparms, TY *ty_array[])
static void Set_Call_Side_Effects (WN *call_wn)
static void MemCtr_Init ()
static BOOL MemCtr_Criteria_Check (ST *st)
static void Parentize (WN *wn)
static void MemCtr_Add_Global (WN *pu, ST *st, STACK_OF_WN *altentry_stack)
static void MemCtr_Add_Common (WN *pu, ST *st, STACK_OF_WN *altentry_stack)
static void MemCtr_Add_Local (WN *pu, ST *st, STACK_OF_WN *altentry_stack, STACK_OF_WN *exit_stack)
static void Collect_Goodies (WN *pu, STACK_OF_WN *exit_stack, STACK_OF_WN *altentry_stack, STBOOL_HASH_TABLE *used_st_hash)
static STFind_Address_Base (WN *wn)
static STDeclare_Function (char *ty_name, char *st_name, INT nparms, TY_IDX ty_array[])
static BOOL Is_VLA (ST *st)
static void Insert_Call (WN *call_wn, WN *pu, STACK_OF_WN *altentry_stack)

Variables

static INT memctr_size = 8192
static STreg_st_global
static STreg_st_local
static STunreg_st_local
static STreg_st_common
static MEM_POOL memctr_pool
static WN_MAP Parent_Map = WN_MAP_UNDEFINED

Define Documentation

#define Get_Parent (   wn)    ((WN*) WN_MAP_Get(Parent_Map, (WN*) wn))

Definition at line 79 of file mem_ctr.cxx.

Referenced by Insert_Call(), and MemCtr_Add_Local().

#define Set_Parent (   wn,
 
)    (WN_MAP_Set(Parent_Map, wn, (void*) p))

Definition at line 78 of file mem_ctr.cxx.

Referenced by Insert_Call(), MemCtr_Add_Local(), and Parentize().


Typedef Documentation

typedef STACK<WN *> STACK_OF_WN

Definition at line 82 of file mem_ctr.cxx.

typedef HASH_TABLE<ST*, BOOL> STBOOL_HASH_TABLE

Definition at line 83 of file mem_ctr.cxx.


Function Documentation

static ST* Declare_Function ( char *  ty_name,
char *  st_name,
INT  nparms,
TY ty_array[] 
) [static]

Referenced by MemCtr_Init().

static ST* Find_Address_Base ( WN wn) [static]

Definition at line 202 of file mem_ctr.cxx.

References FmtAssert, NULL, OPR_ILOAD, OPR_ISTORE, OPR_LDA, OPR_LDID, St_Table, WN_kid0(), WN_kid1(), WN_operator(), and WN_st_idx().

Here is the call graph for this function:

static void Insert_Call ( WN call_wn,
WN pu,
STACK_OF_WN altentry_stack 
) [static]
static BOOL Is_VLA ( ST st) [static]

Definition at line 383 of file mem_ctr.cxx.

References FALSE, KIND_ARRAY, KIND_POINTER, SCLASS_AUTO, ST_base(), ST_sclass(), ST_type(), TRUE, TY_kind(), TY_pointed(), and TY_size().

Referenced by MemCtr_Add_Local().

Here is the call graph for this function:

static BOOL MemCtr_Criteria_Check ( ST st) [static]

Definition at line 378 of file mem_ctr.cxx.

References FALSE, memctr_size, ST_type(), TRUE, and TY_size().

Referenced by MemCtr_Add_Common(), MemCtr_Add_Global(), and MemCtr_Add_Local().

Here is the call graph for this function:

static void MemCtr_Init ( ) [static]

Definition at line 320 of file mem_ctr.cxx.

References Be_Type_Tbl, Declare_Function(), FALSE, Make_Pointer_Type(), MEM_POOL_Initialize, MTYPE_I8, MTYPE_U1, and TRUE.

Referenced by MemCtr_Add().

Here is the call graph for this function:

static void Parentize ( WN wn) [static]

Definition at line 173 of file mem_ctr.cxx.

References OPC_BLOCK, OPCODE_is_leaf(), Set_Parent, WN_first(), WN_kid(), WN_kid_count(), WN_next(), and WN_opcode().

Referenced by Insert_Call(), MemCtr_Add(), MemCtr_Add_Common(), MemCtr_Add_Global(), and MemCtr_Add_Local().

Here is the call graph for this function:

static void Set_Call_Side_Effects ( WN call_wn) [static]

Definition at line 316 of file mem_ctr.cxx.

References WN_Set_Call_Parm_Ref.

Referenced by MemCtr_Add_Common(), MemCtr_Add_Global(), and MemCtr_Add_Local().


Variable Documentation

Definition at line 76 of file mem_ctr.cxx.

INT memctr_size = 8192 [static]

Definition at line 63 of file mem_ctr.cxx.

Referenced by MemCtr_Criteria_Check().

Definition at line 77 of file mem_ctr.cxx.

Referenced by MemCtr_Add().

ST* reg_st_common [static]

Definition at line 68 of file mem_ctr.cxx.

ST* reg_st_global [static]

Definition at line 65 of file mem_ctr.cxx.

ST* reg_st_local [static]

Definition at line 66 of file mem_ctr.cxx.

ST* unreg_st_local [static]

Definition at line 67 of file mem_ctr.cxx.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines