#include "defs.h"#include "opcode.h"#include "mempool.h"#include "srcpos.h"#include "wn_core.h"#include "wn_map.h"#include "wio.h"#include "wn_pragmas.h"#include "stab.h"


Go to the source code of this file.
Definition at line 1237 of file wn.h.
Referenced by em_aint(), em_complex_sqrt_preg(), em_nearest_aint(), em_nearest_int(), em_preg_hypot(), em_quad_abs(), em_shft(), em_shftc(), em_sign(), lower_complex_expr(), and WN_LOOP_TripCount().
Definition at line 1245 of file wn.h.
Referenced by add_to_base(), aux_nearest(), Calculate_Array_Size(), Convert_Section_To_Pdo(), Create_DopeVector_WN(), create_pointer_to_node(), cwh_io_conv_array_to_dope(), cwh_io_conv_arrsection_to_dope(), DRA_Insert_Pragmas(), em_alloca(), em_bits(), em_complex_sqrt_preg(), em_divfloor(), em_popcount(), em_preg_hypot(), em_shft(), Extract_Do_Info(), format_rhs_atomic_stmt(), Get_Array_Dim_Size(), lower_base_reference(), lower_bit_field_id(), lower_complex_expr(), lower_dereference(), lower_float_to_unsigned(), lower_io_items(), lower_linearize_array_addr(), lower_record_items(), lower_unsigned_to_float(), Rename_Privatized_COMMON(), WN_UNROLL::Replicate_expr(), Rewrite_Do(), Transform_Do(), WFE_Expand_Expr(), WGEN_Expand_Expr(), WN2C_array(), WN_NaryToExpr(), and WN_UNROLL::WN_UNROLL().
Definition at line 1270 of file wn.h.
Referenced by em_divfloor(), em_parity(), em_popcount(), and lower_bit_field_id().
Definition at line 1274 of file wn.h.
Referenced by cwh_expr_binop_shift(), em_alloca(), em_bclr(), em_btest(), em_divfloor(), em_exp_int(), em_mask(), em_mask_complement(), em_parity(), em_popcount(), fei_cvtop(), lower_bit_field_id(), lower_load_bits(), and lower_store_bits().
Definition at line 1275 of file wn.h.
Referenced by cwh_expr_binop_shift(), em_bset(), em_shftc(), lower_store_bits(), and vho_lower_expr().
Definition at line 1273 of file wn.h.
Referenced by Atomic_Using_Swap(), em_bclr(), and em_mask_complement().
Definition at line 1276 of file wn.h.
Referenced by em_divfloor(), em_parity(), and lower_bit_field_id().
Definition at line 1201 of file wn.h.
Referenced by EETARG_Generate_PIC_Entry_Code(), Gen_Call_Shell(), Generate_cyg_profile_func(), intrinsic_runtime(), lower_bit_field_id(), Reset_param_list(), WFE_maybe_call_copy_ctor(), WFE_maybe_call_default_ctor(), WGEN_maybe_call_assignment_opr(), WGEN_maybe_call_copy_ctor(), and WGEN_maybe_call_default_ctor().
| #define WN_CAND | ( | l, | |||
| r | ) | WN_Binary(OPR_CAND,Boolean_type,l,r) |
Definition at line 1266 of file wn.h.
Referenced by Create_Stride1_Condition_If_Required(), lower_bit_field_id(), lower_mp(), and Transform_Do().
| #define WN_CIOR | ( | l, | |||
| r | ) | WN_Binary(OPR_CIOR,Boolean_type,l,r) |
Definition at line 1280 of file wn.h.
Referenced by em_complex_cos(), em_complex_exp(), em_complex_log(), em_complex_sin(), em_complex_sqrt_preg(), em_conjg(), and lower_bit_field_id().
Definition at line 1244 of file wn.h.
Referenced by lower_bit_field_id(), and lower_float_to_unsigned().
| #define WN_Delete | ( | wn | ) | IPA_WN_Delete(Current_Map_Tab, (wn)) |
Definition at line 699 of file wn.h.
Referenced by analyze_addressof_ty_being_split(), arrsection_to_array(), aux_memset(), convert_do_while(), Convert_Section_To_Pdo(), OPT_STAB::Convert_ST_to_AUX(), convert_while_do(), Create_DopeVector_WN(), Create_Io_Entry(), cwh_dope_from_expression(), cwh_expr_address(), cwh_expr_dispose_of_char(), cwh_expr_extract_arrayexp(), cwh_io_create_dope_from_item(), cwh_io_null_address(), cwh_io_split_io_items(), Delayed_MP_Translation(), GOTO_TABLE::Dismantle(), GTABLE::Dismantle(), em_bzero(), em_exp_int(), em_quad_abs(), em_quad_neg(), em_split_select(), extract_calls(), f90_analyze_assignment(), F90_Do_Copies(), F90_Lower_Alloc_Dealloc(), F90_Lower_Intrinsic_Fixup_walk(), F90_Lower_Walk(), F90_Walk_All_Statements(), F90_Walk_Statements(), fei_cvtop(), fei_unroll(), Fold_Base(), Gen_End_Serialized_Parallel(), Gen_Io_GetFieldWN(), Gen_Io_PutFieldWN(), Gen_Io_PutKeyFieldWN(), Gen_Iolist_PutFieldWN(), Gen_MP_SingleProcess_Region(), Gen_stmt_wn(), EMITTER::Gen_wn(), handle_assignment(), handle_istore_assignment(), handle_kid_of_istore(), Insert_Lowered_Atomic(), lower_base_reference(), lower_bit_field_id(), lower_char(), lower_complex_expr(), lower_cvt(), lower_dereference(), Lower_Fetch_And_Op(), lower_io_items(), lower_io_statement(), lower_linearize_array_addr(), lower_madd(), lower_merge(), lower_miload(), lower_mldid(), lower_mp(), lower_pack(), lower_recip(), lower_rsqrt(), lower_transformationals(), LWN_Delete_From_Block(), LWN_Delete_Tree(), LWN_Insert_Block_After(), LWN_Insert_Block_Before(), Make_Leaf(), GOTO_TABLE::Move_Goto_Out(), NORMALIZE_LOOP::Normalize_loop_stmt(), Points_To_For_Array_Star(), Process_Parallel_Do(), Process_PDO(), Promote_Pointer(), GOTO_TABLE::Replace_Goto_With_If(), GTABLE::Replace_Goto_With_If(), GTABLE::Replace_Goto_With_While(), GOTO_TABLE::Replace_Goto_With_While(), SE_Istore(), SNL_Optimize_Bounds(), Solve_For(), strip_mloads(), Strip_Nested_MP(), Strip_OMP_Workshare(), TCON_from_stack(), Transform_Code(), Transform_Do(), Transform_Parallel_Block(), U64_LOWER_delete(), vho_lower_block(), Walk_and_Localize(), WFE_Add_Aggregate_Init_Address(), WFE_Array_Expr(), WFE_Expand_Expr(), WFE_Expand_Expr_With_Sequence_Point(), WFE_Expand_Loop(), WFE_One_Stmt(), AGGINIT::WGEN_Add_Aggregate_Init_Address(), WGEN_Array_Expr(), WGEN_Expand_Expr(), WGEN_Expand_Expr_With_Sequence_Point(), WGEN_Expand_Loop(), WGEN_One_Stmt(), WN_DELETE_Tree(), WN_ExprToNaryType(), WN_INSERT_BlockAfter(), WN_INSERT_BlockBefore(), WN_Nary(), WN_NaryToExpr(), WN_Simplify_Rebuild_Expr_Tree(), WN_Simplify_Tree(), WN_Solve_For(), and SNL_TRANS_INDEX_DATA::~SNL_TRANS_INDEX_DATA().
Definition at line 1248 of file wn.h.
Referenced by Create_TY_For_Tree(), em_complex_sqrt_preg(), em_divfloor(), em_mod_float(), em_preg_hypot(), Extract_Do_Info(), lower_bit_field_id(), lower_complex_expr(), lower_recip(), lower_rsqrt(), WN_UNROLL::Unroll(), WFE_Alloca_ST(), WFE_Expand_Expr(), WGEN_Expand_Expr(), WN_Inverse(), and WN_UNROLL::WN_UNROLL().
Definition at line 1256 of file wn.h.
Referenced by checkForZero(), Create_Stride1_Condition_If_Required(), cwh_stmt_insert_conformance_check(), em_exp_int(), F90_Lower_Alloc_Dealloc(), fei_logb(), Gen_Critical(), Gen_MP_SingleProcess_Block(), handle_compare(), lower_bit_field_id(), Lower_Master(), lower_mp(), Process_Parallel_Do(), Process_PDO(), and WN_UNROLL::WN_UNROLL().
Definition at line 1261 of file wn.h.
Referenced by Analyze_index(), aux_nearest(), Create_Io_Entry(), cwh_io_split_io_items(), em_aint(), em_exp_int(), em_nearest_aint(), em_nearest_int(), em_shft(), em_sign(), lower_bit_field_id(), lower_io_items(), and Transform_Do().
Definition at line 1260 of file wn.h.
Referenced by cwh_expr_binop_shift(), cwh_stmt_insert_conformance_check(), em_complex_sqrt_preg(), em_dim(), em_preg_hypot(), em_shftc(), F90_Lower_Alloc_Dealloc(), lower_bit_field_id(), lower_complex_expr(), lower_mp(), Transform_Do(), and WN_mask().
| #define WN_Imagpart | ( | t, | |||
| l | ) | WN_Unary(OPR_IMAGPART,t,l) |
Definition at line 1279 of file wn.h.
Referenced by em_complex_abs(), em_complex_cos(), em_complex_exp(), em_complex_log(), em_complex_sin(), em_complex_sqrt_preg(), em_conjg(), and intrinsic_runtime().
| #define WN_LAND | ( | l, | |||
| r | ) | WN_Binary(OPR_LAND,Boolean_type,l,r) |
Definition at line 1264 of file wn.h.
Referenced by cwh_addr_do_bounds_check(), cwh_stmt_insert_conformance_check(), em_bclr(), em_bits(), em_bset(), em_btest(), em_complex_sqrt_preg(), em_shftc(), lower_bit_field_id(), and lower_maxminloc().
Definition at line 1259 of file wn.h.
Referenced by Convert_Section_To_Pdo(), Create_Io_Entry(), cwh_io_split_io_items(), em_bclr(), em_bits(), em_bset(), em_btest(), em_complex_sqrt_preg(), em_shftc(), lower_bit_field_id(), lower_float_to_unsigned(), lower_io_items(), lower_record_items(), and Transform_Do().
| #define WN_LIOR | ( | l, | |||
| r | ) | WN_Binary(OPR_LIOR,Boolean_type,l,r) |
Definition at line 1265 of file wn.h.
Referenced by Analyze_index(), cwh_stmt_insert_conformance_check(), and lower_bit_field_id().
| #define WN_LNOT | ( | l | ) | WN_Unary(OPR_LNOT,Boolean_type,l) |
Definition at line 1269 of file wn.h.
Referenced by em_bits(), em_btest(), em_lshr(), em_shft(), em_shftc(), fei_ibits(), fei_ieee_sign_xfer(), fei_mvbits(), lower_bit_field_id(), vho_lower_expr(), and WN_mask().
Definition at line 1258 of file wn.h.
Referenced by Analyze_index(), cwh_expr_binop_shift(), em_bclr(), em_bits(), em_bset(), em_btest(), em_complex_sqrt_preg(), em_lshr(), em_shft(), em_shl(), fei_ieee_sign_xfer(), lower_bit_field_id(), lower_unsigned_to_float(), and Transform_Do().
Definition at line 1247 of file wn.h.
Referenced by build_mult_tree(), Calculate_Array_Size(), Create_DopeVector_WN(), em_alog10(), em_complex_cos(), em_complex_exp(), em_complex_sin(), em_complex_sqrt_preg(), em_exp_float(), em_exp_int(), em_mod_float(), em_preg_hypot(), em_prod(), Insert_Alloca(), lower_bit_field_id(), lower_complex_expr(), lower_linearize_array_addr(), lower_rsqrt(), Rewrite_Do(), WN_UNROLL::Unroll(), vho_lower_expr(), WFE_Expand_Expr(), WGEN_Expand_Expr(), WN2C_array(), and WN_NaryToExpr().
Definition at line 1257 of file wn.h.
Referenced by cwh_generate_bitmask(), cwh_stmt_insert_conformance_check(), expand_start_parallel(), expand_start_parallel_for(), expand_start_parallel_sections(), Gen_MP_Reduction(), lower_bit_field_id(), WGEN_generate_non_pod_lastlocal_finalization(), and WGEN_Generate_Thunk().
Definition at line 1236 of file wn.h.
Referenced by cwh_expr_binop_shift(), em_complex_cos(), em_complex_sqrt_preg(), em_conjg(), em_divceil(), em_exp_int(), em_quad_neg(), em_shft(), em_sign(), lower_bit_field_id(), lower_complex_expr(), lower_to_base_index(), WN_ExprToNaryType(), and WN_mask().
| #define WN_Realpart | ( | t, | |||
| l | ) | WN_Unary(OPR_REALPART,t,l) |
Definition at line 1278 of file wn.h.
Referenced by em_complex_abs(), em_complex_cos(), em_complex_exp(), em_complex_log(), em_complex_sin(), em_complex_sqrt_preg(), em_conjg(), and intrinsic_runtime().
Definition at line 1243 of file wn.h.
Referenced by aux_nearest(), CFG::Conv_to_select(), Create_Io_Entry(), cwh_io_split_io_items(), em_aint(), em_bclr(), em_bits(), em_bset(), em_btest(), em_complex_sqrt_preg(), em_dim(), em_exp_int(), em_lshr(), em_nearest_aint(), em_nearest_int(), em_preg_hypot(), em_shft(), em_shftc(), em_shl(), em_sign(), fei_logb(), lower_bit_field_id(), lower_complex_expr(), CFG::Lower_if_stmt(), lower_io_items(), lower_unsigned_to_float(), WFE_Address_Of(), WGEN_Address_Of(), and WN_UNROLL::WN_UNROLL().
Definition at line 1271 of file wn.h.
Referenced by cwh_generate_bitmask(), em_bclr(), em_bset(), em_exp_int(), em_shft(), em_shftc(), em_shl(), fei_ieee_sign_xfer(), fei_mvbits(), lower_bit_field_id(), lower_load_bits(), lower_store_bits(), and vho_lower_expr().
Definition at line 1239 of file wn.h.
Referenced by em_complex_sqrt_preg(), em_exp_float(), em_preg_hypot(), lower_complex_expr(), and lower_rsqrt().
| #define WN_StidPreg | ( | desc, | |||
| pregno, | |||||
| value | ) | WN_StidIntoPreg((desc),(pregno),MTYPE_To_PREG(desc),(value)) |
Definition at line 1120 of file wn.h.
Referenced by create_doloop(), cwh_addr_do_bounds_check(), cwh_inline_allocate(), cwh_intrin_get_return_value(), cwh_stmt_insert_conformance_check(), F90_Lower_Alloc_Dealloc(), F90_Lower_Copy_To_STemp(), fei_doloop(), lower_cshift(), lower_eoshift(), lower_maxminloc(), lower_mm_matmul(), lower_mv_matmul(), lower_pack(), lower_random_number(), lower_reduction(), and lower_unpack().
Definition at line 1246 of file wn.h.
Referenced by Calculate_Array_Size(), Create_DopeVector_WN(), Create_Io_Entry(), DRA_Insert_Pragmas(), em_dim(), em_divfloor(), em_lshr(), em_mod_float(), em_popcount(), em_shftc(), Extract_Do_Info(), Get_Array_Dim_Size(), lower_bit_field_id(), lower_complex_expr(), lower_float_to_unsigned(), lower_rsqrt(), Rewrite_Do(), sub_from_base(), Transform_Do(), WN_mask(), WN_NaryToExpr(), and WN_UNROLL::WN_UNROLL().
| void IPA_WN_Delete | ( | WN_MAP_TAB * | maptab, | |
| WN * | wn | |||
| ) |
| void IPA_WN_DELETE_Tree | ( | WN_MAP_TAB * | maptab, | |
| WN * | tree | |||
| ) |
| void IPA_WN_Move_Maps_PU | ( | WN_MAP_TAB * | src, | |
| WN_MAP_TAB * | dst, | |||
| 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_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_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_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(const 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 672 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_Create().
| WN * WN_Create_Generic | ( | OPCODE | opcode, | |
| 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 | num_dim, | |||
| WN_ESIZE | element_size, | |||
| INT64 | const_value, | |||
| UINT32 | flag, | |||
| INTRINSIC | intrinsic | |||
| ) | [inline] |
Definition at line 685 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_Create_Generic().
| 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 | num_dim, | |||
| WN_ESIZE | element_size, | |||
| INT64 | const_value, | |||
| UINT32 | flag, | |||
| INTRINSIC | intrinsic | |||
| ) | [inline] |
Definition at line 1001 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_Create_Intrinsic.
| WN* WN_CreateAsm_Stmt | ( | INT16 | kid_count, | |
| char * | asm_string | |||
| ) |
Definition at line 1013 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_CreateComma.
Definition at line 968 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_CreateConst.
Definition at line 989 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_CreateCvtl.
Definition at line 852 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_CreateExp0.
Definition at line 862 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_CreateExp1.
Definition at line 873 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_CreateExp2.
Definition at line 885 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_CreateExp3.
| WN* WN_CreateGotoOuterBlock | ( | INT32 | label_number, | |
| SYMTAB_IDX | label_level | |||
| ) |
| WN* WN_CreateIload | ( | OPCODE | opc, | |
| WN_OFFSET | offset, | |||
| TY_IDX | ty, | |||
| TY_IDX | load_addr_ty, | |||
| WN * | addr, | |||
| UINT | field_id = 0 | |||
| ) | [inline] |
Definition at line 899 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_CreateIload.
Definition at line 914 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_CreateIloadx.
Definition at line 978 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_CreateIntconst.
| WN* WN_CreateIo | ( | IOSTATEMENT | iostatement, | |
| mINT16 | kid_count | |||
| ) |
| WN* WN_CreateIstore | ( | OPCODE | opc, | |
| WN_OFFSET | offset, | |||
| TY_IDX | ty, | |||
| WN * | value, | |||
| WN * | addr, | |||
| UINT | field_id = 0 | |||
| ) | [inline] |
Definition at line 791 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_CreateIstore.
Definition at line 805 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_CreateIstorex.
Definition at line 1463 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_CreateLda.
Definition at line 946 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_CreateLda.
| WN * WN_CreateLdid | ( | OPCODE | opc, | |
| WN_OFFSET | offset, | |||
| ST_IDX | st, | |||
| TY_IDX | ty, | |||
| UINT | field_id = 0 | |||
| ) | [inline] |
Definition at line 933 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_CreateLdid.
| WN* WN_CreatePragma | ( | WN_PRAGMA_ID | pragma_name, | |
| ST_IDX | st, | |||
| INT32 | arg1, | |||
| INT32 | arg2 | |||
| ) | [inline] |
Definition at line 1020 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_CreateRcomma.
Definition at line 763 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_CreateReturn_Val.
| WN * WN_CreateStid | ( | OPCODE | opc, | |
| WN_OFFSET | offset, | |||
| ST * | st, | |||
| TY_IDX | ty, | |||
| WN * | value, | |||
| UINT | field_id = 0 | |||
| ) | [inline] |
Definition at line 825 of file wn.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), and WN_CreateStid.
| WN* WN_CreateXpragma | ( | WN_PRAGMA_ID | pragma_name, | |
| ST_IDX | st, | |||
| INT16 | kid_count | |||
| ) | [inline] |
| WN* WN_generic_intrinsic | ( | OPERATOR | opr, | |
| TYPE_ID | rtype, | |||
| TYPE_ID | desc, | |||
| INT32 | n, | |||
| INTRINSIC | intrinsic | |||
| ) |
Definition at line 1143 of file wn_verifier.cxx.
Definition at line 1071 of file wn_verifier.cxx.
Definition at line 1383 of file wn_verifier.cxx.
1.5.6