Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
wn.cxx File Reference
#include <math.h>
#include <string.h>
#include "defs.h"
#include "stab.h"
#include "irbdata.h"
#include "wn.h"
#include "config_targ.h"
#include "wn_simp.h"
#include "wio.h"
#include "targ_const.h"
#include "const.h"
#include "strtab.h"
#include "config.h"
#include "fb_whirl.h"
#include "tracing.h"
Include dependency graph for wn.cxx:

Go to the source code of this file.

Classes

struct  winfo

Defines

#define WTYPE_base_type(w)   WINFO[w].base_type
#define WTYPE_comp_type(w)   WINFO[w].comp_type
#define WTYPE_size(w)   WINFO[w].size
#define WN_FREE_LIST_Empty(list)   (*(list) == NULL)
#define MAX_CLEANUP_FNS   8
#define New_Map_Id()   ((WN_MAP_ID) (-1))
#define NBITMASK(x)   ((1ll<<(x))-1)

Typedefs

typedef WNWN_FREE_LIST

Enumerations

enum  BTYPE {
  UNKNOWN_TYPE, INT_TYPE, UINT_TYPE, FLOAT_TYPE,
  COMPLEX_TYPE
}

Functions

BOOL Types_Are_Compatible (TYPE_ID ltype, WN *wn)
BOOL IPO_Types_Are_Compatible (TYPE_ID ltype, TYPE_ID rtype)
void Dont_Use_WN_Free_List (void)
void WN_FREE_LIST_Push (WN_FREE_LIST *list, WN *wn)
WNWN_FREE_LIST_Pop (WN_FREE_LIST *list)
WN_FREE_LISTWhich_WN_FREE_LIST (INT32 size)
void WN_Mem_Push (void)
void WN_Mem_Pop (void)
void IPA_WN_Delete (WN_MAP_TAB *maptab, WN *wn)
void IPA_WN_DELETE_Tree (WN_MAP_TAB *maptab, WN *tree)
void WN_Register_Delete_Cleanup_Function (void(*cleanup_fn)(WN *wn))
void WN_Remove_Delete_Cleanup_Function (void(*cleanup_fn)(WN *wn))
WNWN_Create (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, mINT16 kid_count)
WNWN_Create_Generic (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, mINT16 kid_count, WN *next, WN *prev, ST_IDX st, INT32 label_number, INT32 num_entries, TY_IDX ty, TY_IDX load_addr_ty, WN_OFFSET offset, INT16 cvtl_bits, INT32, WN_ESIZE element_size, INT64 const_value, UINT32 flag, INTRINSIC intrinsic)
BOOL WN_Equiv (WN *wn1, WN *wn2)
WNWN_CreateBlock (void)
WNWN_CreateDO (WN *index, WN *start, WN *end, WN *step, WN *body, WN *loop_info)
WNWN_CreateDoWhile (WN *test, WN *body)
WNWN_CreateWhileDo (WN *test, WN *body)
WNWN_CreateIf (WN *test, WN *if_then, WN *if_else)
static WNWN_block_element (WN *element)
INT32 New_Region_Id (void)
INT32 Last_Region_Id (void)
void Set_Max_Region_Id (INT id)
WNWN_CreateRegion (REGION_KIND kind, WN *body, WN *pragmas, WN *exits, INT region_id, INITO_IDX ereg_supp)
WNWN_CreateRegionExit (INT32 label_number)
WNWN_CreateEntry (INT16 nkids, ST_IDX name, WN *body, WN *pragmas, WN *varrefs)
WNWN_CreateGoto (INT32 label_number)
WNWN_CreateGotoOuterBlock (INT32 label_number, SYMTAB_IDX label_level)
WNWN_CreateAgoto (WN *addr)
WNWN_CreateAltentry (ST_IDX entry)
WNWN_CreateTruebr (INT32 label_number, WN *exp)
WNWN_CreateFalsebr (INT32 label_number, WN *exp)
WNWN_CreateReturn (void)
WNWN_CreateReturn_Val (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN *val)
WNWN_CreateLabel (INT32 label_number, UINT32 label_flag, WN *loop_info)
WNWN_CreateCompgoto (INT32 num_entries, WN *value, WN *block, WN *deflt, INT32 last_label)
WNWN_CreateSwitch (INT32 num_entries, WN *value, WN *block, WN *deflt, INT32 last_label)
WNWN_CreateCasegoto (INT64 case_value, INT32 case_label)
WNWN_CreateXgoto (INT32 num_entries, WN *value, WN *block, ST_IDX st)
WNWN_CreateIstore (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN_OFFSET offset, TY_IDX ty, WN *value, WN *addr, UINT field_id)
WNWN_CreatePstore (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN_OFFSET offset, TY_IDX ty, WN *value, WN *addr, UINT field_id)
WNWN_CreateIstorex (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, TY_IDX ty, WN *value, WN *addr1, WN *addr2)
WNWN_CreatePrefetchx (UINT32 flag, WN *addr1, WN *addr2)
WNWN_CreateMstore (WN_OFFSET offset, TY_IDX ty, WN *value, WN *addr, WN *num_bytes)
WNWN_CreateStid (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN_OFFSET offset, ST *st, TY_IDX ty, WN *value, UINT field_id)
WNWN_CreatePStid (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN_OFFSET offset, ST *st, TY_IDX ty, WN *value, UINT field_id)
WNWN_CreatePrefetch (WN_OFFSET offset, UINT32 flag, WN *addr)
WNWN_CreateIo (IOSTATEMENT iostatement, mINT16 kid_count)
WNWN_CreateIoItem0 (IOITEM ioitem, TY_IDX ty)
WNWN_CreateIoItem1 (IOITEM ioitem, WN *kid0, TY_IDX ty)
WNWN_CreateIoItem2 (IOITEM ioitem, WN *kid0, WN *kid1, TY_IDX ty)
WNWN_CreateIoItem3 (IOITEM ioitem, WN *kid0, WN *kid1, WN *kid2, TY_IDX ty)
WNWN_CreateIoItemN (IOITEM ioitem, mINT16 kid_count, TY_IDX ty)
WNWN_CreateEval (WN *exp)
WNWN_CreatePragma (WN_PRAGMA_ID pragma_name, ST_IDX st, INT32 arg1, INT32 arg2)
WNWN_CreatePragma (WN_PRAGMA_ID pragma_name, ST_IDX st, INT32 arg1, PREG_NUM asm_copyout_preg, UINT32 asm_opnd_num)
WNWN_CreateXpragma (WN_PRAGMA_ID pragma_name, ST_IDX st, INT16 kid_count)
WNWN_CreateExp0 (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc)
WNWN_CreateExp1 (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN *kid0)
WNWN_CreateExp2 (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN *kid0, WN *kid1)
WNWN_CreateExp3 (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN *kid0, WN *kid1, WN *kid2)
WNWN_CreateCvtl (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, INT16 cvtl_bits, WN *kid0)
WNWN_CreateIload (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN_OFFSET offset, TY_IDX ty, TY_IDX load_addr_ty, WN *addr, UINT field_id)
WNWN_CreateIloadx (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, TY_IDX ty, TY_IDX load_addr_ty, WN *addr1, WN *addr2)
WNWN_CreateMload (WN_OFFSET offset, TY_IDX ty, WN *addr, WN *num_bytes)
WNWN_CreateLdid (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN_OFFSET offset, ST_IDX st, TY_IDX ty, UINT field_id)
WNWN_CreateLda (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN_OFFSET offset, TY_IDX ty, ST_IDX st, UINT field_id)
WNWN_CreateIlda (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN_OFFSET offset, TY_IDX ty)
WNWN_CreateIdname (WN_OFFSET offset, ST_IDX st)
WNWN_CreateConst (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, ST_IDX st)
WNWN_CreateIntconst (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, INT64 const_val)
WNWN_CreateComma (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN *block, WN *value)
WNWN_CreateRcomma (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN *value, WN *block)
WNWN_CreateAsm_Stmt (INT16 kid_count, char *asm_string)
WNWN_CreateAsm_Input (char *constraint_string, UINT32 opnd_num, WN *value)
WNWN_CreateComment (char *s)
STR_IDX WN_GetComment (const WN *wn)
WNWN_CopyNode (const WN *src_wn)
void IPA_WN_Move_Maps_PU (WN_MAP_TAB *src, WN_MAP_TAB *dst, WN *wn)
INT32 WN_Size_and_StartAddress (WN *wn, void **StartAddress)
WNWN_CreateLoopInfo (WN *induction, WN *trip, UINT16 trip_est, UINT16 depth, INT32 flags)
WNWN_CreateExcScopeBegin (INT32 id, INT16 nkids, INITO_IDX ereg_supp)
WNWN_CreateExcScopeEnd (INT32 id)
WNWN_CreateBarrier (BOOL forward, INT16 nkids)
WNWN_CreateTrap (INT32 value)
WNWN_CreateAssert (INT32 value, WN *condition)
WNWN_Zerocon (TYPE_ID ty)
WNWN_Tas (TYPE_ID rtype, TY_IDX ty, WN *l)
WNWN_Create_Intrinsic (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, INTRINSIC intrinsic, INT32 n, WN *kids[])
WNWN_CreateParm (TYPE_ID rtype, WN *parm_node, TY_IDX ty, UINT32 flag)
WNWN_Intconst (TYPE_ID rtype, INT64 value)
WNWN_Ldid (TYPE_ID desc, WN_OFFSET offset, ST_IDX sym, TY_IDX align, UINT field_id)
WNWN_RLdid (TYPE_ID rtype, TYPE_ID desc, WN_OFFSET offset, ST_IDX sym, TY_IDX align)
WNWN_LdidPreg (TYPE_ID desc, WN_OFFSET pregno)
WNWN_Stid (TYPE_ID desc, WN_OFFSET offset, ST *sym, TY_IDX align, WN *value, UINT field_id)
WNWN_PStid (TYPE_ID desc, WN_OFFSET offset, ST *sym, TY_IDX align, WN *value, UINT field_id)
WNWN_StidIntoPreg (TYPE_ID desc, WN_OFFSET offset, ST *preg, WN *value)
WNWN_Iload (TYPE_ID desc, WN_OFFSET offset, TY_IDX align, WN *addr, UINT field_id)
WNWN_RIload (TYPE_ID rtype, TYPE_ID desc, WN_OFFSET offset, TY_IDX align, WN *addr)
WNWN_Pstore (TYPE_ID desc, WN_OFFSET offset, TY_IDX align, WN *addr, WN *value, UINT field_id)
WNWN_Istore (TYPE_ID desc, WN_OFFSET offset, TY_IDX align, WN *addr, WN *value, UINT field_id)
WNWN_Unary (OPERATOR opr, TYPE_ID rtype, WN *l)
WNWN_Binary (OPERATOR opr, TYPE_ID rtype, WN *l, WN *r)
WNWN_Ternary (OPERATOR opr, TYPE_ID rtype, WN *kid0, WN *kid1, WN *kid2)
WNWN_IloadLdid (TYPE_ID desc, WN_OFFSET offset, TY_IDX align, ST *sym, WN_OFFSET symOffset)
WNWN_Cvt (TYPE_ID desc, TYPE_ID rtype, WN *l)
WNWN_Trunc (TYPE_ID desc, TYPE_ID rtype, WN *l)
WNWN_Rnd (TYPE_ID desc, TYPE_ID rtype, WN *l)
WNWN_Ceil (TYPE_ID desc, TYPE_ID rtype, WN *l)
WNWN_Floor (TYPE_ID desc, TYPE_ID rtype, WN *l)
WNWN_Relational (OPERATOR opr, TYPE_ID rtype, WN *l, WN *r)
WNWN_ConstPowerOf2 (TYPE_ID type, INT32 n)
WNWN_Floatconst (TYPE_ID type, double value)
WNWN_UVConst (TYPE_ID type)
WNWN_RotateIntconst (WN *tree, INT32 rotate)
WNWN_Inverse (TYPE_ID type, WN *tree)
WNWN_Lda (TYPE_ID rtype, WN_OFFSET ldaOffset, ST *sym, UINT field_id)
WNWN_LdaLabel (TYPE_ID rtype, INT32 label_number)
WNWN_Icall (TYPE_ID rtype, TYPE_ID desc, INT32 n, TY_IDX ty)
WNWN_generic_call (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, INT32 n, ST_IDX sym)
void WN_CopyMap (WN *dst, WN_MAP map, const WN *src)
WNWN_Int_Type_Conversion (WN *wn, TYPE_ID to_type)
WNWN_Float_Type_Conversion (WN *wn, TYPE_ID to_type)
WNWN_Type_Conversion (WN *wn, TYPE_ID to_type)
WNWN_Iloadx (TYPE_ID rtype, TY_IDX ty, TY_IDX addr_ty, WN *base, WN *index)
WNWN_Istorex (TYPE_ID desc, TY_IDX ty, WN *value, WN *base, WN *index)
WNWN_LdaString (char *str, WN_OFFSET ldaOffset, INT32 len)
WNWN_CreateAffirm (WN *condition)
WNWN_CreateAlloca (WN *size)
WNWN_CreateDealloca (INT32 nkids)
WNWN_CreateLdma (TYPE_ID rtype, WN_OFFSET offset, TY_IDX ty, ST_IDX st, UINT field_id)
void WN_set_st_addr_saved (WN *wn)
BOOL WN_has_side_effects (const WN *wn)
WNWN_Rrotate (TYPE_ID desc, WN *src, WN *cnt)

Variables

MEM_POOL WN_mem_pool
MEM_POOLWN_mem_pool_ptr = &WN_mem_pool
BOOL WN_mem_pool_initialized = FALSE
static struct winfo WINFO [MTYPE_LAST+1]
static BOOL use_free_list = TRUE
WN_FREE_LIST free_stmt_list
WN_FREE_LIST free_expr_list
static void(* delete_cleanup_fns [MAX_CLEANUP_FNS])(WN *wn)
static UINT16 num_delete_cleanup_fns = 0
static INT32 last_region_id = 0

Define Documentation

#define MAX_CLEANUP_FNS   8

Definition at line 373 of file wn.cxx.

Referenced by WN_Register_Delete_Cleanup_Function().

#define NBITMASK (   x)    ((1ll<<(x))-1)

Definition at line 2582 of file wn.cxx.

Referenced by WN_RotateIntconst().

#define New_Map_Id ( )    ((WN_MAP_ID) (-1))

Definition at line 489 of file wn.cxx.

Referenced by WN_Create().

#define WN_FREE_LIST_Empty (   list)    (*(list) == NULL)

Definition at line 259 of file wn.cxx.

Referenced by WN_Create().

#define WTYPE_base_type (   w)    WINFO[w].base_type

Definition at line 127 of file wn.cxx.

Referenced by IPO_Types_Are_Compatible(), and Types_Are_Compatible().

#define WTYPE_comp_type (   w)    WINFO[w].comp_type

Definition at line 128 of file wn.cxx.

Referenced by IPO_Types_Are_Compatible(), and Types_Are_Compatible().

#define WTYPE_size (   w)    WINFO[w].size

Definition at line 129 of file wn.cxx.

Referenced by IPO_Types_Are_Compatible().


Typedef Documentation

typedef WN* WN_FREE_LIST

Definition at line 251 of file wn.cxx.


Enumeration Type Documentation

enum BTYPE
Enumerator:
UNKNOWN_TYPE 
INT_TYPE 
UINT_TYPE 
FLOAT_TYPE 
COMPLEX_TYPE 

Definition at line 92 of file wn.cxx.


Function Documentation

void Dont_Use_WN_Free_List ( void  )

Definition at line 267 of file wn.cxx.

References FALSE.

void IPA_WN_DELETE_Tree ( WN_MAP_TAB maptab,
WN tree 
)

Definition at line 420 of file wn.cxx.

References IPA_WN_Delete(), IPA_WN_DELETE_Tree(), next, NULL, OPC_BLOCK, WN_first(), WN_kid(), WN_kid_count(), WN_next(), and WN_opcode().

Referenced by IPA_WN_DELETE_Tree().

Here is the call graph for this function:

BOOL IPO_Types_Are_Compatible ( TYPE_ID  ltype,
TYPE_ID  rtype 
)

Definition at line 197 of file wn.cxx.

References FALSE, INT_TYPE, UINT_TYPE, WTYPE_base_type, WTYPE_comp_type, and WTYPE_size.

INT32 Last_Region_Id ( void  )

Definition at line 795 of file wn.cxx.

References last_region_id.

INT32 New_Region_Id ( void  )

Definition at line 790 of file wn.cxx.

References last_region_id.

Referenced by WN_CreateRegion().

void Set_Max_Region_Id ( INT  id)

Definition at line 803 of file wn.cxx.

References MAX.

Referenced by fix_tree(), WN_get_tree(), and WN_write_tree().

BOOL Types_Are_Compatible ( TYPE_ID  ltype,
WN wn 
)

Intermediate Language Tree Nodes --------------------------------

Description:

This module provides the routines to create and manipulate wns.

Exported functions:

WN *WN_Create( OPERATOR operator, TYPE_ID rtype, TYPE_ID desc, mINT16 kid_count )

Creates and returns a WN with the given 'opcode'. 'Kid_count' give the number of kids when this is not determined by the 'opcode' and is ignored otherwise. The 'opcode', 'kid_count', and 'map_id' fields are initialized. The initial values of all other fields are undefined.

WN *WN_Create_Generic( OPERATOR operator, TYPE_ID rtype, TYPE_ID desc, mINT16 kid_count, WN *next, WN *prev, ST *st, INT32 label_number, INT32 num_entries, TY *ty, TY *load_addr_ty, WN_OFFSET offset, INT16 cvtl_bits, INT32 num_dim WN_ESIZE element_size INT64 const_value, UINT32 flag, INTRINSIC intrinsic)

Call WN_Create and then fill in all the fields relevant for opcode

Higher level Create routines.

These are routines built on top of WN_Create to allow one to create different types of nodes. They include a fair amount of error checking for conformance to WHIRL rules. Every control flow and statment has its own create function. This is necessary as most have distinct internal fields. For expressions with additional internal fields, we also supply operator specific create functions, but for most expressions, we provide generic (based on number of kids) create routines.

WN *WN_CreateBlock(void) WN *WN_CreateDO( WN *index, WN *start, WN *end, WN *step, WN *body) WN *WN_CreateDoWhile( WN *test, WN *body) WN *WN_CreateWhileDo( WN *test, WN *body) WN *WN_CreateIf( WN *test, WN *then, WN *else) WN *WN_CreateRegion( REGION_KIND kind, WN *body, WN *pragmas, WN *exits, INT region_id, struct inito * ereg_sup) WN *WN_CreateRegionExit( ST *st, INT32 label_number) WN *WN_CreateGoto( ST *st, INT32 label_number) WN *WN_CreateAgoto( WN *addr) WN *WN_CreateAltentry( ST *entry) WN *WN_CreateTruebr( INT32 label_number, WN *exp) WN *WN_CreateFalsebr( INT32 label_number, WN *exp) WN *WN_CreateReturn(void) WN *WN_CreateLabel( ST *label, INT32 label_number, UINT32 label_flag, WN *loop_info) WN *WN_CreateCompgoto( INT32 num_entries, WN *value, WN *block, WN *deflt, INT32 last_label) WN *WN_CreateSwitch( INT32 num_entries, WN *value, WN *block, WN *deflt, INT32 last_label) if last_label for Compgoto and Switch is 0, then don't know last_label (and regions can ignore switch heirarchy). WN *WN_CreateCasegoto( INT64 case_value, INT32 case_label_number) WN *WN_CreateXgoto( INT32 num_entries, WN *value, WN *block, ST *st) WN *WN_CreateIstore( OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN_OFFSET offset, TY_IDX ty,WN *value, WN *addr, UINT field_id) WN *WN_CreatePstore( OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN_OFFSET offset, TY_IDX ty,WN *value, WN *addr, UINT field_id)

WN *WN_CreateIstorex( OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, TY_IDX ty,WN *value, WN *addr1, WN *addr2) WN *WN_CreateMstore( WN_OFFSET offset, TY_IDX ty, WN *value, WN *addr,WN *num_bytes) WN *WN_CreateStid( OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN_OFFSET offset, ST *st, TY_IDX ty,WN *value, UINT field_id) WN *WN_CreatePStid( OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN_OFFSET offset, ST *st, TY_IDX ty,WN *value, UINT field_id) WN *WN_CreatePrefetch(WN_OFFSET offset, UINT32 flag, WN *addr) WN *WN_CreatePrefetchx(UINT32 flag, WN *addr1, WN *addr2) WN *WN_CreateIo(IOSTATEMENT iostatement, mINT16 kid_count) WN *WN_CreateIoItem0(IOITEM ioitem, TY_IDX ty) WN *WN_CreateIoItem1(IOITEM ioitem, WN *kid0, TY_IDX ty) WN *WN_CreateIoItem2(IOITEM ioitem, WN *kid0, WN *kid1, TY_IDX ty) WN *WN_CreateIoItem3(IOITEM ioitem, WN *kid0, WN *kid1, WN *kid2, TY_IDX ty) WN *WN_CreateIoItemN(IOITEM ioitem, mINT16 kid_count, TY_IDX ty) WN *WN_CreateEval( WN *exp) WN *WN_CreatePragma(WN_PRAGMA_ID pragma_name, ST *st, INT64 const_val) WN *WN_CreateExp0( OPERATOR opr, TYPE_ID rtype, TYPE_ID desc) WN *WN_CreateExp1( OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN *kid0) WN *WN_CreateExp2( OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN *kid0, WN *kid1) WN *WN_CreateExp3( OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN *kid0, WN *kid1, WN *kid2) WN *WN_CreateCvtl( OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, INT16 bits, WN *kid0) WN *WN_CreateIload( OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN_OFFSET offset, TY_IDX ty, TY_IDX load_addr_ty,WN *addr, UINT field_id) WN *WN_CreateIloadx( OPCODE opr, TYPE_ID rtype, TYPE_ID desc, TY_IDX ty,TY_IDX load_addr_ty,WN *addr1, WN *addr2) WN *WN_CreateMload( WN_OFFSET offset, TY_IDX ty,WN *addr, WN *num_bytes) WN *WN_CreateLdid( OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN_OFFSET offset, ST *st, TY_IDX ty, UINT field_id) WN *WN_CreateLda( OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN_OFFSET offset, TY_IDX ty, ST *st, UINT field_id) WN *WN_CreateIlda( OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, WN_OFFSET offset, TY_IDX ty) WN *WN_CreateIdname( WN_OFFSET offset,ST *st) WN *WN_CreateConst( OPERATOR opr, TYPE_ID rtype, TYPED_ID desc, ST *st ) WN *WN_CreateIntconst( OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, INT64 const_val)

void IPA_WN_Delete( WN_MAP_TAB *maptab, WN *wn ) void WN_Delete( WN *wn )

Delete the given 'wn' and make the node storage available for reallocation. Also add the map_id to the free list in the map table.

void IPA_WN_DELETE_Tree( WN_MAP_TAB *maptab, WN *tree )

Recursively delete the given whirl 'tree' and make the node storage available for reallocation. Also adds each node's map_id to the free list in the appropriate map table. Note that this is the PU context-specific version of WN_DELETE_Tree in wn_util. However; wn_util has no knowledge of WN_MAP_TAB's so the routine is placed here.

void WN_Register_Delete_Cleanup_Function(void (*cleanup_fn)(WN *wn)) Register <cleanup_fn> so that it is called just before a node is deleted. The node being deleted is passed to the cleanup function. If <cleanup_fn> was already registered, this call has no effect. Registered cleanup functions are invoked in an arbitrary order.

void WN_Remove_Delete_Cleanup_Function(void (*cleanup_fn)(WN *wn)) Stop calling the given <cleanup_fn> each time a node is deleted.

void WN_Mem_Push(void) Saves the WN memory state for later restoration by WN_Mem_Pop.

void WN_Mem_Pop(void) Deallocates all WN nodes created since the last call to WN_Mem_Push.

WN *WN_CopyNode ( const WN* src_wn )

Return a copy of a given src_wn. It does a shallow copy, i.e. only the current node, no children. Pointers to next/prev or to kids are NOT copied. Furthermore, no annotations are copied.

BOOL WN_Equiv(WN *wn1, WN *wn2)

Ignoring children and next-previous pointers, are wn1 and wn2 equivalent

void IPA_WN_Move_Maps ( WN_MAP_TAB *maptab, WN *dst, WN *src ) void WN_Move_Maps ( WN *dst, WN *src )

Move the information stored in the map table for one WN to another WN.

void IPA_WN_Move_Maps_PU( WN_MAP_TAB *src, WN_MAP_TAB *dst, WN *wn)

Move wn's mapping information from the source to the destination table. This is used when a WN is moved from one PU to another This assumes the destination table will contain the same WN_MAPs as the source.

These are much needed higher level routines built on the WN_Create to build WN. Most of them determine the opcode based on type information supplied.

WN *WN_Intconst ( TYPE_ID rtype, INT64 value ) Return an integer constant node of value

WN *WN_RotateIntconst( WN *tree INT32 rotate ) Rotate intconst bits right (rotate>0) or left (rotate<0)

WN *WN_Inverse ( TYPE_ID type, WN *tree ) Return a recip or divide base on type and flags

WN *WN_Floatconst ( TYPE_ID rtype, double value ) Return an floating point constant node of value

WN *WN_UVConst( TYPE_ID rtype, ) Return the correct bit pattern for an uninitialized variable

WN * WN_Zerocon ( TYPE_ID ty ) Return a zero of type ty

WN *WN_Ldid ( TYPE_ID desc, WN_OFFSET offset, ST *sym, TY_IDX align, UINT field_id ) Return a LDID (with offset) of type desc. The rtype is computed from ST. Alignment must be specified

WN *WN_RLdid ( TYPE_ID rtype, TYPE_ID desc, WN_OFFSET offset, ST *sym, TY_IDX align ) Return a LDID (with offset) of type rtype, desc. Alignment must be specified

WN *WN_LdidPreg ( TYPE_ID desc, WN_OFFSET pregno ) Return a LDID of a given preg.

WN *WN_Stid ( TYPE_ID desc, WN_OFFSET offset, ST *sym, TY_IDX align, WN *value, UINT field_id ) STID (with offset) value into sym of type desc. Alignment must be specified

WN *WN_StidIntoPreg( TYPE_ID desc, WN_OFFSET offset, ST *sym, WN *value ) STID (with offset) value into sym of type desc. Alignment is inferred from sym

WN *WN_StidPreg( TYPE_ID desc, WN_OFFSET offset, WN *value ) STID (with offset) value into sym of type desc. Alignment is inferred from sym This is a simplified interface to StidIntoPreg, where the preg sym Is inferred from the type.

WN *WN_Iload ( TYPE_ID desc, WN_OFFSET offset, TY_IDX align, WN *addr, UINT field_id ) Return a ILOAD (with offset) of type desc. The rtype is computed from desc Alignment must be specified

WN *WN_RIload ( TYPE_ID rtype, TYPE_ID desc, WN_OFFSET offset, TY_IDX align, WN *addr ) Return a ILOAD (with offset) of type rtype, desc. Alignment must be specified

WN *WN_Istore ( TYPE_ID desc, WN_OFFSET offset, TY_IDX align, WN *addr, WN *value, UINT field_id ) Return a ISTORE (with offset) of type desc. Alignment must be specified

WN *WN_Pstore ( TYPE_ID desc, WN_OFFSET offset, TY_IDX align, WN *addr, WN *value, UINT field_id ) Return a PSTORE (with offset) of type desc. Alignment must be specified

WN *WN_Unary( OPERATOR opr, TYPE_ID rtype, WN *l ) Return a unary operator opr with opcode of type rtype. The following macros use this as a common base WN_LNOT(WN *l) WN_Bnot(TYPE_ID type, WN *l) WN_Realpart(TYPE_ID rtype, WN *l) WN_Imagpart(TYPE_ID rtype, WN *l) WN_Paren(TYPE_ID rtype, WN *l)

WN *WN_Binary ( OPERATOR opr, TYPE_ID rtype, WN *l, WN *r ) Return a binary operator opr with opcode of type rtype. The following macros use this as a common base WN_Add(TYPE_ID rtype, WN *l, WN *r) WN_Sub(TYPE_ID rtype, WN *l, WN *r) WN_Mpy(TYPE_ID rtype, WN *l, WN *r) WN_Div(TYPE_ID rtype, WN *l, WN *r)

WN_LAND(WN *l, WN *r) WN_LIOR(WN *l, WN *r)

WN_Band(TYPE_ID rtype, WN *l, WN *r) WN_Bior(TYPE_ID rtype, WN *l, WN *r) WN_Bxor(TYPE_ID rtype, WN *l, WN *r)

WN_Lshr(TYPE_ID rtype, WN *l, WN *r) WN_Ashr(TYPE_ID rtype, WN *l, WN *r) WN_Shl(TYPE_ID rtype, WN *l, WN *r)

WN_Complex(TYPE_ID rtype, WN *l, WN *r)

WN *WN_Ternary( OPERATOR opr, TYPE_ID rtype, WN *kid0, WN *kid1, WN *kid2 ) Return a ternary operator opr with opcode of type rtype. The following macros use this as a common base WN_Select(TYPE_ID rtype, WN *rel, WN *true, WN *false)

WN *WN_IloadLdid ( TYPE_ID desc, WN_OFFSET offset, TY_IDX align, ST *sym, WN_OFFSET symOffset ) Return a ILOAD (with offset) of type desc with and address of LDID (with symOffset) of Pointer_type. Alignment must be specified

WN *WN_Cvt( TYPE_ID desc, TYPE_ID rtype, WN *l, WN *r ) Return a cvt operator with opcode of type desc -> rtype,

WN *WN_Trunc( TYPE_ID desc, TYPE_ID rtype, WN *l, WN *r ) round to zero Return a trunc operator with opcode of type desc -> rtype,

WN *WN_Rnd( TYPE_ID desc, TYPE_ID rtype, WN *l, WN *r ) round to nearest int Return a rnd operator with opcode of type desc -> rtype

WN *WN_Ceil( TYPE_ID desc, TYPE_ID rtype, WN *l, WN *r ) round to +infinity Return a ceil operator with opcode of type desc -> rtype,

WN *WN_Floor( TYPE_ID desc, TYPE_ID rtype, WN *l, WN *r ) round to -infinity Return a floor operator with opcode of type desc -> rtype,

WN * WN_Int_Type_Conversion( WN *wn, TYPE_ID to_type )

Return the integer-typed wn converted to the given integer to_type. (handles only int->int conversions)

WN * WN_Float_Type_Conversion( WN *wn, TYPE_ID to_type )

Return the float-typed wn converted to the given float to_type. (handles only float->float conversions)

WN * WN_Type_Conversion( WN *wn, TYPE_ID to_type )

Return the int/float-typed wn converted to the given int/float to_type. (handles int->float, float->int, int->int, and float->float conversions)

WN *WN_Relational( OPERATOR opr, TYPE_ID rtype, WN *l, WN *r ) Return a relational operator opr with opcode of type rtype. The following macros use this as a common base WN_EQ(TYPE_ID rtype, WN *l, WN *r) WN_NE(TYPE_ID rtype, WN *l, WN *r) WN_LT(TYPE_ID rtype, WN *l, WN *r) WN_LE(TYPE_ID rtype, WN *l, WN *r) WN_GT(TYPE_ID rtype, WN *l, WN *r) WN_GE(TYPE_ID rtype, WN *l, WN *r)

WN *WN_ConstPowerOf2( TYPE_ID rtype, INT32 n ) Return a constant of type rtype that is 2**n (1<<(n-1))

WN *WN_Lda( TYPE_ID rtype, WN_OFFSET ldaOffset, ST *sym, UINT field_id ) Return lda of type rtype of sym

WN *WN_LdaString(char *str, WN_OFFSET ldaOffset, INT32 len ) Create an LDA of type string

WN *WN_Icall( TYPE_ID rtype, TYPE_ID desc, INT32 n, TY_IDX ty ) Return an icall node with n children and a TY

WN *WN_Call( TYPE_ID rtype, TYPE_ID desc, INT32 n, ST *sym ) Return an call node with n children and ST sym Uses generic WN_generic_call()

WN *WN_Piccall( TYPE_ID rtype, TYPE_ID desc, INT32 n, ST *sym ) Return an piccall node with n children and ST sym Uses generic WN_generic_call()

WN *WN_Create_Intrinsic( OPERATOR opr, TYPE_ID rtype, TYPE_ID desc, INTRINSIC intrinsic, INT32 n, WN *kids[] ) Return an intrinsic node with n children

WN *WN_CreateParm(TYPE_ID rtype, WN *kid0, TY_IDX ty, UINT32 flag) Return a parameter node

void WN_CopyMap( WN *dst, WN_MAP map, WN *src ) Copy the contents of map for src to dst. Uses Current_Map_Tab. Does nothing if map is WN_MAP_UNDEFINED.

WN *WN_Tas( TYPE_ID rtype, TY_IDX ty, WN *l ) Return an tas node with TY

Definition at line 187 of file wn.cxx.

References WN_rtype(), WTYPE_base_type, and WTYPE_comp_type.

Referenced by WN_CreateIstore(), WN_CreateParm(), WN_CreatePStid(), WN_CreatePstore(), and WN_CreateStid().

Here is the call graph for this function:

WN_FREE_LIST* Which_WN_FREE_LIST ( INT32  size) [inline]

Definition at line 317 of file wn.cxx.

References free_expr_list, free_stmt_list, and NULL.

Referenced by IPA_WN_Delete(), and WN_Create().

WN * WN_Binary ( OPERATOR  opr,
TYPE_ID  rtype,
WN l,
WN r 
)

Definition at line 2452 of file wn.cxx.

References MTYPE_V, and WN_CreateExp2().

Referenced by Combine_Offset_Terms().

Here is the call graph for this function:

static WN* WN_block_element ( WN element) [static]

Definition at line 772 of file wn.cxx.

References block, NULL, OPC_BLOCK, WN_CreateBlock(), WN_first(), WN_last(), WN_next(), WN_opcode(), and WN_prev().

Referenced by WN_CreateEntry(), and WN_CreateRegion().

Here is the call graph for this function:

WN* WN_Ceil ( TYPE_ID  desc,
TYPE_ID  rtype,
WN l 
)

Definition at line 2486 of file wn.cxx.

References OPR_CEIL, and WN_CreateExp1().

Here is the call graph for this function:

WN* WN_ConstPowerOf2 ( TYPE_ID  type,
INT32  n 
)

Definition at line 2501 of file wn.cxx.

References Host_To_Targ_Float(), Is_True, Make_Const(), MTYPE_C4, MTYPE_C8, MTYPE_CQ, MTYPE_F16, MTYPE_F4, MTYPE_F8, MTYPE_FQ, one, val, and WN_Intconst().

Here is the call graph for this function:

WN* WN_Create ( OPERATOR  opr,
TYPE_ID  rtype,
TYPE_ID  desc,
mINT16  kid_count 
)

Definition at line 500 of file wn.cxx.

References Is_True, max, MEM_POOL_Alloc, MEM_POOL_Initialize, MEM_POOL_Push, New_Map_Id, OPCODE_has_next_prev(), OPCODE_nkids(), size, TRUE, Which_WN_FREE_LIST(), wn, WN_FREE_LIST_Empty, WN_FREE_LIST_Pop(), WN_map_id(), WN_mem_pool_initialized, WN_real_fields(), WN_set_desc(), WN_set_kid_count(), WN_set_operator(), and WN_set_rtype().

Referenced by cwh_addr_array(), cwh_addr_array1(), cwh_addr_nonc_recast(), cwh_addr_src_triplet(), cwh_addr_triplet(), cwh_inline_allocate(), cwh_io_conv_array_to_dope(), cwh_io_conv_arrsection_to_dope(), cwh_stmt_call_helper(), DRA_EC_Array_Portion_Parms(), F90_Wrap_ARREXP(), fei_allocate(), fei_array_construct(), fei_entry_pt(), fei_field_dot(), fei_gen_func_entry(), fei_interface(), fei_namelist(), fei_noio_implied_do(), fei_nullify(), fei_stop(), fei_use(), fei_where(), Gen_Call_Array(), Gen_Free_Cart(), Gen_Malloc_Cart(), Insert_Alloca(), MemCtr_Add_Common(), MemCtr_Add_Global(), MemCtr_Add_Local(), WN_Convert_Shared_To_Local(), WN_CopyNode(), WN_Create(), WN_Create_Generic(), WN_Create_Intrinsic(), WN_Create_PtrEq_Test(), WN_Create_Shared_Load(), WN_Create_Shared_Ptr_Arithmetic(), WN_Create_Shared_Ptr_Diff(), WN_Create_Shared_Store(), WN_Create_StoP_Cvt(), WN_CreateAffirm(), WN_CreateAgoto(), WN_CreateAlloca(), WN_CreateAltentry(), WN_CreateAsm_Input(), WN_CreateAsm_Stmt(), WN_CreateAssert(), WN_CreateBarrier(), WN_CreateBlock(), WN_CreateCasegoto(), WN_CreateComma(), WN_CreateComment(), WN_CreateCompgoto(), WN_CreateConst(), WN_CreateDealloca(), WN_CreateDO(), WN_CreateDoWhile(), WN_CreateEntry(), WN_CreateEval(), WN_CreateExcScopeBegin(), WN_CreateExcScopeEnd(), WN_CreateExp0(), WN_CreateExp1(), WN_CreateExp2(), WN_CreateExp3(), WN_CreateFalsebr(), WN_CreateGoto(), WN_CreateGotoOuterBlock(), WN_CreateIdname(), WN_CreateIf(), WN_CreateIlda(), WN_CreateIntconst(), WN_CreateIo(), WN_CreateIoItem0(), WN_CreateIoItem1(), WN_CreateIoItem2(), WN_CreateIoItem3(), WN_CreateIoItemN(), WN_CreateIstore(), WN_CreateIstorex(), WN_CreateLabel(), WN_CreateLda(), WN_CreateLdid(), WN_CreateLdma(), WN_CreateLoopInfo(), WN_CreateMstore(), WN_CreatePragma(), WN_CreatePrefetch(), WN_CreatePrefetchx(), WN_CreatePStid(), WN_CreatePstore(), WN_CreateRcomma(), WN_CreateRegion(), WN_CreateRegionExit(), WN_CreateReturn(), WN_CreateReturn_Val(), WN_CreateStid(), WN_CreateSwitch(), WN_CreateTrap(), WN_CreateTruebr(), WN_CreateWhileDo(), WN_CreateXgoto(), WN_CreateXpragma(), WN_generic_call(), WN_Icall(), WN_LdaLabel(), WN_SetNull_Sptr(), WN_SimpCreateCvtl(), WN_SimpCreateDeposit(), WN_SimpCreateExp1(), WN_SimpCreateExp2(), WN_SimpCreateExp3(), and WN_SimpCreateExtract().

Here is the call graph for this function:

WN* WN_Create_Generic ( OPERATOR  opr,
TYPE_ID  rtype,
TYPE_ID  desc,
mINT16  kid_count,
WN next,
WN prev,
ST_IDX  st,
INT32  label_number,
INT32  num_entries,
TY_IDX  ty,
TY_IDX  load_addr_ty,
WN_OFFSET  offset,
INT16  cvtl_bits,
INT32  ,
WN_ESIZE  element_size,
INT64  const_value,
UINT32  flag,
INTRINSIC  intrinsic 
)
WN* WN_CreateAffirm ( WN condition)

Definition at line 3019 of file wn.cxx.

References MTYPE_V, OPR_AFFIRM, wn, WN_Create(), and WN_kid0().

Here is the call graph for this function:

WN* WN_CreateAgoto ( WN addr)

Definition at line 903 of file wn.cxx.

References Is_True, OPC_AGOTO, Pointer_type, wn, WN_Create(), WN_kid0(), and WN_rtype().

Here is the call graph for this function:

WN* WN_CreateAlloca ( WN size)

Definition at line 3028 of file wn.cxx.

References MTYPE_V, OPR_ALLOCA, Pointer_Mtype, size, wn, WN_Create(), and WN_kid0().

Here is the call graph for this function:

Definition at line 915 of file wn.cxx.

References OPC_ALTENTRY, wn, WN_Create(), and WN_st_idx().

Referenced by WN_CreateAltentry().

Here is the call graph for this function:

WN* WN_CreateAsm_Input ( char *  constraint_string,
UINT32  opnd_num,
WN value 
)

Definition at line 2024 of file wn.cxx.

References CLASS_NAME, CURRENT_SYMTAB, EXPORT_LOCAL, New_ST(), OPC_ASM_INPUT, Save_Str(), SCLASS_UNKNOWN, ST_Init(), ST_st_idx(), Str_To_Index, wn, WN_asm_opnd_num(), WN_Create(), WN_kid0(), and WN_st_idx().

Here is the call graph for this function:

WN* WN_CreateAsm_Stmt ( INT16  kid_count,
char *  asm_string 
)

Definition at line 2008 of file wn.cxx.

References CLASS_NAME, CURRENT_SYMTAB, EXPORT_LOCAL, New_ST(), OPC_ASM_STMT, Save_Str(), SCLASS_UNKNOWN, ST_Init(), ST_st_idx(), Str_To_Index, wn, WN_Create(), and WN_st_idx().

Here is the call graph for this function:

WN* WN_CreateAssert ( INT32  value,
WN condition 
)

Definition at line 2263 of file wn.cxx.

References OPC_ASSERT, wn, WN_Create(), WN_kid(), and WN_offset().

Here is the call graph for this function:

WN* WN_CreateCasegoto ( INT64  case_value,
INT32  case_label 
)

Definition at line 1044 of file wn.cxx.

References OPC_CASEGOTO, wn, WN_const_val(), WN_Create(), and WN_label_number().

Referenced by fei_new_select_case().

Here is the call graph for this function:

WN* WN_CreateComment ( char *  s)

Definition at line 2044 of file wn.cxx.

References CLASS_NAME, CURRENT_SYMTAB, EXPORT_LOCAL, New_ST(), OPC_COMMENT, Save_Str(), SCLASS_UNKNOWN, ST_Init(), ST_st_idx(), Str_To_Index, wn, WN_Create(), and WN_st_idx().

Referenced by fei_end_ioblock(), fei_enddo(), and fei_start_ioblock().

Here is the call graph for this function:

WN* WN_CreateCompgoto ( INT32  num_entries,
WN value,
WN block,
WN deflt,
INT32  last_label 
)

Definition at line 990 of file wn.cxx.

References block, Is_True, OPC_BLOCK, OPC_COMPGOTO, OPC_GOTO, OPCODE_is_expression(), wn, WN_Create(), WN_kid(), WN_kid0(), WN_last_label(), WN_num_entries(), and WN_opcode().

Referenced by cwh_stmt_assigned_goto(), and cwh_stmt_computed_goto().

Here is the call graph for this function:

WN* WN_CreateConst ( OPERATOR  opr,
TYPE_ID  rtype,
TYPE_ID  desc,
ST_IDX  st 
)

Definition at line 1933 of file wn.cxx.

References Is_True, OPCODE_operator(), OPR_CONST, wn, WN_Create(), and WN_st_idx().

Referenced by cwh_stab_const(), Make_Const(), and WN_CreateConst().

Here is the call graph for this function:

WN* WN_CreateCvtl ( OPERATOR  opr,
TYPE_ID  rtype,
TYPE_ID  desc,
INT16  cvtl_bits,
WN kid0 
)

Definition at line 1740 of file wn.cxx.

References Is_True, NULL, OPCODE_operator(), OPR_CVTL, wn, WN_CreateExp1(), WN_cvtl_bits(), WN_MAP_Set, WN_MAP_UNDEFINED, WN_SimplifyCvtl(), and WN_SimpParentMap.

Referenced by F90_wrap_cvtl(), WN_CreateCvtl(), and WN_Int_Type_Conversion().

Here is the call graph for this function:

WN* WN_CreateDealloca ( INT32  nkids)

Definition at line 3037 of file wn.cxx.

References MTYPE_V, OPR_DEALLOCA, wn, and WN_Create().

Here is the call graph for this function:

WN* WN_CreateDO ( WN index,
WN start,
WN end,
WN step,
WN body,
WN loop_info 
)

Definition at line 687 of file wn.cxx.

References Is_True, NULL, OPC_BLOCK, OPC_DO_LOOP, OPC_LOOP_INFO, OPCODE_is_stmt(), start, wn, WN_Create(), WN_do_body, WN_end, WN_index, WN_opcode(), WN_set_do_loop_info, WN_start, and WN_step.

Referenced by fei_doloop().

Here is the call graph for this function:

WN* WN_CreateDoWhile ( WN test,
WN body 
)

Definition at line 714 of file wn.cxx.

References Is_True, OPC_BLOCK, OPC_DO_WHILE, wn, WN_Create(), WN_opcode(), WN_while_body, and WN_while_test.

Here is the call graph for this function:

WN* WN_CreateEntry ( INT16  nkids,
ST_IDX  name,
WN body,
WN pragmas,
WN varrefs 
)

Definition at line 866 of file wn.cxx.

References name, OPC_FUNC_ENTRY, wn, WN_block_element(), WN_Create(), WN_entry_name, WN_func_body, WN_func_pragmas, and WN_func_varrefs.

Referenced by cwh_stmt_init_pu(), and WN_CreateEntry().

Here is the call graph for this function:

WN* WN_CreateEval ( WN exp)

Definition at line 1583 of file wn.cxx.

References Is_True, OPC_EVAL, OPCODE_is_expression(), wn, WN_Create(), WN_kid0(), and WN_opcode().

Here is the call graph for this function:

WN* WN_CreateExcScopeBegin ( INT32  id,
INT16  nkids,
INITO_IDX  ereg_supp 
)

Definition at line 2228 of file wn.cxx.

References OPC_EXC_SCOPE_BEGIN, wn, WN_Create(), WN_ereg_supp(), and WN_offset().

Here is the call graph for this function:

Definition at line 2237 of file wn.cxx.

References OPC_EXC_SCOPE_END, wn, WN_Create(), and WN_offset().

Here is the call graph for this function:

WN* WN_CreateExp0 ( OPERATOR  opr,
TYPE_ID  rtype,
TYPE_ID  desc 
)

Definition at line 1653 of file wn.cxx.

References wn, and WN_Create().

Referenced by WN_CreateExp0(), and WN_CreateParm().

Here is the call graph for this function:

WN* WN_CreateExp3 ( OPERATOR  opr,
TYPE_ID  rtype,
TYPE_ID  desc,
WN kid0,
WN kid1,
WN kid2 
)
WN* WN_CreateFalsebr ( INT32  label_number,
WN exp 
)

Definition at line 938 of file wn.cxx.

References Is_True, OPC_FALSEBR, OPCODE_is_expression(), wn, WN_Create(), WN_kid0(), WN_label_number(), and WN_opcode().

Referenced by cwh_stmt_falsebr(), and cwh_stmt_str_falsebr_util().

Here is the call graph for this function:

WN* WN_CreateGotoOuterBlock ( INT32  label_number,
SYMTAB_IDX  label_level 
)

Definition at line 893 of file wn.cxx.

References OPC_GOTO_OUTER_BLOCK, wn, WN_Create(), WN_label_level(), and WN_label_number().

Here is the call graph for this function:

WN* WN_CreateIf ( WN test,
WN if_then,
WN if_else 
)

Definition at line 746 of file wn.cxx.

References Is_True, OPC_BLOCK, OPC_IF, wn, WN_Create(), WN_else, WN_if_test, WN_opcode(), WN_Reset_If_Guard, and WN_then.

Referenced by cwh_addr_insert_bounds_check(), cwh_stmt_insert_conformance_check(), DRA_EC_Array_Portion_Parms(), and fei_if().

Here is the call graph for this function:

WN* WN_CreateIlda ( OPERATOR  opr,
TYPE_ID  rtype,
TYPE_ID  desc,
WN_OFFSET  offset,
TY_IDX  ty 
)

Definition at line 1903 of file wn.cxx.

References Is_True, MTYPE_is_pointer, OPCODE_operator(), OPCODE_rtype(), OPR_ILDA, wn, WN_Create(), WN_load_offset(), and WN_set_ty().

Here is the call graph for this function:

WN* WN_CreateIloadx ( OPERATOR  opr,
TYPE_ID  rtype,
TYPE_ID  desc,
TY_IDX  ty,
TY_IDX  load_addr_ty,
WN addr1,
WN addr2 
)

Definition at line 1806 of file wn.cxx.

References Is_True, OPCODE_operator(), OPR_ILOADX, OPR_LDID, wn, WN_CreateExp2(), WN_load_offset(), WN_operator(), WN_set_load_addr_ty(), and WN_set_ty().

Referenced by WN_CreateIloadx(), and WN_Iloadx().

Here is the call graph for this function:

WN* WN_CreateIo ( IOSTATEMENT  iostatement,
mINT16  kid_count 
)
WN* WN_CreateIoItem0 ( IOITEM  ioitem,
TY_IDX  ty 
)

Definition at line 1522 of file wn.cxx.

References OPC_IO_ITEM, wn, WN_Create(), WN_io_item(), and WN_set_ty().

Referenced by cwh_io_no_desc(), fei_close(), fei_control_list(), fei_inquire(), fei_iolength(), and fei_open().

Here is the call graph for this function:

WN* WN_CreateIoItem1 ( IOITEM  ioitem,
WN kid0,
TY_IDX  ty 
)
WN* WN_CreateIoItem2 ( IOITEM  ioitem,
WN kid0,
WN kid1,
TY_IDX  ty 
)

Definition at line 1545 of file wn.cxx.

References OPC_IO_ITEM, wn, WN_Create(), WN_io_item(), WN_kid0(), WN_kid1(), and WN_set_ty().

Referenced by cwh_io_conv_arrsection_to_dope(), cwh_io_ioitem(), cwh_io_split_io_items(), fei_close(), fei_control_list(), fei_inquire(), and fei_open().

Here is the call graph for this function:

WN* WN_CreateIoItem3 ( IOITEM  ioitem,
WN kid0,
WN kid1,
WN kid2,
TY_IDX  ty 
)

Definition at line 1558 of file wn.cxx.

References OPC_IO_ITEM, wn, WN_Create(), WN_io_item(), WN_kid(), WN_kid0(), WN_kid1(), and WN_set_ty().

Referenced by cwh_io_char_ioitem().

Here is the call graph for this function:

WN* WN_CreateIoItemN ( IOITEM  ioitem,
mINT16  kid_count,
TY_IDX  ty 
)

Definition at line 1572 of file wn.cxx.

References OPC_IO_ITEM, wn, WN_Create(), WN_io_item(), and WN_set_ty().

Referenced by cwh_io_conv_array_to_dope(), cwh_io_conv_arrsection_to_dope(), fei_control_list(), and fei_implied_do().

Here is the call graph for this function:

WN* WN_CreateIstorex ( OPERATOR  opr,
TYPE_ID  rtype,
TYPE_ID  desc,
TY_IDX  ty,
WN value,
WN addr1,
WN addr2 
)

Definition at line 1255 of file wn.cxx.

References Is_True, OPCODE_is_expression(), OPCODE_operator(), OPR_ISTOREX, OPR_LDID, wn, WN_Create(), WN_kid(), WN_kid0(), WN_kid1(), WN_opcode(), WN_operator_is, WN_set_ty(), and WN_store_offset().

Referenced by WN_CreateIstorex(), and WN_Istorex().

Here is the call graph for this function:

WN* WN_CreateLdma ( TYPE_ID  rtype,
WN_OFFSET  offset,
TY_IDX  ty,
ST_IDX  st,
UINT  field_id 
)

Definition at line 3045 of file wn.cxx.

References MTYPE_V, OPR_LDMA, wn, WN_Create(), WN_load_offset(), WN_set_field_id(), WN_set_ty(), and WN_st_idx().

Referenced by WN_CreateLdma().

Here is the call graph for this function:

WN* WN_CreateLoopInfo ( WN induction,
WN trip,
UINT16  trip_est,
UINT16  depth,
INT32  flags 
)

Definition at line 2210 of file wn.cxx.

References Is_True, NULL, OPC_LOOP_INFO, wn, WN_Create(), WN_loop_depth(), WN_loop_flag(), WN_loop_trip_est(), WN_set_loop_induction, and WN_set_loop_trip.

Here is the call graph for this function:

WN* WN_CreateMload ( WN_OFFSET  offset,
TY_IDX  ty,
WN addr,
WN num_bytes 
)

Definition at line 1827 of file wn.cxx.

References Is_True, MTYPE_I4, MTYPE_I8, MTYPE_is_pointer, MTYPE_U4, MTYPE_U8, OPC_MLOAD, wn, WN_CreateExp2(), WN_load_offset(), WN_rtype(), and WN_set_ty().

Referenced by cwh_addr_mload(), and cwh_do_tranformational().

Here is the call graph for this function:

WN* WN_CreateMstore ( WN_OFFSET  offset,
TY_IDX  ty,
WN value,
WN addr,
WN num_bytes 
)
WN* WN_CreatePragma ( WN_PRAGMA_ID  pragma_name,
ST_IDX  st,
INT32  arg1,
PREG_NUM  asm_copyout_preg,
UINT32  asm_opnd_num 
)
WN* WN_CreatePrefetch ( WN_OFFSET  offset,
UINT32  flag,
WN addr 
)

Definition at line 1498 of file wn.cxx.

References Is_True, MTYPE_is_pointer, OPC_PREFETCH, wn, WN_Create(), WN_kid0(), WN_offset(), WN_rtype(), and WN_set_flag().

Referenced by fei_prefetch_ref().

Here is the call graph for this function:

WN* WN_CreatePrefetchx ( UINT32  flag,
WN addr1,
WN addr2 
)

Definition at line 1278 of file wn.cxx.

References Is_True, OPC_PREFETCHX, OPR_LDID, wn, WN_Create(), WN_kid0(), WN_kid1(), WN_operator_is, and WN_set_flag().

Here is the call graph for this function:

WN* WN_CreateRcomma ( OPERATOR  opr,
TYPE_ID  rtype,
TYPE_ID  desc,
WN value,
WN block 
)

Definition at line 1987 of file wn.cxx.

References block, Get_Current_PU(), Is_True, OPC_BLOCK, OPCODE_is_expression(), Set_PU_has_very_high_whirl(), wn, WN_Create(), WN_kid0(), WN_kid1(), and WN_opcode().

Referenced by WN_CreateRcomma().

Here is the call graph for this function:

WN* WN_CreateRegion ( REGION_KIND  kind,
WN body,
WN pragmas,
WN exits,
INT  region_id,
INITO_IDX  ereg_supp 
)
WN* WN_CreateRegionExit ( INT32  label_number)

Definition at line 854 of file wn.cxx.

References OPC_REGION_EXIT, wn, WN_Create(), and WN_label_number().

Referenced by WN_CreateRegionExit().

Here is the call graph for this function:

WN* WN_CreateReturn ( void  )

Definition at line 952 of file wn.cxx.

References OPC_RETURN, wn, and WN_Create().

Referenced by fei_return().

Here is the call graph for this function:

WN* WN_CreateReturn_Val ( OPERATOR  opr,
TYPE_ID  rtype,
TYPE_ID  desc,
WN val 
)

Definition at line 961 of file wn.cxx.

References val, wn, WN_Create(), and WN_kid0().

Referenced by cwh_stmt_return_altentry(), cwh_stmt_return_scalar(), and WN_CreateReturn_Val().

Here is the call graph for this function:

WN* WN_CreateSwitch ( INT32  num_entries,
WN value,
WN block,
WN deflt,
INT32  last_label 
)
WN* WN_CreateTrap ( INT32  value)

Definition at line 2255 of file wn.cxx.

References OPC_TRAP, wn, WN_Create(), and WN_offset().

Here is the call graph for this function:

WN* WN_CreateTruebr ( INT32  label_number,
WN exp 
)

Definition at line 925 of file wn.cxx.

References Is_True, OPC_TRUEBR, OPCODE_is_expression(), wn, WN_Create(), WN_kid0(), WN_label_number(), and WN_opcode().

Referenced by cwh_io_split_io_items(), cwh_stmt_truebr(), and fei_brtrue().

Here is the call graph for this function:

WN* WN_CreateWhileDo ( WN test,
WN body 
)

Definition at line 730 of file wn.cxx.

References Is_True, OPC_BLOCK, OPC_WHILE_DO, wn, WN_Create(), WN_opcode(), WN_while_body, and WN_while_test.

Referenced by fei_dowhile().

Here is the call graph for this function:

WN* WN_CreateXgoto ( INT32  num_entries,
WN value,
WN block,
ST_IDX  st 
)

Definition at line 1053 of file wn.cxx.

References block, Is_True, OPC_BLOCK, OPC_XGOTO, OPCODE_is_expression(), wn, WN_Create(), WN_kid(), WN_kid0(), WN_num_entries(), WN_opcode(), and WN_st_idx().

Referenced by WN_CreateXgoto().

Here is the call graph for this function:

WN* WN_Cvt ( TYPE_ID  desc,
TYPE_ID  rtype,
WN l 
)

Definition at line 2471 of file wn.cxx.

References OPR_CVT, and WN_CreateExp1().

Referenced by WN_Float_Type_Conversion(), WN_Int_Type_Conversion(), and WN_Type_Conversion().

Here is the call graph for this function:

WN* WN_Float_Type_Conversion ( WN wn,
TYPE_ID  to_type 
)

Definition at line 2880 of file wn.cxx.

References Is_True, MTYPE_F4, MTYPE_F8, MTYPE_FQ, wn, WN_Cvt(), and WN_rtype().

Here is the call graph for this function:

WN* WN_Floatconst ( TYPE_ID  type,
double  value 
)

Definition at line 2529 of file wn.cxx.

References FALSE, Host_To_Targ_Float(), Is_True, Make_Const(), MTYPE_C4, MTYPE_C8, MTYPE_CQ, MTYPE_F16, MTYPE_F4, MTYPE_F8, MTYPE_FQ, and NULL.

Referenced by WN_Inverse().

Here is the call graph for this function:

WN* WN_Floor ( TYPE_ID  desc,
TYPE_ID  rtype,
WN l 
)

Definition at line 2491 of file wn.cxx.

References OPR_FLOOR, and WN_CreateExp1().

Here is the call graph for this function:

WN* WN_FREE_LIST_Pop ( WN_FREE_LIST list) [inline]

Definition at line 294 of file wn.cxx.

References WN_prev_free().

Referenced by WN_Create().

Here is the call graph for this function:

void WN_FREE_LIST_Push ( WN_FREE_LIST list,
WN wn 
) [inline]

Definition at line 278 of file wn.cxx.

References WN_prev_free(), and WN_StartAddress().

Referenced by IPA_WN_Delete().

Here is the call graph for this function:

WN* WN_generic_call ( OPERATOR  opr,
TYPE_ID  rtype,
TYPE_ID  desc,
INT32  n,
ST_IDX  sym 
)

Definition at line 2686 of file wn.cxx.

References Mtype_complex_to_real(), MTYPE_is_complex, WN_Create(), and WN_st_idx().

Referenced by WN_generic_call().

Here is the call graph for this function:

Definition at line 2061 of file wn.cxx.

References Is_True, OPC_COMMENT, ST_name_idx(), WN_opcode(), and WN_st().

Referenced by ANL_LOOP_CONSTRUCT::Is_End_Of_Loop_Comment(), WN2C_comment(), WN2C_Skip_Stmt(), and WN2F_comment().

Here is the call graph for this function:

WN* WN_Icall ( TYPE_ID  rtype,
TYPE_ID  desc,
INT32  n,
TY_IDX  ty 
)

Definition at line 2665 of file wn.cxx.

References OPR_ICALL, WN_Create(), and WN_set_ty().

Here is the call graph for this function:

WN* WN_Iload ( TYPE_ID  desc,
WN_OFFSET  offset,
TY_IDX  align,
WN addr,
UINT  field_id 
)

Definition at line 2409 of file wn.cxx.

References Make_Pointer_Type(), Mtype_comparison(), OPR_ILOAD, and WN_CreateIload().

Referenced by cwh_io_split_io_items(), and WN_IloadLdid().

Here is the call graph for this function:

WN* WN_IloadLdid ( TYPE_ID  desc,
WN_OFFSET  offset,
TY_IDX  align,
ST sym,
WN_OFFSET  symOffset 
)

Definition at line 2463 of file wn.cxx.

References Pointer_type, ST_type(), WN_Iload(), and WN_Ldid().

Here is the call graph for this function:

WN* WN_Iloadx ( TYPE_ID  rtype,
TY_IDX  ty,
TY_IDX  addr_ty,
WN base,
WN index 
)

Definition at line 2996 of file wn.cxx.

References MTYPE_V, OPR_ILOADX, and WN_CreateIloadx().

Here is the call graph for this function:

WN* WN_Int_Type_Conversion ( WN wn,
TYPE_ID  to_type 
)

Definition at line 2733 of file wn.cxx.

References FALSE, FmtAssert, Is_True, MTYPE_I1, MTYPE_I2, MTYPE_I4, MTYPE_I8, MTYPE_U1, MTYPE_U2, MTYPE_U4, MTYPE_U8, OPC_I4CVTL, OPC_I8CVTL, OPC_U4CVTL, OPC_U8CVTL, wn, WN_CreateCvtl(), WN_Cvt(), and WN_rtype().

Referenced by cwh_inline_allocate(), and WN_Type_Conversion().

Here is the call graph for this function:

WN* WN_Inverse ( TYPE_ID  type,
WN tree 
)

Definition at line 2617 of file wn.cxx.

References FALSE, MTYPE_float, MTYPE_is_quad, Recip_Allowed, TRUE, WN_Div, WN_Floatconst(), WN_Intconst(), and WN_Recip.

Here is the call graph for this function:

WN* WN_Istore ( TYPE_ID  desc,
WN_OFFSET  offset,
TY_IDX  align,
WN addr,
WN value,
UINT  field_id 
)

Definition at line 2440 of file wn.cxx.

References MTYPE_V, OPR_ISTORE, and WN_CreateIstore().

Referenced by cwh_io_split_io_items().

Here is the call graph for this function:

WN* WN_Istorex ( TYPE_ID  desc,
TY_IDX  ty,
WN value,
WN base,
WN index 
)

Definition at line 3002 of file wn.cxx.

References MTYPE_V, OPR_ISTOREX, and WN_CreateIstorex().

Here is the call graph for this function:

WN* WN_Lda ( TYPE_ID  rtype,
WN_OFFSET  ldaOffset,
ST sym,
UINT  field_id 
)
WN* WN_LdaLabel ( TYPE_ID  rtype,
INT32  label_number 
)

Definition at line 2654 of file wn.cxx.

References Be_Type_Tbl, Make_Pointer_Type(), MTYPE_V, OPR_LDA_LABEL, wn, WN_Create(), WN_label_number(), and WN_set_ty().

Here is the call graph for this function:

WN* WN_LdaString ( char *  str,
WN_OFFSET  ldaOffset,
INT32  len 
)

Definition at line 3007 of file wn.cxx.

References FALSE, Gen_String_Sym(), Host_To_Targ_String(), MTYPE_STRING, MTYPE_To_TY, Pointer_type, and WN_Lda().

Referenced by cwh_addr_insert_bounds_check(), and cwh_stmt_insert_conformance_check().

Here is the call graph for this function:

void WN_Mem_Pop ( void  )

Definition at line 355 of file wn.cxx.

References MEM_POOL_Initialize, MEM_POOL_Pop, NULL, TRUE, and WN_mem_pool_initialized.

Referenced by PDGCS_do_proc(), and Postprocess_PU().

void WN_Mem_Push ( void  )

Definition at line 336 of file wn.cxx.

References MEM_POOL_Initialize, MEM_POOL_Push, TRUE, and WN_mem_pool_initialized.

Referenced by cwh_pdgcs_pu_mem(), and Preprocess_PU().

WN* WN_PStid ( TYPE_ID  desc,
WN_OFFSET  offset,
ST sym,
TY_IDX  align,
WN value,
UINT  field_id 
)

Definition at line 2386 of file wn.cxx.

References MTYPE_V, OPR_STID, and WN_CreatePStid().

Here is the call graph for this function:

WN* WN_Pstore ( TYPE_ID  desc,
WN_OFFSET  offset,
TY_IDX  align,
WN addr,
WN value,
UINT  field_id 
)

Definition at line 2431 of file wn.cxx.

References MTYPE_V, OPR_ISTORE, and WN_CreatePstore().

Here is the call graph for this function:

void WN_Register_Delete_Cleanup_Function ( void(*)(WN *wn cleanup_fn)

Definition at line 449 of file wn.cxx.

References delete_cleanup_fns, FmtAssert, MAX_CLEANUP_FNS, and num_delete_cleanup_fns.

WN* WN_Relational ( OPERATOR  opr,
TYPE_ID  rtype,
WN l,
WN r 
)

Definition at line 2496 of file wn.cxx.

References Boolean_type, and WN_CreateExp2().

Here is the call graph for this function:

void WN_Remove_Delete_Cleanup_Function ( void(*)(WN *wn cleanup_fn)

Definition at line 468 of file wn.cxx.

References delete_cleanup_fns, and num_delete_cleanup_fns.

WN* WN_RIload ( TYPE_ID  rtype,
TYPE_ID  desc,
WN_OFFSET  offset,
TY_IDX  align,
WN addr 
)

Definition at line 2421 of file wn.cxx.

References Make_Pointer_Type(), OPR_ILOAD, and WN_CreateIload().

Here is the call graph for this function:

WN* WN_RLdid ( TYPE_ID  rtype,
TYPE_ID  desc,
WN_OFFSET  offset,
ST_IDX  sym,
TY_IDX  align 
)

Definition at line 2365 of file wn.cxx.

References OPR_LDID, and WN_CreateLdid().

Referenced by Fill_Align_Symbol(), and WN_RLdid().

Here is the call graph for this function:

WN* WN_Rnd ( TYPE_ID  desc,
TYPE_ID  rtype,
WN l 
)

Definition at line 2481 of file wn.cxx.

References OPR_RND, and WN_CreateExp1().

Here is the call graph for this function:

WN* WN_RotateIntconst ( WN tree,
INT32  rotate 
)

Definition at line 2583 of file wn.cxx.

References Is_True, MTYPE_size_reg, NBITMASK, OPR_INTCONST, size, WN_const_val(), WN_operator_is, and WN_rtype().

Here is the call graph for this function:

WN* WN_Rrotate ( TYPE_ID  desc,
WN src,
WN cnt 
)

Definition at line 3360 of file wn.cxx.

References Get_Current_PU(), Mtype_comparison(), OPR_RROTATE, Set_PU_has_very_high_whirl(), and WN_CreateExp2().

Here is the call graph for this function:

INT32 WN_Size_and_StartAddress ( WN wn,
void **  StartAddress 
)

Definition at line 2196 of file wn.cxx.

References max, OPCODE_has_next_prev(), WN_kid_count(), WN_opcode(), and WN_prev().

Referenced by ir_b_write_tree().

Here is the call graph for this function:

WN* WN_Stid ( TYPE_ID  desc,
WN_OFFSET  offset,
ST sym,
TY_IDX  align,
WN value,
UINT  field_id 
)
WN* WN_StidIntoPreg ( TYPE_ID  desc,
WN_OFFSET  offset,
ST preg,
WN value 
)

Definition at line 2394 of file wn.cxx.

References MTYPE_V, OPR_STID, ST_type(), and WN_CreateStid().

Referenced by cwh_io_split_io_items().

Here is the call graph for this function:

WN* WN_Tas ( TYPE_ID  rtype,
TY_IDX  ty,
WN l 
)

Definition at line 2281 of file wn.cxx.

References MTYPE_V, OPR_TAS, WN_CreateExp1(), WN_operator_is, and WN_set_ty().

Referenced by cwh_expr_binop_shift(), cwh_expr_compare_bitwise(), cwh_intrin_popcnt_leadz_helper(), fei_bneg(), and fei_ieee_sign_xfer().

Here is the call graph for this function:

WN* WN_Ternary ( OPERATOR  opr,
TYPE_ID  rtype,
WN kid0,
WN kid1,
WN kid2 
)

Definition at line 2457 of file wn.cxx.

References MTYPE_V, and WN_CreateExp3().

Here is the call graph for this function:

WN* WN_Trunc ( TYPE_ID  desc,
TYPE_ID  rtype,
WN l 
)

Definition at line 2476 of file wn.cxx.

References OPR_TRUNC, and WN_CreateExp1().

Here is the call graph for this function:

WN* WN_Type_Conversion ( WN wn,
TYPE_ID  to_type 
)
WN* WN_Unary ( OPERATOR  opr,
TYPE_ID  rtype,
WN l 
)

Definition at line 2447 of file wn.cxx.

References MTYPE_V, and WN_CreateExp1().

Here is the call graph for this function:


Variable Documentation

Definition at line 315 of file wn.cxx.

Referenced by Which_WN_FREE_LIST().

Definition at line 315 of file wn.cxx.

Referenced by Which_WN_FREE_LIST().

INT32 last_region_id = 0 [static]

Definition at line 787 of file wn.cxx.

Referenced by Last_Region_Id(), and New_Region_Id().

BOOL use_free_list = TRUE [static]

Definition at line 264 of file wn.cxx.

struct winfo WINFO[MTYPE_LAST + 1] [static]

Definition at line 88 of file wn.cxx.

Definition at line 90 of file wn.cxx.

Referenced by WN_Create(), WN_Mem_Pop(), and WN_Mem_Push().

Definition at line 89 of file wn.cxx.

Referenced by IPO_CLONE::Copy_Node(), and DRA_Add_Clone().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines