Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
curr.driver.cxx File Reference
#include <sys/types.h>
#include <elf.h>
#include <cmplrs/rcodes.h>
#include <dirent.h>
#include <libgen.h>
#include "defs.h"
#include "dso.h"
#include "errors.h"
#include "err_host.tab"
#include "erglob.h"
#include "erauxdesc.h"
#include "mempool.h"
#include "phase.h"
#include "be_util.h"
#include "wn.h"
#include "driver_util.h"
#include "timing.h"
#include "glob.h"
#include "stab.h"
#include "pu_info.h"
#include "ir_bread.h"
#include "ir_bwrite.h"
#include "config.h"
#include "config_opt.h"
#include "config_list.h"
#include "config_lno.h"
#include "file_util.h"
#include "xstats.h"
#include "data_layout.h"
#include "opt_alias_interface.h"
#include "wn_lower.h"
#include "cgdriver.h"
#include "optimizer.h"
#include "ori.h"
#include "wodriver.h"
#include "lnodriver.h"
#include "ipl_driver.h"
#include "w2c_driver.h"
#include "w2f_driver.h"
#include "prp_driver.h"
#include "anl_driver.h"
#include "region_util.h"
#include "region_main.h"
#include "cg/cg.h"
#include "tracing.h"
#include "ir_reader.h"
#include "dwarf_DST.h"
#include "fb_whirl.h"
#include "eh_region.h"
#include "vho_lower.h"
#include "iter.h"
#include "dra_export.h"
#include "ti_init.h"
#include "omp_lower.h"
#include "cxx_memory.h"
#include "options_stack.h"
#include "be_symtab.h"
#include "prompf.h"
#include "wb_omp.h"
#include "wb_lwr.h"
#include "wb_anl.h"
#include "wn_instrument.h"
#include "mem_ctr.h"
#include "w2c_weak.h"
#include "w2f_weak.h"

Go to the source code of this file.

Defines

#define DSOext   ".so"
#define FEEDBACK_PATH_MAXLEN   1024

Functions

void Initialize_Targ_Info (void)
void Prompf_Emit_Whirl_to_Source (PU_Info *current_pu, WN *func_nd)
static void load_components (INT argc, char **argv)
static void Phase_Init (void)
static void Phase_Fini (void)
char * Get_Orig_PU_Name (PU_Info *current_pu)
static void Save_Cur_PU_Name (char *name, INT rid_id)
static WNAdjust_Opt_Level (PU_Info *current_pu, WN *pu, char *pu_name)
static void Ipl_Processing (PU_Info *current_pu, WN *pu)
static WNLNO_Processing (PU_Info *current_pu, WN *pu)
static void Post_LNO_Processing (PU_Info *current_pu, WN *pu)
static WNWOPT_Processing (PU_Info *current_pu, WN *pu, REGION_CS_ITER *rgn_iter, WN *rwn)
static WNDo_WOPT_and_CG_with_Regions (PU_Info *current_pu, WN *pu)
static void Post_Process_Backend (PU_Info *current_pu, WN *pu)
void Process_Fill_Align_Pragmas (WN *func_wn)
void Rewrite_Pragmas_On_Structs (WN *block_wn, WN *wn)
static void Update_EHRegion_Inito_Used (WN *wn)
static void Update_EHRegion_Inito (WN *pu)
static void Backend_Processing (PU_Info *current_pu, WN *pu)
static WNPreprocess_PU (PU_Info *current_pu)
static void Postprocess_PU (PU_Info *current_pu)
static void Preorder_Process_PUs (PU_Info *current_pu)
static void Print_Tlog_Header (INT argc, char **argv)
static void Process_Feedback_Options (OPTION_LIST *olist)
void be_debug (void)
INT main (INT argc, char **argv)

Variables

static INT ecount = 0
static BOOL need_wopt_output = FALSE
static BOOL need_lno_output = FALSE
static BOOL need_ipl_output = FALSE
static Output_Fileir_output = 0
static OPTIONS_STACKOptions_Stack
static BOOL reset_opt_level = FALSE
static struct ALIAS_MANAGER * alias_mgr = NULL
static BOOL Run_Distr_Array = FALSE
BOOL Run_MemCtr = FALSE
static BOOL Saved_run_prompf = FALSE
static BOOL Saved_run_w2c = FALSE
static BOOL Saved_run_w2f = FALSE
static BOOL Saved_run_w2fc_early = FALSE
WN_MAP Prompf_Id_Map
static BOOL wopt_loaded = FALSE
BOOL Prompf_anl_loaded
BOOL Purple_loaded
BOOL Whirl2f_loaded
BOOL Whirl2c_loaded
void * Current_Dep_Graph
FILE * DFile = stderr

Define Documentation

#define DSOext   ".so"

Definition at line 120 of file curr.driver.cxx.

Referenced by load_components(), and main().

#define FEEDBACK_PATH_MAXLEN   1024

Definition at line 1642 of file curr.driver.cxx.

Referenced by Process_Feedback_Options().


Function Documentation

void be_debug ( void  )

Definition at line 1699 of file curr.driver.cxx.

Referenced by main().

static WN* Do_WOPT_and_CG_with_Regions ( PU_Info current_pu,
WN pu 
) [static]

Definition at line 904 of file curr.driver.cxx.

References alias_mgr, DST_idx::byte_idx, Calculate_Stack_Frame_Sizes(), Cur_PU_Feedback, Cur_PU_Name, CURRENT_SYMTAB, Delay_U64_Lowering, DST_INVALID_BYTE_IDX, FALSE, fdump_region_tree(), fdump_tree(), Feedback_Enabled, FmtAssert, fprintf(), Generate_region_boundaries(), Get_Current_PU(), Get_Trace(), Initialize_Stack_Frame(), Instrumentation_Enabled, Instrumentation_Phase_Num, Is_True, LOWER_SCF, LOWER_TO_CG, MEM_pu_nz_pool_ptr, MEM_pu_pool, need_wopt_output, NULL, Only_Unsigned_64_Bit_Ops, OPC_FUNC_ENTRY, OPTIONS_STACK::Pop_Current_Options(), OPTIONS_STACK::Process_Pragma_Options(), PROFILE_PHASE_BEFORE_CG, PROFILE_PHASE_BEFORE_WOPT, PU_has_region(), PU_Info_proc_sym, REGION_consistency_check(), REGION_CS_ITER_init(), REGION_CS_ITER_is_not_stacked, REGION_CS_ITER_is_pu, REGION_CS_NoEarlierSub_First(), REGION_CS_NoEarlierSub_Next(), REGION_CS_NoEarlierSub_While(), REGION_get_rid(), REGION_remove_and_mark(), REGION_replace_from_mark(), Report_CG_Region_Timing(), RID_contains_bounds, RID_id, RID_options, RID_set_print(), RID_type, RID_TYPE_func_entry, RID_TYPE_loop, RID_TYPE_olimit, RID_TYPE_pragma, RID_TYPE_undefined, RID_WN_Tree_Print(), Run_cg, Run_wopt, Save_Cur_PU_Name(), Set_Current_Region_For_Trace(), Set_Error_Phase(), Set_PU_Info_tree_ptr, Show_Progress, ST_name(), TFile, Tim_File, TP_REGION, TRUE, TT_REGION_ALL, TT_REGION_BOUND_DEBUG, TT_REGION_CG_DEBUG, U64_lower_wn(), FEEDBACK::Verify(), Verify_SYMTAB(), WB_LWR_Initialize(), WB_LWR_Terminate(), WN_Annotate(), WN_Instrument(), WN_Lower(), WN_opcode(), WOPT_Processing(), and Write_PU_Info().

Referenced by Backend_Processing().

Here is the call graph for this function:

void Initialize_Targ_Info ( void  )

Definition at line 42 of file driver_targ.cxx.

Referenced by load_components().

INT main ( INT  argc,
char **  argv 
)

Definition at line 1703 of file curr.driver.cxx.

References be_debug(), Be_scope_tab, BE_SCOPE::be_st_tab, BE_symtab_alloc_scope_level(), BE_symtab_free_be_scopes(), BE_symtab_initialize_be_scopes(), Cleanup_Files(), RELATED_SEGMENTED_ARRAY< T, block_size >::Clear(), Close_Output_Info(), Configure(), Configure_Source(), Cur_PU_Name, CXX_NEW, DBar, DRA_Initialize(), DSOext, EC_File_Olimit_Exceeded, ecount, Emit_Global_Data, EP_BE, EP_CG, ErrMsg(), ERROR_LINE_UNKNOWN, exit(), FALSE, Feedback_Option, File_info, FILE_INFO_ipa(), FILE_INFO_needs_lno(), Finish_Compilation_Timing(), fprintf(), Get_Error_Count(), Get_Phase_Args(), Get_Trace(), Global_File_Name, GLOBAL_SYMTAB, Had_Internal_Error(), Handle_Signals(), Inhibit_EH_opt, Init_Error_Handler(), Init_Operator_To_Opcode_Table(), Initialize_Special_Global_Symbols(), Initialize_Stats(), Initialize_Symbol_Tables(), Instrumentation_Enabled, Instrumentation_Phase_Num, Ipl_Extra_Output(), Irb_File, Irb_File_Name, Is_True, List_All_Options, List_Compile_Options(), List_Enabled, LNO_Path, load_components(), load_so(), Lst_File, Malloc_Mem_Pool, Max_Src_Olimit, MEM_Initialize(), MEM_POOL_Pop, MEM_POOL_Push, MEM_src_nz_pool, MEM_src_pool, MEM_Trace(), MEM_Tracing_Enable(), need_ipl_output, need_lno_output, need_wopt_output, New_Scope(), NULL, Olimit, Olimit_opt, Open_Global_Input(), Open_Input_Info(), Open_Local_Input(), Opt_Level, phase_argc, phase_argv, Phase_Fini(), Phase_Init(), PHASE_LNO, PHASE_WOPT, Preconfigure(), Preorder_Process_PUs(), Prepare_Listing_File(), Prepare_Source(), Print_Tlog_Header(), Print_Total_Stats(), Process_Command_Line(), Process_Feedback_Options(), PROFILE_PHASE_IPA_CUTOFF, PROFILE_PHASE_NONE, PU_Info_next, OPTIONS_STACK::Push_Current_Options(), RC_INTERNAL_ERROR, RC_NORECOVER_USER_ERROR, RC_OKAY, Read_Global_Data, Read_Global_Info(), Reset_Timers(), Run_autopar, Run_cg, Run_Distr_Array, Run_Dsm_Cloner, Run_Dsm_Common_Check, Run_ipl, Run_lno, Run_preopt, Run_wopt, Scope_tab, Set_Error_Descriptor(), Set_Error_File(), Set_Error_Line(), Set_Error_Phase(), Set_Error_Source(), Show_OPT_Warnings, Show_Progress, Src_File_Name, SCOPE::st_tab, Start_Timer(), Stop_Timer(), T_BE_Comp, T_ReadIR_Comp, Terminate(), TFile, Tim_File, TKIND_ALLOC, Tlog_File, TP_MISC, TRUE, wopt_loaded, WOPT_Path, and Write_Global_Info().

static void Post_Process_Backend ( PU_Info current_pu,
WN pu 
) [static]

Definition at line 1120 of file curr.driver.cxx.

References alias_mgr, FALSE, fdump_region_tree(), fprintf(), Get_Trace(), MEM_pu_nz_pool_ptr, NULL, PU_Info_pu_dst, RID_WN_Tree_Print(), Run_cg, TFile, TP_REGION, and TT_REGION_ALL.

Referenced by Backend_Processing().

Here is the call graph for this function:

static WN* Preprocess_PU ( PU_Info current_pu) [static]

Definition at line 1323 of file curr.driver.cxx.

References Adjust_Opt_Level(), Anl_Init_Map(), Anl_Static_Analysis(), Be_scope_tab, BE_symtab_alloc_scope_level(), Check_for_IR_Dump(), Cur_PU_Feedback, Current_Map_Tab, Current_pu, Current_PU_Count(), Current_PU_Info, CURRENT_SYMTAB, CXX_NEW, FALSE, Feedback_Enabled, fprintf(), Get_Current_PU(), Get_Orig_PU_Name(), Get_Trace(), Initialize_PU_Stats(), Instrumentation_Enabled, Instrumentation_Phase_Num, Is_Set_PU_Info_flags, Is_True, Lowering_Initialize(), MEM_POOL_Push, MEM_pu_nz_pool_ptr, MEM_pu_pool, MEM_pu_pool_ptr, NULL, Orig_PU_Name, PROFILE_PHASE_BEFORE_VHO, PROFILE_PHASE_LAST, Prompf_Id_Map, PU_has_region(), PU_Info_feedback_ptr, PU_Info_maptab, PU_Info_proc_sym, PU_Info_state, PU_Info_tree_ptr, PU_IS_COMPILER_GENERATED, PU_IS_DRA_CLONE, PU_is_nested_func(), PU_lexical_level(), PU_mp(), Pu_Hdr::pu_num_br_entries, Pu_Hdr::pu_num_call_entries, Pu_Hdr::pu_num_inv_entries, Pu_Hdr::pu_num_loop_entries, Pu_Hdr::pu_num_scircuit_entries, Pu_Hdr::pu_num_switch_entries, Read_Feedback_Info(), Read_Local_Info(), REGION_Initialize(), growing_table::Register(), Restore_Local_Symtab(), Run_cg, Run_prompf, Run_purple, Run_w2c, Run_w2f, Run_w2fc_early, Run_wopt, Save_Cur_PU_Name(), Saved_run_prompf, Saved_run_w2c, Saved_run_w2f, Saved_run_w2fc_early, Scope_tab, Set_Current_PU_For_Trace(), Show_Progress, ST_name(), SCOPE::st_tab, Start_Timer(), Stop_Timer(), Subsect_InMem, T_ReadIR_CU, TFile, Tlog_File, TP_IR_READ, TP_REGION, TRUE, TT_REGION_ALL, FEEDBACK::Verify(), WB_ANL_Initialize(), WB_ANL_Terminate(), WN_Annotate(), WN_Instrument(), WN_Mem_Push(), wopt_loaded, WT_FEEDBACK, and WT_TREE.

Referenced by Preorder_Process_PUs().

Here is the call graph for this function:

static void Print_Tlog_Header ( INT  argc,
char **  argv 
) [static]

Definition at line 1629 of file curr.driver.cxx.

References fprintf(), Get_Trace(), Tlog_File, TP_PTRACE1, and TP_PTRACE1_NOHDR.

Referenced by main().

Here is the call graph for this function:

static void Process_Feedback_Options ( OPTION_LIST olist) [static]

Definition at line 1646 of file curr.driver.cxx.

References DIR, Feedback_File_Name, FEEDBACK_PATH_MAXLEN, Is_True, NULL, OLIST_next, OLIST_val, path, Process_Feedback_File(), strcpy, and val.

Referenced by main().

Here is the call graph for this function:

void Process_Fill_Align_Pragmas ( WN func_wn)

Definition at line 76 of file fill_align.cxx.

Referenced by Backend_Processing().

void Prompf_Emit_Whirl_to_Source ( PU_Info current_pu,
WN func_nd 
)

Definition at line 53 of file anl_lno_dump.cxx.

Referenced by Adjust_Opt_Level().

void Rewrite_Pragmas_On_Structs ( WN block_wn,
WN wn 
)

Definition at line 168 of file rewrite_pragmas.cxx.

Referenced by Backend_Processing(), and Rewrite_Pragmas_On_Structs().

static void Save_Cur_PU_Name ( char *  name,
INT  rid_id 
) [static]
static void Update_EHRegion_Inito ( WN pu) [static]

Definition at line 1188 of file curr.driver.cxx.

References CURRENT_SYMTAB, FOREACH_INITO, INITO_st(), SCLASS_EH_REGION, SCLASS_EH_REGION_SUPP, Set_ST_is_not_used(), ST_sclass(), and Update_EHRegion_Inito_Used().

Referenced by Backend_Processing().

Here is the call graph for this function:

static void Update_EHRegion_Inito_Used ( WN wn) [static]

Definition at line 1155 of file curr.driver.cxx.

References Clear_ST_is_not_used(), INITO_st(), OPR_BLOCK, OPR_REGION, WN_ereg_supp(), WN_first(), WN_kid(), WN_kid_count(), WN_next(), and WN_operator().

Referenced by Update_EHRegion_Inito().

Here is the call graph for this function:

static WN* WOPT_Processing ( PU_Info current_pu,
WN pu,
REGION_CS_ITER rgn_iter,
WN rwn 
) [static]

Variable Documentation

struct ALIAS_MANAGER* alias_mgr = NULL [static]
FILE* DFile = stderr

Definition at line 367 of file curr.driver.cxx.

INT ecount = 0 [static]

Definition at line 335 of file curr.driver.cxx.

Referenced by main().

Output_File* ir_output = 0 [static]

Definition at line 339 of file curr.driver.cxx.

Definition at line 338 of file curr.driver.cxx.

Referenced by main(), and Phase_Init().

Definition at line 337 of file curr.driver.cxx.

Referenced by main(), Phase_Init(), and Post_LNO_Processing().

Definition at line 336 of file curr.driver.cxx.

Referenced by Do_WOPT_and_CG_with_Regions(), main(), and Phase_Init().

Definition at line 342 of file curr.driver.cxx.

Definition at line 74 of file cleanup.cxx.

Definition at line 75 of file cleanup.cxx.

Definition at line 344 of file curr.driver.cxx.

Referenced by Adjust_Opt_Level(), and Preorder_Process_PUs().

Definition at line 348 of file curr.driver.cxx.

Referenced by Backend_Processing(), and Process_Command_Line().

Definition at line 350 of file curr.driver.cxx.

Referenced by Postprocess_PU(), and Preprocess_PU().

BOOL Saved_run_w2c = FALSE [static]

Definition at line 351 of file curr.driver.cxx.

Referenced by Postprocess_PU(), and Preprocess_PU().

BOOL Saved_run_w2f = FALSE [static]

Definition at line 352 of file curr.driver.cxx.

Referenced by Postprocess_PU(), and Preprocess_PU().

Definition at line 353 of file curr.driver.cxx.

Referenced by Postprocess_PU(), and Preprocess_PU().

Definition at line 77 of file cleanup.cxx.

Definition at line 76 of file cleanup.cxx.

BOOL wopt_loaded = FALSE [static]

Definition at line 360 of file curr.driver.cxx.

Referenced by load_components(), main(), Postprocess_PU(), and Preprocess_PU().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines