Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
wn_simp.cxx File Reference
#include "defs.h"
#include "errors.h"
#include "erglob.h"
#include "tracing.h"
#include "wn.h"
#include "stab.h"
#include "wn_util.h"
#include "ir_reader.h"
#include "config.h"
#include "config_opt.h"
#include "config_targ.h"
#include "const.h"
#include "targ_const.h"
#include "opt_alias_interface.h"
#include "wn_simp.h"
#include "upc_symtab_utils.h"
#include "wn_simp_code.h"
Include dependency graph for wn_simp.cxx:

Go to the source code of this file.

Defines

#define TRACEFILE   TFile
#define WN_SIMP_WORKING_ON_WHIRL
#define SIMPNODE_operator(x)   WN_operator(x)
#define SIMPNODE_rtype(x)   WN_rtype(x)
#define SIMPNODE_desc(x)   WN_desc(x)
#define SIMPNODE_opcode   WN_opcode
#define SIMPNODE_load_offset   WN_load_offset
#define SIMPNODE_cvtl_bits   WN_cvtl_bits
#define SIMPNODE_st   WN_st
#define SIMPNODE_st_idx   WN_st_idx
#define SIMPNODE_ty   WN_ty
#define SIMPNODE_kid0   WN_kid0
#define SIMPNODE_kid1   WN_kid1
#define SIMPNODE_kid   WN_kid
#define SIMPNODE_element_size   WN_element_size
#define SIMPNODE_idname_offset   WN_idname_offset
#define SIMPNODE_lda_offset   WN_lda_offset
#define SIMPNODE_num_dim   WN_num_dim
#define SIMPNODE_array_base   WN_array_base
#define SIMPNODE_array_index   WN_array_index
#define SIMPNODE_array_dim   WN_array_dim
#define SIMPNODE_intrinsic   WN_intrinsic
#define SIMPNODE_kid_count   WN_kid_count
#define SIMPNODE_kid   WN_kid
#define SIMPNODE_const_val   WN_const_val
#define SIMPNODE_fconst_val   Const_Val
#define SIMPNODE_field_id   WN_field_id
#define SIMPNODE_i_field_id   WN_field_id
#define SIMPNODE_bit_offset   WN_bit_offset
#define SIMPNODE_i_bit_offset   WN_bit_offset
#define SIMPNODE_enable   Enable_WN_Simp
#define SIMPNODE_op_bit_offset   WN_bit_offset
#define SIMPNODE_op_bit_size   WN_bit_size
#define SIMPNODE_SimpCreateExp1   WN_SimpCreateExp1
#define SIMPNODE_SimpCreateExp2   WN_SimpCreateExp2
#define SIMPNODE_SimpCreateExp3   WN_SimpCreateExp3
#define SIMPNODE_SimpCreateCvtl   WN_SimpCreateCvtl
#define SIMPNODE_SimpCreateExtract   WN_SimpCreateExtract
#define SIMPNODE_SimpCreateDeposit   WN_SimpCreateDeposit
#define SIMPNODE_TREE_DELETE   WN_DELETE_Tree
#define SIMPNODE_DELETE   WN_Delete
#define SIMPNODE_CopyNode   WN_CopyNode
#define SIMPNODE_CreateIntconst   WN_CreateIntconst
#define SIMPNODE_CreateFloatconstFromTcon   Make_Const
#define SIMPNODE_Simplify_Initialize   WN_Simplify_Initialize
#define SIMPNODE_Compare_Symbols   WN_Compare_Symbols
#define SIMPNODE_SimplifyExp1   WN_SimplifyExp1
#define SIMPNODE_SimplifyExp2   WN_SimplifyExp2
#define SIMPNODE_SimplifyExp3   WN_SimplifyExp3
#define SIMPNODE_SimplifyCvtl   WN_SimplifyCvtl
#define SIMPNODE_SimplifyIntrinsic   WN_SimplifyIntrinsic
#define SIMPNODE_SimplifyIload   WN_SimplifyIload
#define SIMPNODE_SimplifyIstore   WN_SimplifyIstore
#define SIMPNODE_SimplifyPstore   WN_SimplifyPstore
#define SIMPNODE_Simp_Compare_Trees   WN_Simp_Compare_Trees

Typedefs

typedef WNsimpnode

Functions

static void show_tree (OPCODE opc, WN *k0, WN *k1, WN *r)
WNWN_Simplify_Tree (WN *t, ALIAS_MANAGER *alias_manager)
WNWN_Simplify_Rebuild_Expr_Tree (WN *t, ALIAS_MANAGER *alias_manager)
BOOL WN_Simplifier_Enable (BOOL enable)
static INT32 WN_Compare_Symbols (simpnode t1, simpnode t2)
static simpnode WN_SimpCreateExp3 (OPCODE opc, simpnode k0, simpnode k1, simpnode k2)
static simpnode WN_SimpCreateExp2 (OPCODE opc, simpnode k0, simpnode k1)
static simpnode WN_SimpCreateExp1 (OPCODE opc, simpnode k0)
static simpnode WN_SimpCreateCvtl (OPCODE opc, INT16 bits, simpnode k0)
static simpnode WN_SimpCreateExtract (OPCODE opc, INT16 boffset, INT16 bsize, simpnode k0)
static simpnode WN_SimpCreateDeposit (OPCODE opc, INT16 boffset, INT16 bsize, simpnode k0, simpnode k1)
static void SIMPNODE_Simplify_Initialize (void)

Variables

BOOL WN_Simp_Fold_ILOAD = FALSE
BOOL WN_Simp_Fold_LDA = FALSE
WN_MAP WN_SimpParentMap = WN_MAP_UNDEFINED

Define Documentation

Definition at line 106 of file wn_simp.cxx.

Referenced by SIMPNODE_Simp_Compare_Trees().

Definition at line 108 of file wn_simp.cxx.

Referenced by SIMPNODE_Simp_Compare_Trees().

Definition at line 107 of file wn_simp.cxx.

Referenced by SIMPNODE_Simp_Compare_Trees().

Definition at line 116 of file wn_simp.cxx.

Referenced by SIMPNODE_Simp_Compare_Trees().

Definition at line 112 of file wn_simp.cxx.

Referenced by SIMP_Int_ConstVal(), and SIMPNODE_Simp_Compare_Trees().

Definition at line 132 of file wn_simp.cxx.

Referenced by Fold2_Into_Select(), simp_shift(), and simp_times().

Definition at line 133 of file wn_simp.cxx.

Definition at line 95 of file wn_simp.cxx.

Referenced by simp_cvtl(), and SIMPNODE_Simp_Compare_Trees().

#define SIMPNODE_DELETE   WN_Delete

Definition at line 131 of file wn_simp.cxx.

Referenced by cancel_in_relop(), simp_delete(), and simp_shift().

#define SIMPNODE_desc (   x)    WN_desc(x)

Definition at line 92 of file wn_simp.cxx.

Referenced by SIMPNODE_Simp_Compare_Trees().

Definition at line 102 of file wn_simp.cxx.

Referenced by SIMPNODE_Simp_Compare_Trees().

Definition at line 113 of file wn_simp.cxx.

Referenced by SIMP_Flt_ConstVal().

Definition at line 114 of file wn_simp.cxx.

Referenced by SIMPNODE_Simp_Compare_Trees().

Definition at line 117 of file wn_simp.cxx.

Referenced by SIMPNODE_Simp_Compare_Trees().

Definition at line 115 of file wn_simp.cxx.

Referenced by SIMPNODE_Simp_Compare_Trees().

Definition at line 103 of file wn_simp.cxx.

Referenced by SIMPNODE_Simp_Compare_Trees().

Definition at line 109 of file wn_simp.cxx.

Referenced by SIMPNODE_Simp_Compare_Trees().

#define SIMPNODE_kid   WN_kid

Definition at line 111 of file wn_simp.cxx.

Definition at line 110 of file wn_simp.cxx.

Referenced by SIMPNODE_Simp_Compare_Trees().

Definition at line 94 of file wn_simp.cxx.

Referenced by SIMPNODE_Simp_Compare_Trees().

Definition at line 105 of file wn_simp.cxx.

Referenced by SIMPNODE_Simp_Compare_Trees().

Definition at line 119 of file wn_simp.cxx.

Referenced by simp_bior(), and SIMPNODE_Simp_Compare_Trees().

Definition at line 120 of file wn_simp.cxx.

Referenced by simp_bior(), and SIMPNODE_Simp_Compare_Trees().

Definition at line 151 of file wn_simp.cxx.

Definition at line 127 of file wn_simp.cxx.

Referenced by simp_cvtl().

Definition at line 129 of file wn_simp.cxx.

Definition at line 124 of file wn_simp.cxx.

Definition at line 125 of file wn_simp.cxx.

Definition at line 126 of file wn_simp.cxx.

Definition at line 128 of file wn_simp.cxx.

#define SIMPNODE_Simplify_Initialize   WN_Simplify_Initialize

Definition at line 135 of file wn_simp.cxx.

Definition at line 145 of file wn_simp.cxx.

Definition at line 142 of file wn_simp.cxx.

Definition at line 143 of file wn_simp.cxx.

Definition at line 144 of file wn_simp.cxx.

Definition at line 147 of file wn_simp.cxx.

Definition at line 146 of file wn_simp.cxx.

Definition at line 148 of file wn_simp.cxx.

Definition at line 149 of file wn_simp.cxx.

#define SIMPNODE_st   WN_st

Definition at line 96 of file wn_simp.cxx.

Referenced by SIMPNODE_SimplifyExp2_h().

#define SIMPNODE_st_idx   WN_st_idx

Definition at line 97 of file wn_simp.cxx.

Referenced by get_lda_info(), and WN_Compare_Symbols().

Definition at line 130 of file wn_simp.cxx.

Referenced by simp_delete_tree().

#define SIMPNODE_ty   WN_ty

Definition at line 98 of file wn_simp.cxx.

Referenced by cancel_in_relop().

#define TRACEFILE   TFile

Definition at line 78 of file wn_simp.cxx.

Referenced by show_rule(), and show_tree().

Definition at line 82 of file wn_simp.cxx.


Typedef Documentation

typedef WN* simpnode

Definition at line 87 of file wn_simp.cxx.


Function Documentation

static void show_tree ( OPCODE  opc,
WN k0,
WN k1,
WN r 
) [static]

Definition at line 153 of file wn_simp.cxx.

References fdump_tree(), fprintf(), OPCODE_name(), OPCODE_operator(), OPR_CVTL, and TRACEFILE.

Here is the call graph for this function:

static void SIMPNODE_Simplify_Initialize ( void  ) [static]

Definition at line 530 of file wn_simp.cxx.

References Get_Trace(), SIMPNODE_simp_initialized, TP_WHIRLSIMP, trace_rules, trace_trees, and TRUE.

Here is the call graph for this function:

static INT32 WN_Compare_Symbols ( simpnode  t1,
simpnode  t2 
) [static]

Definition at line 408 of file wn_simp.cxx.

References SIMPNODE_st_idx.

static simpnode WN_SimpCreateCvtl ( OPCODE  opc,
INT16  bits,
simpnode  k0 
) [static]

Definition at line 485 of file wn_simp.cxx.

References wn, WN_Create(), WN_cvtl_bits(), WN_kid0(), WN_MAP_Set, WN_MAP_UNDEFINED, WN_SimplifyCvtl(), and WN_SimpParentMap.

Here is the call graph for this function:

static simpnode WN_SimpCreateDeposit ( OPCODE  opc,
INT16  boffset,
INT16  bsize,
simpnode  k0,
simpnode  k1 
) [static]

Definition at line 514 of file wn_simp.cxx.

References wn, WN_Create(), WN_kid0(), WN_kid1(), WN_MAP_Set, WN_MAP_UNDEFINED, WN_set_bit_offset_size(), and WN_SimpParentMap.

Here is the call graph for this function:

static simpnode WN_SimpCreateExp1 ( OPCODE  opc,
simpnode  k0 
) [static]

Definition at line 469 of file wn_simp.cxx.

References wn, WN_Create(), WN_kid0(), WN_MAP_Set, WN_MAP_UNDEFINED, WN_SimplifyExp1(), and WN_SimpParentMap.

Here is the call graph for this function:

static simpnode WN_SimpCreateExp2 ( OPCODE  opc,
simpnode  k0,
simpnode  k1 
) [static]

Definition at line 451 of file wn_simp.cxx.

References wn, WN_Create(), WN_kid0(), WN_kid1(), WN_MAP_Set, WN_MAP_UNDEFINED, WN_SimplifyExp2(), and WN_SimpParentMap.

Here is the call graph for this function:

static simpnode WN_SimpCreateExp3 ( OPCODE  opc,
simpnode  k0,
simpnode  k1,
simpnode  k2 
) [static]

Definition at line 430 of file wn_simp.cxx.

References wn, WN_Create(), WN_kid(), WN_kid0(), WN_kid1(), WN_MAP_Set, WN_MAP_UNDEFINED, WN_SimplifyExp3(), and WN_SimpParentMap.

Here is the call graph for this function:

static simpnode WN_SimpCreateExtract ( OPCODE  opc,
INT16  boffset,
INT16  bsize,
simpnode  k0 
) [static]

Definition at line 501 of file wn_simp.cxx.

References wn, WN_Create(), WN_kid0(), WN_MAP_Set, WN_MAP_UNDEFINED, WN_set_bit_offset_size(), and WN_SimpParentMap.

Here is the call graph for this function:

Definition at line 400 of file wn_simp.cxx.

Referenced by cwh_whirl_simplfier_control(), main(), and WN_LOOP_TripCount().


Variable Documentation

Definition at line 71 of file wn_simp.cxx.

Definition at line 73 of file wn_simp.cxx.

Referenced by simp_add_sub().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines