#include "srcpos.h"#include "opcode_gen_core.h"#include <vector>#include "segmented_array.h"


Go to the source code of this file.
Data Types | |
| module | NUMBER |
Defines | |
| #define | opt_util_INCLUDED "opt_util.h" |
| #define | SET_OPT_PHASE(str) (void) Set_opt_phase(NULL, str) |
| #define | SET_OPT_REPEAT_PHASE(phase_id, str) (void) Set_opt_phase(&phase_id, str) |
| #define | REPORT_STATISTICS() Report_statistics() |
Typedefs | |
| typedef mempool_allocator< bool > | BVECTOR_ALLOCATOR |
| typedef vector< bool, BVECTOR_ALLOCATOR > | BVECTOR |
Enumerations | |
| enum | NUMBER_DESC { NUMBER_INVALID, NUMBER_OVERFLOW, NUMBER_UNKNOWN, NUMBER_KNOWN } |
| enum | NUM_VARIANTS { NO_VARIANT = 0, ONE_VARIANT = 1, NOT_ONE_VARIANT = 2 } |
Functions/Subroutines | |
| void | Warn_todo (const char *,...) |
| void | Opt_tlog (const char *keyword, SRCPOS srcpos, const char *fmt,...) |
| void | Set_tlog_phase (const INT32 phase) |
| NUM_VARIANTS | Find_one_variant (BB_NODE *bb, CODEREP *iv, CODEREP *expr, NUMBER *, CODEMAP *htable=NULL) |
| INT | Set_opt_phase (INT32 *, const char *) |
| INT | Report_statistics () |
| void | Set_volatile_map (CFG *cfg, BVECTOR &vol) |
| #define opt_util_INCLUDED "opt_util.h" |
Definition at line 55 of file opt_util.h.
| #define REPORT_STATISTICS | ( | ) | Report_statistics() |
Definition at line 141 of file opt_util.h.
Referenced by Analyze_pu_attr(), SSU::Construct(), OPT_STAB::Create(), Do_Pre_Before_Ivr(), ETABLE::Perform_LPRE_optimization(), ETABLE::Perform_PRE_optimization(), ETABLE::Perform_SPRE_optimization(), ETABLE::Perform_VNFRE_optimization(), Pre_Optimizer(), and Verify_Codemap().
Definition at line 142 of file opt_util.h.
Referenced by VALNUM_FRE::_expression_redundancy_elimination(), VALNUM_FRE::_ivc_substitute(), VALNUM_FRE::apply(), ETABLE::Perform_LPRE_optimization(), ETABLE::Perform_PRE_optimization(), and ETABLE::Perform_SPRE_optimization().
| typedef vector<bool, BVECTOR_ALLOCATOR> BVECTOR |
Definition at line 161 of file opt_util.h.
| typedef mempool_allocator<bool> BVECTOR_ALLOCATOR |
Definition at line 160 of file opt_util.h.
| enum NUM_VARIANTS |
| enum NUMBER_DESC |
Definition at line 87 of file opt_util.h.
| NUM_VARIANTS Find_one_variant | ( | BB_NODE * | bb, | |
| CODEREP * | iv, | |||
| CODEREP * | expr, | |||
| NUMBER * | , | |||
| CODEMAP * | htable = NULL | |||
| ) |
Definition at line 401 of file opt_util.cxx.
References CODEREP::Aux_id(), CODEREP::Bitpos(), BOOL, CK_CONST, CK_IVAR, CK_LDA, CK_OP, CK_VAR, CODEREP::Const_val(), NUMBER::Copy(), NUMBER::Eval1(), NUMBER::Eval2(), f0, f1, Find_one_variant(), NUMBER::Init(), BB_NODE::Innermost(), BB_LOOP::Invariant_cr(), CODEREP::Kind(), NO_VARIANT, NOT_ONE_VARIANT, NUMBER_KNOWN, NUMBER_UNKNOWN, ONE_VARIANT, CODEREP::Op(), opc, OPC_I8I4CVT, OPC_U8I4CVT, OPC_U8U4CVT, OPCODE_operator(), CODEREP::Opnd(), OPR_ADD, OPR_CVT, OPR_MPY, OPR_NEG, OPR_PAREN, OPR_SUB, r0, NUMBER::Set_const(), NUMBER::Set_desc(), NUMBER::Set_value(), and WOPT_Enable_LFTR_Ivar.
Referenced by Find_one_variant(), and LFTR::Replace_comparison().
| INT Report_statistics | ( | ) |
Definition at line 275 of file opt_util.cxx.
References cum_times, curr_phase, DBar, f, float, fprintf(), Get_Trace(), i, INT32, max_phase, MAX_SUBPHASES, mem, p, peak_times, reps, TFile, times, TINFO_TIME, TKIND_INFO, and total_time.
Definition at line 235 of file opt_util.cxx.
References CLOCK_IN_MS, curr_phase, DevWarn, Get_Trace(), INT32, max_phase, MAX_SUBPHASES, mem, NULL, phase_name, PHASE_STRLEN, prev_mem, prev_time, reps, sbrk(), Set_Error_Phase(), strncat(), strncpy(), times, TINFO_TIME, and TKIND_INFO.
Definition at line 196 of file opt_util.cxx.
References MAINOPT_PHASE, PREOPT_DUONLY_PHASE, PREOPT_IPA0_PHASE, PREOPT_IPA1_PHASE, PREOPT_LNO_PHASE, PREOPT_PHASE, and tlog_phase.
Referenced by COMP_UNIT::COMP_UNIT().
Definition at line 628 of file opt_util.cxx.
References bool, CODEMAP::Coderep_id_cnt(), FALSE, FOR_ALL_ELEM, FOR_ALL_NODE, CFG::Htable(), NUMBER::Init(), Is_True, CFG::Loc_pool(), OPT_POOL_Pop, OPT_POOL_Push, BB_NODE::Stmtlist(), traverseSR(), and visited.
Referenced by sort_merge_and_delete_zones().
| void Warn_todo | ( | const char * | , | |
| ... | ||||
| ) |
Definition at line 96 of file opt_util.cxx.
References fprintf(), i, len, MAX_WARN_LEN, MAX_WARN_MESSAGES, n_msgs, strcmp(), strdup, va_end, va_start, vsprintf(), and warn_msg.
Referenced by VALNUM_FRE::_contains_undef_val(), VALNUM_FRE::_remove_redundant_phi_nodes(), DCE::Add_goto_stmt(), CODEREP::Antloc_rec(), BB_NODE::Append_stmtrep(), ETABLE::Bottom_up_cr(), ML_WHIRL_EMITTER::Build_loop_info(), EMITTER::Can_raise_to_scf(), ALIAS_CLASSIFICATION::Classify_wn_and_kids(), VALNUM_FRE::collect_cr_occurrences(), IVR::Compute_trip_count(), IVR::Convert_all_ivs(), OPT_STAB::Convert_IO_statement(), CODEREP::Create_cpstmt(), CODEREP::DecUsecnt_rec(), EXP_WORKLST::Determine_inserts_saves_deletions(), STMTREP::Enter_lhs(), CODEREP_CONTAINER::Find_cr(), RVI::Find_loops(), Gen_exp_wn(), Gen_stmt_wn(), EXP_HOISTING::Get_hoisted_exp_occur(), Get_MP_modref(), RVI::Get_wn_local_attributes(), RVI_CTAB::Hash(), CODEMAP::Hash_op_and_canon(), IVR::Ident_all_iv_cands(), CODEREP::IncUsecnt(), VALNUM_FRE::insert_cr_occurrences(), DSE::Is_deleted_statement(), EXP_OCCURS::Is_DT_descendant_of(), RVI::Is_ldid_candidate(), RVI::Is_stid_candidate(), BB_NODE::Kind_name(), ETABLE::LPRE_bottom_up_cr(), RVI::Map_chi_list(), RVI::Map_mu_list(), RVI::Map_mu_node(), DCE::Mark_chinode_live(), RVI::Perform_phase1(), CODEREP::Print_str(), COPYPROP::Prop_const_init_scalar(), ETABLE::Recursive_rehash_and_replace(), BB_LIST::Remove(), BB_LIST_CONTAINER::Remove(), BB_LIST_CONTAINER::Remove_head(), DSE::Required_call(), DCE::Required_call(), DCE::Required_istore(), DCE::Required_store(), CODEREP::Set_usecnt(), OPT_STAB::Simplify_Pointer_Ver(), ETABLE::Stmt_is_redundant(), OPT_PU_POINTS_TO_SUMMARIZER::Summarize_points_to(), DCE::Unreachable_code_elim(), IVR::Update_mp_pragma_list(), Verify_alias(), CODEREP::Verify_CODEMAP(), and WN_is_call_related().
1.5.6