osprey/be/be/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 "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 "config_cache.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 "ipl_reorder.h"
#include "config_ipa.h"
#include "be_memop_annot.h"
#include "w2c_weak.h"
#include "w2f_weak.h"

Go to the source code of this file.

Defines

#define load_so(a, b, c)
#define FEEDBACK_PATH_MAXLEN   1024

Functions/Subroutines

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

ERROR_DESC EDESC_BE []
ERROR_DESC EDESC_CG []
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_MANAGERalias_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
voidCurrent_Dep_Graph
FILEDFile = stderr


Define Documentation

#define FEEDBACK_PATH_MAXLEN   1024

Definition at line 2060 of file driver.cxx.

Referenced by Process_Feedback_Options().

#define load_so ( a,
b,
c   ) 


Function Documentation

static WN* Adjust_Opt_Level ( PU_Info current_pu,
WN pu,
char *  pu_name 
) [static]

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

Definition at line 1414 of file driver.cxx.

References BOOL, Clear_local_symtab_addr_flags(), Current_Dep_Graph, Current_PU_Info, CURRENT_SYMTAB, CXX_Alias_Const, Do_WOPT_and_CG_with_Regions(), Early_MP_Processing, EH_Dump_INITOs(), EH_Generate_Range_List(), ErrMsg(), FALSE, Feedback_Enabled, fprintf(), Get_Current_PU, Get_Current_PU_ST, Get_Trace(), Instrumentation_Enabled, Instrumentation_Phase_Num, Instrumentation_Type_Num, Is_True, LNO_Processing(), LOWER_MP, LOWER_RETURN_VAL, MEM_pu_pool, MemCtr_Add(), NULL, OPR_FUNC_ENTRY, OPT_IPA_addr_analysis, OPTIONS_STACK::Pop_Current_Options(), Post_LNO_Processing(), Post_Process_Backend(), pu_info::proc_sym, Process_Fill_Align_Pragmas(), OPTIONS_STACK::Process_Pragma_Options(), PROFILE_PHASE_BEFORE_LNO, PU_adjust_addr_flags(), PU_cxx_lang(), PU_ftn_lang(), PU_has_mp, PU_Info_tree_ptr, PU_ipa_addr_analysis(), PU_needs_fill_align_lowering(), Recompute_addr_saved_stmt(), Rewrite_Pragmas_On_Structs(), Run_autopar, Run_Distr_Array, Run_MemCtr, Scope_tab, Set_addr_saved_stmt(), Set_Error_Phase(), Set_PU_Info_depgraph_ptr, Set_PU_Info_state, ST_asm_function_st(), ST_name, ST_tcon, Subsect_InMem, Targ_String_Address(), Tcon_Table, TFile, TP_EH, TRUE, Update_EHRegion_Inito(), Verify_SYMTAB(), WB_LWR_Initialize(), WB_LWR_Terminate(), WHIRL_Mldid_Mstid_On, WHIRL_PROFILE, WHIRL_Return_Val_On, WN_Annotate(), WN_first(), WN_func_body, WN_func_pragmas, WN_Instrument(), WN_Lower(), WN_next(), WN_operator(), WN_pragma(), WN_PRAGMA_OPTIONS, WN_st(), and WT_DEPGRAPH.

Referenced by Preorder_Process_PUs().

void be_debug ( void   ) 

Definition at line 2191 of file driver.cxx.

Referenced by main().

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

Definition at line 1065 of file driver.cxx.

References BOOL, DST_idx::byte_idx, Calculate_Stack_Frame_Sizes(), CG_Generate_Code(), CG_PU_Initialize(), Clear_BE_ST_pu_has_valid_addr_flags(), Create_Alias_Manager(), Cur_PU_Feedback, Cur_PU_Name, Current_PU_Count(), 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_Current_PU_ST, Get_Trace(), Initialize_Stack_Frame(), Instrumentation_Enabled, Instrumentation_Phase_Num, Instrumentation_Type_Num, Is_Trace, Is_True, LOWER_MLDID_MSTID, 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_adjust_addr_flags(), PU_has_region, PU_Info_proc_sym, Query_Skiplist(), 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(), Save_Cur_PU_Name(), Set_BE_ST_pu_needs_addr_flag_adjust(), 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_gwe(), WB_LWR_Initialize(), WB_LWR_Terminate(), WHIRL_PROFILE, WN_Annotate(), WN_Instrument(), WN_Lower(), WN_opcode(), WOPT_Processing(), WOPT_Skip_List, and Write_PU_Info().

Referenced by Backend_Processing().

char* Get_Orig_PU_Name ( PU_Info current_pu  ) 

void Initialize_Targ_Info ( void   ) 

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

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

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

INT main ( INT argc  ,
char **  argv 
)

Definition at line 2195 of file 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(), BOOL, Cleanup_Files(), RELATED_SEGMENTED_ARRAY< T, block_size >::Clear(), Close_Output_Info(), Configure(), Configure_Source(), Cur_PU_Name, current_pu, CXX_NEW, CXX_NEW_ARRAY, DBar, DRA_Initialize(), EC_File_Olimit_Exceeded, ecount, Emit_Global_Data, EP_BE, EP_CG, ErrMsg(), ERROR_LINE_UNKNOWN, exit(), FALSE, Feedback_Option, fflush(), File_info, FILE_INFO_ipa(), FILE_INFO_needs_lno(), OUTPUT_FUNC_START_PROFILER::Fill_In_Func_Body(), Finish_Compilation_Timing(), fprintf(), OUTPUT_FUNC_START_PROFILER::Generate_Func_Start_Profiler_PU(), Get_Error_Count(), Get_Phase_Args(), Get_Trace(), Global_File_Name, GLOBAL_SYMTAB, Had_Internal_Error(), Handle_Signals(), host_errlist, i, 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, Instrumentation_Type_Num, INT, Ipl_Extra_Output(), Irb_File, Irb_File_Name, Is_True, isr_cg, List_All_Options, List_Compile_Options(), List_Enabled, lno_main(), 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(), Merge_Parents_Regset(), Mhd, Mhd_Options, 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, Output_Func_Start_Profiler, phase_argc, phase_argv, Phase_Fini(), Phase_Init(), PHASE_LNO, PHASE_WOPT, Phases, Preconfigure(), Preorder_Process_PUs(), Prepare_Listing_File(), Prepare_Source(), Preprocess_struct_access(), Print_Tlog_Header(), Print_Total_Stats(), Process_Command_Line(), Process_Feedback_Options(), PROFILE_PHASE_IPA_CUTOFF, PROFILE_PHASE_NONE, PU_Info_next, pu_num, OPTIONS_STACK::Push_Current_Options(), RC_INTERNAL_ERROR, RC_NORECOVER_USER_ERROR, RC_OKAY, RC_USER_ERROR, Read_Global_Data, Read_Global_Info(), Read_isr_cg(), Reset_Timers(), Run_autopar, Run_Distr_Array, Run_Dsm_Cloner, Run_Dsm_Common_Check, Scope_tab, Set_Error_Descriptor(), Set_Error_File(), Set_Error_Line(), Set_Error_Phase(), Set_Error_Source(), Set_Error_Tables(), OUTPUT_FUNC_START_PROFILER::Set_file_name(), OUTPUT_FUNC_START_PROFILER::Set_pu_tree(), setvbuf(), 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, warnings_are_errors, WHIRL_PROFILE, WOPT_Enable_Simple_If_Conv, wopt_loaded, wopt_main(), and Write_Global_Info().

static void Phase_Fini ( void   )  [static]

static void Phase_Init ( void   )  [static]

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

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

static void Postprocess_PU ( PU_Info current_pu  )  [static]

static void Preorder_Process_PUs ( PU_Info current_pu  )  [static]

static WN* Preprocess_PU ( PU_Info current_pu  )  [static]

Definition at line 1648 of file driver.cxx.

References Adjust_Opt_Level(), Anl_Init_Map(), Anl_Static_Analysis(), Be_scope_tab, BE_symtab_alloc_scope_level(), BOOL, BZERO, Check_for_IR_Dump(), Create_Restricted_Map(), Cur_PU_Feedback, Cur_PU_Name, Current_Map_Tab, Current_pu, Current_PU_Count(), Current_PU_Info, CURRENT_SYMTAB, CXX_NEW, CYG_Instrument_Driver(), FALSE, Feedback_Enabled, FmtAssert, fprintf(), Get_Current_PU, Get_Orig_PU_Name(), Get_Trace(), Initialize_PU_Stats(), Instrumentation_Enabled, Instrumentation_Phase_Num, Instrumentation_Type_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, Prp_Instrument_And_EmitSrc(), pu, PU_ftn_lang(), PU_has_inlines, 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_icall_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(), GTABLE::Remove_Gotos(), Restore_Local_Symtab(), Run_w2fc_early, Pu_Hdr::runtime_fun_address, Save_Cur_PU_Name(), Saved_run_prompf, Saved_run_w2c, Saved_run_w2f, Saved_run_w2fc_early, Scope_tab, Set_Current_PU_For_Trace(), Set_Error_Phase(), Show_Progress, ST_name, SCOPE::st_tab, Start_Timer(), Stop_Timer(), strcmp(), Subsect_InMem, T_ReadIR_CU, TFile, Tlog_File, TP_IR_READ, TP_REGION, TRUE, TT_REGION_ALL, FEEDBACK::Verify(), VHO_Lower_Driver(), WB_ANL_Initialize(), WB_ANL_Terminate(), wb_gwe(), WHIRL_PROFILE, WN_Annotate(), WN_first(), WN_func_body, WN_Instrument(), WN_Mem_Push(), WN_next(), wopt_loaded, WT_FEEDBACK, and WT_TREE.

Referenced by Preorder_Process_PUs().

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

Definition at line 2047 of file driver.cxx.

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

Referenced by main().

static void Process_Feedback_Options ( OPTION_LIST olist  )  [static]

void Process_Fill_Align_Pragmas ( WN func_wn  ) 

void Prompf_Emit_Whirl_to_Source ( PU_Info current_pu,
WN func_nd 
)

Definition at line 52 of file lx_prompf_anl.cxx.

Referenced by Adjust_Opt_Level(), and Prompf_Dump().

void Rewrite_Pragmas_On_Structs ( WN block_wn,
WN wn 
)

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

static void Update_EHRegion_Inito ( WN pu  )  [static]

static void Update_EHRegion_Inito_Used ( WN wn  )  [static]

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 462 of file driver.cxx.

INT ecount = 0 [static]

Definition at line 430 of file driver.cxx.

Referenced by display_problems(), main(), and unw_decode_b3_x4().

Referenced by CG_Process_Command_Line().

Output_File* ir_output = 0 [static]

Definition at line 434 of file driver.cxx.

BOOL need_ipl_output = FALSE [static]

Definition at line 433 of file driver.cxx.

Referenced by main(), and Phase_Init().

BOOL need_lno_output = FALSE [static]

Definition at line 432 of file driver.cxx.

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

BOOL need_wopt_output = FALSE [static]

Definition at line 431 of file driver.cxx.

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

Definition at line 437 of file driver.cxx.

Definition at line 82 of file cleanup.cxx.

Referenced by Cleanup_Files(), and load_components().

Referenced by Anl_Fini(), Atomic_Using_Critical(), PROMPF_INFO::Check_Traverse(), Convert_Section_To_Pdo(), Copy_Array(), Copy_Array_Section(), create_doloop_node(), Create_Simple_Shackle_Loops(), Create_Single_Region(), Delete_Shackle_Prompf_Info(), dump_loops(), Fission(), Fission_Statement(), Fuse(), ARA_LOOP_INFO::Generate_Copyout_Loop(), ARA_LOOP_INFO::Generate_Parallel_Pragma(), Insert_Lowered_Atomic(), load_components(), Lower_Fetch_And_Op(), Lower_Master(), LWN_Delete_From_Block(), LWN_Delete_Tree(), Mp_Extract_Parallel_Directives(), Parallelize_Doacross_Loop(), Perform_Gather_Scatter(), Post_loop_peeling(), Pre_loop_peeling(), Preorder_Process_PUs(), Preprocess_PU(), Print_Prompf_Doacross_Log(), Print_Prompf_Msgs(), Print_Prompf_Nest_Log(), Print_Prompf_Parallel_Region_Log(), Print_Prompf_Preopt_Transaction_Log(), Prompf_Assign_Ids_Traverse(), Prompf_Assign_New_Ids_Traverse(), Prompf_Collect_Ids(), Prompf_Hoist_Messy_Bounds(), PROMPF_INFO::PROMPF_INFO(), PROMPF_INFO::Prompf_Info_Traverse(), Prompf_Interchange(), Prompf_Mp_Version(), Prompf_Nested_Tile(), Prompf_Record_Eliminations(), Prompf_Tile(), Prompf_Tile_Split(), Prompf_Zero_Ids(), Raise_dowhile_stmt(), Raise_whiledo_stmt(), Remove_Unity_Trip_Loop(), Scalar_Expansion_Tile(), separate_loop_and_scalar_expand(), separate_loop_by_scc(), Shackle_Copy_Prompf_Id_Map_Info(), Shackle_Prompf_Map_Initialize(), SNL_Distribute(), SNL_GEN_2D_Regtile(), SNL_GEN_Protect_Nest_With_Conditionals(), SNL_GEN_U_Ctiling(), SNL_INV_Cache_Block(), SNL_INV_Scalar_Expand_Tile(), SNL_Peel_Iteration(), SNL_Regtile_Loop(), PF_LOOPNODE::Split_Loops(), this_node(), Thread_Affinity_Lower(), VHO_Lower_Driver(), vintr_fis_separate_loop_and_scalar_expand(), WB_Prompf_Map(), and Wind_Down().

Definition at line 83 of file cleanup.cxx.

Referenced by load_components().

BOOL reset_opt_level = FALSE [static]

Definition at line 439 of file driver.cxx.

Referenced by Adjust_Opt_Level(), and Preorder_Process_PUs().

BOOL Run_Distr_Array = FALSE [static]

BOOL Run_MemCtr = FALSE

Definition at line 443 of file driver.cxx.

Referenced by Backend_Processing(), and Process_Command_Line().

BOOL Saved_run_prompf = FALSE [static]

Definition at line 445 of file driver.cxx.

Referenced by Postprocess_PU(), and Preprocess_PU().

BOOL Saved_run_w2c = FALSE [static]

Definition at line 446 of file driver.cxx.

Referenced by Postprocess_PU(), and Preprocess_PU().

BOOL Saved_run_w2f = FALSE [static]

Definition at line 447 of file driver.cxx.

Referenced by Postprocess_PU(), and Preprocess_PU().

BOOL Saved_run_w2fc_early = FALSE [static]

Definition at line 448 of file driver.cxx.

Referenced by Postprocess_PU(), and Preprocess_PU().

Definition at line 85 of file cleanup.cxx.

Referenced by Cleanup_Files(), and load_components().

Definition at line 84 of file cleanup.cxx.

Referenced by Cleanup_Files(), and load_components().

BOOL wopt_loaded = FALSE [static]

Definition at line 455 of file driver.cxx.

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


Generated on Wed Apr 8 14:24:46 2009 for Open64 by  doxygen 1.5.6