#include <stdarg.h>#include <stdio.h>#include <strings.h>#include <time.h>#include <unistd.h>#include <string.h>#include <stdint.h>#include "defs.h"#include "config_wopt.h"#include "opt_defs.h"#include "opt_sys.h"#include "errors.h"#include "tracing.h"#include "srcpos.h"#include "tlog.h"#include "optimizer.h"#include "opt_bb.h"#include "erglob.h"#include "opt_htable.h"#include "opt_cfg.h"

Go to the source code of this file.
Data Types | |
| module | SET_VOLMAP_FOR_CR |
Defines | |
| #define | opt_util_CXX "opt_util.cxx" |
| #define | __STDC_LIMIT_MACROS |
Functions/Subroutines | |
| void | Warn_todo (const char *msg,...) |
| static void | Opt_tlog2 (char *, long long, char *) |
| static int | Opt_tlog_trace (void) |
| void | Opt_tlog (char *keyword, long long srcpos, const char *fmt,...) |
| static void | Opt_tlog2 (char *keyword, INT64 srcpos, char *msg) |
| void | Set_tlog_phase (const INT32 phase) |
| INT | Set_opt_phase (INT32 *phase_id, const char *subphase) |
| INT | Report_statistics () |
| static INT32 | Sign (INT64 v) |
| NUM_VARIANTS | Find_one_variant (BB_NODE *bb, CODEREP *vr, CODEREP *cr, NUMBER *factor, CODEMAP *htable) |
| static BOOL | set_volatile_mapCR (CODEREP *cr, STMTREP *stmt, BVECTOR &visited, BVECTOR &vol) |
| void | Set_volatile_map (CFG *cfg, BVECTOR &vol) |
Variables | |
| const int | MAX_WARN_LEN = 1024 |
| const int | MAX_WARN_MESSAGES = 1024 |
| static char * | warn_msg [MAX_WARN_MESSAGES] |
| static int | n_msgs = 0 |
| static const char * | tlog_phase = NULL |
| const INT32 | PHASE_STRLEN = 72 |
| const INT32 | MAX_SUBPHASES = 200 |
| static char | phase_name [PHASE_STRLEN] |
| static const char * | phases [MAX_SUBPHASES] |
| static INT32 | times [MAX_SUBPHASES] |
| static INT32 | reps [MAX_SUBPHASES] |
| static INT32 | cum_times [MAX_SUBPHASES] |
| static float | peak_times [MAX_SUBPHASES] |
| static INT32 | total_time |
| static INT32 | curr_phase = 0 |
| static INT32 | max_phase = 0 |
| static INT32 | prev_time = 0 |
| static UINT64 | mem [MAX_SUBPHASES] |
| static void * | prev_mem = NULL |
| #define __STDC_LIMIT_MACROS |
Definition at line 68 of file opt_util.cxx.
| #define opt_util_CXX "opt_util.cxx" |
Definition at line 63 of file opt_util.cxx.
| NUM_VARIANTS Find_one_variant | ( | BB_NODE * | bb, | |
| CODEREP * | vr, | |||
| CODEREP * | cr, | |||
| NUMBER * | factor, | |||
| CODEMAP * | htable | |||
| ) |
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().
Definition at line 130 of file opt_util.cxx.
References fprintf(), len, MAX_WARN_LEN, Opt_tlog2(), Opt_tlog_trace(), strlen(), va_end, va_start, and vsprintf().
Referenced by SSA::Create_CODEMAP(), COMP_UNIT::Do_copy_propagate(), ETABLE::Perform_LPRE_optimization(), ETABLE::Perform_PRE_optimization(), ETABLE::Perform_SPRE_optimization(), IVR::~IVR(), LFTR::~LFTR(), and OPT_STAB::~OPT_STAB().
Referenced by Opt_tlog().
Definition at line 182 of file opt_util.cxx.
References Get_Trace(), TP_PTRACE1, and TP_PTRACE1_OPT.
Referenced by Opt_tlog().
| 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().
| static BOOL set_volatile_mapCR | ( | CODEREP * | cr, | |
| STMTREP * | stmt, | |||
| BVECTOR & | visited, | |||
| BVECTOR & | vol | |||
| ) | [static] |
Definition at line 536 of file opt_util.cxx.
References BOOL, bool, CK_CONST, CK_DELETED, CK_IVAR, CK_LDA, CK_OP, CK_RCONST, CK_VAR, CODEREP::Coderep_id(), FALSE, FmtAssert, CODEREP::Get_ivar_vsym(), i, CODEREP::Ilod_base(), INT32, CODEREP::Is_ivar_volatile(), CODEREP::Is_var_volatile(), CODEREP::Istr_base(), CODEREP::Kid_count(), CODEREP::Kind(), STMTREP::Lhs(), CODEREP::Mload_size(), CODEREP::Mstore_size(), NULL, STMTREP::Op(), OPCODE_is_store(), OPERATOR_is_volatile(), CODEREP::Opnd(), CODEREP::Opr(), OPR_MLOAD, and TRUE.
Referenced by SET_VOLMAP_FOR_CR::operator()().
| void Warn_todo | ( | const char * | msg, | |
| ... | ||||
| ) |
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().
INT32 cum_times[MAX_SUBPHASES] [static] |
INT32 curr_phase = 0 [static] |
Definition at line 225 of file opt_util.cxx.
Referenced by Report_statistics(), and Set_opt_phase().
Definition at line 226 of file opt_util.cxx.
Referenced by Report_statistics(), and Set_opt_phase().
| const INT32 MAX_SUBPHASES = 200 |
Definition at line 217 of file opt_util.cxx.
Referenced by Report_statistics(), and Set_opt_phase().
| const int MAX_WARN_LEN = 1024 |
Definition at line 89 of file opt_util.cxx.
Referenced by Ipa_Inline_tlog(), Ipl_tlog(), Opt_tlog(), and Warn_todo().
| const int MAX_WARN_MESSAGES = 1024 |
UINT64 mem[MAX_SUBPHASES] [static] |
Definition at line 228 of file opt_util.cxx.
Referenced by _dwarf_free_special_error(), _dwarf_special_no_dbg_error_malloc(), alpha_expand_block_clear(), alpha_expand_epilogue(), alpha_expand_prologue(), alpha_split_compare_and_swap_12(), alpha_split_lock_test_and_set_12(), arm_gen_load_multiple(), arm_gen_movmemqi(), arm_gen_movstrqi(), arm_gen_store_multiple(), assign_parm_setup_block(), Cif_Putrecord(), clipper_builtin_saveregs(), coff_pe_mips_relocate_section(), combine_bnp(), cris_expand_epilogue(), cris_expand_pic_call_address(), cris_expand_prologue(), cris_split_movdx(), crx_expand_movmem_single(), d30v_adjust_cost(), d_pointer_to_member_type(), df_rtx_mem_replace(), do_spill(), emit_frame_save(), emit_frame_store_1(), emit_group_load(), emit_group_load_1(), emit_ldst(), emit_move_insn_1(), expand_asm_operands(), expand_builtin_setjmp_setup(), expand_expr_constant(), expand_interrupt_handler_epilogue(), find_reloads_toplev(), fix_bit_operand(), fixup_memory_subreg(), fold_name(), frv_expand_epilogue(), frv_frame_access(), frv_volatile_memref(), gather_mem_refs_stmt(), gen_const_mem(), gen_ffssi2(), gen_frame_mem(), gen_inlined_tls_plt(), gen_tmp_stack_mem(), get_memory_rtx(), gs_mempool_address2byteofst(), GTY(), hppa_expand_prologue(), i860_gimplify_va_arg_expr(), i860_va_start(), ia64_expand_compare_and_swap(), ia64_expand_fetch_and_op(), ia64_expand_lock_release(), ia64_expand_lock_test_and_set(), ia64_expand_op_and_fetch(), ia64_ld_address_bypass_p(), ia64_speculate_insn(), ia64_st_address_bypass_p(), init_expr_once(), init_propagate_block_info(), init_set_costs(), insert_restore(), insert_save(), insn_dead_p(), iq2000_setup_incoming_varargs(), ix86_check_movabs(), ix86_expand_clrmem(), ix86_expand_strlensi_unroll_1(), ix86_expand_vector_extract(), ix86_expand_vector_set(), ix86_setup_incoming_varargs(), ix86_va_arg(), load_mems(), load_register_parameters(), machopic_legitimize_pic_address(), may_alias_p(), mdx_epilogue(), mdx_prologue(), memory_move_secondary_cost(), memref_hash(), mips_save_restore_reg(), mips_setup_incoming_varargs(), mn10300_builtin_saveregs(), output_stack_adjust(), pinsn(), prescan_loop(), put_abs(), remap_symbols(), remove_reachable_equiv_notes(), replace_store_insn(), Report_Delta_Time(), Report_statistics(), rs6000_aix_emit_builtin_unwind_init(), rs6000_emit_epilogue(), rs6000_emit_prologue(), rs6000_emit_stack_tie(), rs6000_expand_vector_extract(), rs6000_expand_vector_init(), rs6000_expand_vector_set(), rs6000_legitimize_tls_address(), save_gprs(), save_or_restore_regs(), Set_opt_phase(), setup_incoming_varargs(), sh_builtin_saveregs(), sjlj_emit_dispatch_table(), sjlj_emit_function_enter(), sjlj_mark_call_sites(), sparc_struct_value_rtx(), spill_restore_mem(), spill_tfmode_operand(), subst_reg_equivs(), v850_reorg(), verify_class_type(), xstormy16_asm_output_aligned_common(), and xtensa_emit_block_move().
int n_msgs = 0 [static] |
float peak_times[MAX_SUBPHASES] [static] |
char phase_name[PHASE_STRLEN] [static] |
| const INT32 PHASE_STRLEN = 72 |
const char* phases[MAX_SUBPHASES] [static] |
Definition at line 219 of file opt_util.cxx.
INT32 reps[MAX_SUBPHASES] [static] |
Definition at line 221 of file opt_util.cxx.
Referenced by compute_vuse_representatives(), Report_statistics(), and Set_opt_phase().
INT32 times[MAX_SUBPHASES] [static] |
Definition at line 220 of file opt_util.cxx.
const char* tlog_phase = NULL [static] |
Definition at line 187 of file opt_util.cxx.
Referenced by Ipa_Inline_tlog2(), Ipl_tlog2(), Opt_tlog2(), Set_ipa_tlog_phase(), and Set_tlog_phase().
INT32 total_time [static] |
char* warn_msg[MAX_WARN_MESSAGES] [static] |
1.5.6