#include <sys/types.h>#include <elf.h>#include <cmplrs/rcodes.h>#include <dirent.h>#include <iostream>#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 "ori.h"#include "w2c_driver.h"#include "w2f_driver.h"#include "anl_driver.h"#include "region_util.h"#include "region_main.h"#include "tracing.h"#include "ir_reader.h"#include "dwarf_DST.h"#include "fb_whirl.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 "upc_symtab_utils.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 WN * | Adjust_Opt_Level (PU_Info *current_pu, WN *pu, char *pu_name) |
| static void | Post_LNO_Processing (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 WN * | Preprocess_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) |
| void | be_debug (void) |
| void | RiceWhirl2f (INT *argc, char ***argv) |
| INT | main (INT argc, char **argv) |
| static BOOL | Has_Extension__1 (char *name, char *ext) |
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_File * | ir_output = 0 |
| static OPTIONS_STACK * | Options_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 |
| int | s_size = 16 |
| int | p_size = 16 |
| int | r_size = 4 |
| int | m_size = 4 |
| static char * | libpath [3] |
| static const char *const | errstring = "%s: can't allocate memory\n" |
| #define DSOext ".so" |
Definition at line 112 of file driver.cxx.
| #define FEEDBACK_PATH_MAXLEN 1024 |
Definition at line 901 of file driver.cxx.
Definition at line 507 of file driver.cxx.
References COMPUTE_PU_OLIMIT, Current_PU_Count(), CURRENT_SYMTAB, EC_Not_Ansi_Setjmp, EC_Not_Optimized, EC_Olimit_Exceeded, ErrMsg(), FALSE, fprintf(), Get_Current_PU(), Get_Trace(), INT, NULL, Olimit, Olimit_opt, Opt_Level, Optimization_Skip_List, PREG_Table_Size(), Prompf_Emit_Whirl_to_Source(), PU_calls_setjmp(), PU_Olimit, PU_WN_BB_Cnt, PU_WN_Stmt_Cnt, Query_Skiplist(), reset_opt_level, Run_autopar, Run_lno, Run_preopt, Run_prompf, Run_wopt, Show_OPT_Warnings, ST_Table_Size(), TFile, TINFO_STATS, TKIND_INFO, and TRUE.
Referenced by Preprocess_PU().

Definition at line 649 of file driver.cxx.
References FALSE, Get_Current_PU(), Get_Current_PU_ST(), Is_True, MemCtr_Add(), Post_LNO_Processing(), Process_Fill_Align_Pragmas(), PU_adjust_addr_flags(), PU_needs_fill_align_lowering(), Run_MemCtr, Set_Error_Phase(), TRUE, WHIRL_Mldid_Mstid_On, and WHIRL_Return_Val_On.
Referenced by Preorder_Process_PUs().

| void be_debug | ( | void | ) |
Definition at line 906 of file driver.cxx.
| char* Get_Orig_PU_Name | ( | PU_Info * | current_pu | ) |
Definition at line 447 of file driver.cxx.
References DST_idx::byte_idx, DST_subprogram::def, DST_ATTR_IDX_TO_PTR, DST_INFO_attributes, DST_INFO_flag, DST_INFO_IDX_TO_PTR, DST_INFO_tag, DST_IS_declaration, DST_IS_NULL, DST_STR_IDX_TO_PTR, DST_SUBPROGRAM_def_name, DW_TAG_subprogram, DST_subpr_def::name, NULL, PU_Info_proc_sym, PU_Info_pu_dst, and ST_name().

| static BOOL Has_Extension__1 | ( | char * | name, | |
| char * | ext | |||
| ) | [static] |
| void Initialize_Targ_Info | ( | void | ) |
Definition at line 42 of file driver_targ.cxx.
References ABI_I32, ABI_I64, FALSE, FmtAssert, Isa_Name(), Targ_Name(), Targ_Path, Target, Target_ABI, Target_ISA, TARGET_ISA_I1, TARGET_ITANIUM, and TI_Initialize().

| static void load_components | ( | INT | argc, | |
| char ** | argv | |||
| ) | [static] |
Definition at line 322 of file driver.cxx.
References Anl_Process_Command_Line(), DSOext, FALSE, Get_Phase_Args(), Initialize_Targ_Info(), INT, load_so(), phase_argc, phase_argv, PHASE_PROMPF, PHASE_W2F, Prompf_anl_loaded, Prompf_Anl_Path, Prompf_Id_Map, Run_autopar, Run_cg, Run_ipl, Run_lno, Run_preopt, Run_prompf, Run_purple, Run_w2c, Run_w2f, Run_w2fc_early, Run_wopt, Show_Progress, TRUE, W2F_Path, W2F_Process_Command_Line(), W2F_Set_Prompf_Emission(), and Whirl2f_loaded.
Referenced by main().

Definition at line 915 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(), Cleanup_Files(), RELATED_SEGMENTED_ARRAY< T, block_size >::Clear(), Close_Output_Info(), Compile_Upc, Configure(), Configure_Source(), Cur_PU_Name, CXX_NEW, DBar, EC_File_Olimit_Exceeded, ecount, Emit_Global_Data, EP_BE, ErrMsg(), ERROR_LINE_UNKNOWN, exit(), FALSE, File_info, FILE_INFO_ipa(), Find_Upc_Vars(), Finish_Compilation_Timing(), fprintf(), Get_Error_Count(), 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, INT, Ipl_Extra_Output(), Irb_File, Irb_File_Name, Is_True, List_All_Options, List_Compile_Options(), List_Enabled, load_components(), 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_Fini(), Phase_Init(), Preconfigure(), Preorder_Process_PUs(), Prepare_Listing_File(), Prepare_Source(), Print_Tlog_Header(), Print_Total_Stats(), Process_Command_Line(), 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(), RiceWhirl2f(), Run_autopar, Run_cg, Run_Distr_Array, Run_lno, Run_preopt, Run_w2c, 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, Upc_Lower_SymbolTable(), and Write_Global_Info().
| static void Phase_Fini | ( | void | ) | [static] |
Definition at line 434 of file driver.cxx.
References Anl_Fini(), Anl_Needs_Whirl2f(), CURRENT_SYMTAB, GLOBAL_SYMTAB, Run_prompf, Run_w2f, Verify_SYMTAB(), and W2F_Outfile_Fini().
Referenced by main().

| static void Phase_Init | ( | void | ) | [static] |
Definition at line 366 of file driver.cxx.
References Anl_Init(), Anl_Needs_Whirl2c(), Anl_Needs_Whirl2f(), Emit_Global_Data, FALSE, Global_File_Name, Irb_File_Name, Last_Pathname_Component(), LNO_Run_Lego, LNO_Run_Lego_Set, need_ipl_output, need_lno_output, need_wopt_output, New_Extension(), Obj_File_Name, Open_Output_Info(), Run_cg, Run_Distr_Array, Run_ipl, Run_lno, Run_preopt, Run_prompf, Run_w2c, Run_w2f, Run_wopt, Src_File_Name, TRUE, W2C_Outfile_Init(), W2F_Outfile_Init(), Write_ALIAS_CLASS_Map, and Write_BE_Maps.
Referenced by main().

Definition at line 555 of file driver.cxx.
References CURRENT_SYMTAB, GLOBAL_SYMTAB, Is_Set_PU_Info_flags, LANG_F90, Language, need_lno_output, PU_IS_COMPILER_GENERATED, PU_need_unparsed(), Run_prompf, Run_w2c, Run_w2f, Run_w2fc_early, Set_PU_Info_tree_ptr, ST_pu(), TRUE, Verify_SYMTAB(), W2C_Outfile_Translate_Pu(), W2C_Should_Emit_Nested_PUs(), W2F_Outfile_Translate_Pu(), W2F_Should_Emit_Nested_PUs(), WN_st(), and Write_PU_Info().
Referenced by Backend_Processing().

| static void Postprocess_PU | ( | PU_Info * | current_pu | ) | [static] |
Definition at line 784 of file driver.cxx.
References Be_scope_tab, BE_SCOPE::be_st_tab, RELATED_SEGMENTED_ARRAY< T, block_size >::Clear(), Current_Map_Tab, FALSE, fprintf(), Free_Local_Info(), MEM_POOL_Pop, MEM_pu_nz_pool_ptr, MEM_pu_pool_ptr, PU_Info_maptab, PU_Info_proc_sym, PU_lexical_level(), Run_prompf, Run_w2c, Run_w2f, Run_w2fc_early, Saved_run_prompf, Saved_run_w2c, Saved_run_w2f, Saved_run_w2fc_early, Scope_tab, ST_name(), SCOPE::st_tab, Tlog_File, and WN_Mem_Pop().
Referenced by Preorder_Process_PUs().

| static void Preorder_Process_PUs | ( | PU_Info * | current_pu | ) | [static] |
Definition at line 826 of file driver.cxx.
References Advance_Current_PU_Count(), Backend_Processing(), Be_preg_tab, RELATED_SEGMENTED_ARRAY< T, block_size >::Clear(), Cur_PU_Name, CURRENT_SYMTAB, FALSE, Finish_BE_Timing(), INT, NULL, Olimit_opt, Opt_Level, Postprocess_PU(), SCOPE::preg_tab, Preprocess_PU(), Print_PU_Stats(), PU_Info_child, PU_Info_next, PU_Info_proc_sym, growing_table::Register(), reset_opt_level, Run_lno, Run_preopt, Run_wopt, Scope_tab, ST_name(), Start_Timer(), Stop_Timer(), T_BE_PU_CU, Tim_File, growing_table::Un_register(), Verify_SYMTAB(), and WN_verifier().
Referenced by main().

Definition at line 687 of file driver.cxx.
References Adjust_Opt_Level(), Be_scope_tab, BE_symtab_alloc_scope_level(), Check_for_IR_Dump(), Current_Map_Tab, Current_pu, Current_PU_Count(), Current_PU_Info, CURRENT_SYMTAB, FALSE, fprintf(), Get_Current_PU(), Get_Orig_PU_Name(), Get_Trace(), Initialize_PU_Stats(), Is_Set_PU_Info_flags, Is_True, MEM_POOL_Push, MEM_pu_nz_pool_ptr, MEM_pu_pool_ptr, NULL, Orig_PU_Name, 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(), Read_Local_Info(), growing_table::Register(), Restore_Local_Symtab(), Run_prompf, Run_w2c, Run_w2f, Run_w2fc_early, 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, WN_Mem_Push(), and WT_TREE.
Referenced by Preorder_Process_PUs().

| static void Print_Tlog_Header | ( | INT | argc, | |
| char ** | argv | |||
| ) | [static] |
Definition at line 888 of file driver.cxx.
References fprintf(), Get_Trace(), INT, Tlog_File, TP_PTRACE1, and TP_PTRACE1_NOHDR.
Referenced by main().

| void Process_Fill_Align_Pragmas | ( | WN * | func_wn | ) |
Definition at line 76 of file fill_align.cxx.
References CXX_NEW, FALSE, Fill_Align_Initialize_Parameters(), initialized, INT, L1_cache_line_sz, L2_cache_line_sz, MEM_POOL_Initialize, MEM_POOL_Push_Freeze, page_sz, and Process_Fill_Align_Pragmas_Recursive().

Definition at line 53 of file anl_lno_dump.cxx.
References Anl_Needs_Whirl2c(), Anl_Needs_Whirl2f(), PU_Info_proc_sym, ST_level(), St_Table, TRUE, W2C_Outfile_Translate_Pu(), W2C_Should_Emit_Nested_PUs(), W2F_Outfile_Translate_Pu(), and W2F_Should_Emit_Nested_PUs().

Definition at line 168 of file rewrite_pragmas.cxx.
References Array_Element_Then_Struct(), FALSE, FmtAssert, INT, Is_Mp_Region(), Is_True, KIND_STRUCT, Make_Pointer_Type(), MTYPE_V, NULL, OPC_BLOCK, OPCODE_make_op(), OPR_ARRAY, OPR_ILOAD, OPR_ISTORE, OPR_LDID, OPR_PRAGMA, OPR_STID, OPR_XPRAGMA, Rewrite_Pragmas_On_Structs(), Rewrite_Structs_In_MPRegion(), ST_st_idx(), ST_type(), Tree_Equiv(), TRUE, TY_kind(), Weird_Array_Element(), WN_array_base, WN_COPY_Tree(), WN_CreateIload(), WN_CreateIstore(), WN_CreateLdid(), WN_CreatePragma(), WN_CreateStid(), WN_DELETE_FromBlock(), WN_first(), WN_INSERT_BlockAfter(), WN_INSERT_BlockBefore(), WN_INSERT_BlockFirst, WN_kid(), WN_kid0(), WN_kid_count(), WN_next(), WN_opcode(), WN_operator(), WN_pragma(), WN_pragma_arg1(), WN_pragma_arg2(), WN_pragma_compiler_generated, WN_PRAGMA_FIRSTPRIVATE, WN_PRAGMA_LASTLOCAL, WN_PRAGMA_LOCAL, WN_PRAGMA_REDUCTION, WN_prefetch_flag(), WN_prev(), WN_region_body, WN_region_pragmas, WN_st(), and WN_st_idx().

| void RiceWhirl2f | ( | INT * | argc, | |
| char *** | argv | |||
| ) |
Definition at line 1154 of file driver.cxx.
References errstring, exit(), FALSE, fprintf(), getenv(), Has_Extension__1(), Last_Pathname_Component(), len, libpath, NULL, path, PATH_MAX, RC_NORECOVER_USER_ERROR, Run_w2f, strcpy, and TRUE.
Referenced by main().

| static void Save_Cur_PU_Name | ( | char * | name, | |
| INT | rid_id | |||
| ) | [static] |
Definition at line 477 of file driver.cxx.
References Cur_PU_Name, MEM_pu_nz_pool, NULL, strcpy, and TYPE_MEM_POOL_ALLOC_N.
Referenced by Preprocess_PU().
| static void Update_EHRegion_Inito | ( | WN * | pu | ) | [static] |
Definition at line 630 of file driver.cxx.
References CURRENT_SYMTAB, FOREACH_INITO, INITO_st(), INT, SCLASS_EH_REGION, SCLASS_EH_REGION_SUPP, Set_ST_is_not_used(), ST_sclass(), and Update_EHRegion_Inito_Used().

| static void Update_EHRegion_Inito_Used | ( | WN * | wn | ) | [static] |
Definition at line 597 of file driver.cxx.
References Clear_ST_is_not_used(), INITO_st(), INT, OPR_BLOCK, OPR_REGION, WN_ereg_supp(), WN_first(), WN_kid(), WN_kid_count(), WN_next(), and WN_operator().
Referenced by Update_EHRegion_Inito().

struct ALIAS_MANAGER* alias_mgr = NULL [static] |
Definition at line 294 of file driver.cxx.
| void* Current_Dep_Graph |
| FILE* DFile = stderr |
Definition at line 316 of file driver.cxx.
Definition at line 284 of file driver.cxx.
Referenced by main().
const char* const errstring = "%s: can't allocate memory\n" [static] |
Definition at line 1152 of file driver.cxx.
Referenced by RiceWhirl2f().
Output_File* ir_output = 0 [static] |
Definition at line 288 of file driver.cxx.
char* libpath[3] [static] |
{"LD_LIBRARY_PATH",
"LD_LIBRARYN32_PATH",
"LD_LIBRARY64_PATH"
}
Definition at line 1147 of file driver.cxx.
Referenced by RiceWhirl2f().
| int m_size = 4 |
Definition at line 319 of file driver.cxx.
BOOL need_ipl_output = FALSE [static] |
Definition at line 287 of file driver.cxx.
Referenced by main(), and Phase_Init().
BOOL need_lno_output = FALSE [static] |
Definition at line 286 of file driver.cxx.
Referenced by main(), Phase_Init(), and Post_LNO_Processing().
BOOL need_wopt_output = FALSE [static] |
Definition at line 285 of file driver.cxx.
Referenced by main(), and Phase_Init().
OPTIONS_STACK* Options_Stack [static] |
Definition at line 291 of file driver.cxx.
| int p_size = 16 |
Definition at line 319 of file driver.cxx.
Definition at line 74 of file cleanup.cxx.
Referenced by Cleanup_Files(), and load_components().
Definition at line 769 of file config.cxx.
Definition at line 75 of file cleanup.cxx.
Referenced by load_components().
| int r_size = 4 |
Definition at line 319 of file driver.cxx.
BOOL reset_opt_level = FALSE [static] |
Definition at line 293 of file driver.cxx.
Referenced by Adjust_Opt_Level(), and Preorder_Process_PUs().
BOOL Run_Distr_Array = FALSE [static] |
Definition at line 296 of file driver.cxx.
Referenced by main(), and Phase_Init().
| BOOL Run_MemCtr = FALSE |
Definition at line 297 of file driver.cxx.
| int s_size = 16 |
Definition at line 319 of file driver.cxx.
Referenced by simp_cvtl().
BOOL Saved_run_prompf = FALSE [static] |
Definition at line 299 of file driver.cxx.
Referenced by Postprocess_PU(), and Preprocess_PU().
BOOL Saved_run_w2c = FALSE [static] |
Definition at line 300 of file driver.cxx.
Referenced by Postprocess_PU(), and Preprocess_PU().
BOOL Saved_run_w2f = FALSE [static] |
Definition at line 301 of file driver.cxx.
Referenced by Postprocess_PU(), and Preprocess_PU().
BOOL Saved_run_w2fc_early = FALSE [static] |
Definition at line 302 of file driver.cxx.
Referenced by Postprocess_PU(), and Preprocess_PU().
Definition at line 77 of file cleanup.cxx.
Referenced by Cleanup_Files(), and load_components().
Definition at line 76 of file cleanup.cxx.
Referenced by Cleanup_Files(), and load_components().
BOOL wopt_loaded = FALSE [static] |
Definition at line 309 of file driver.cxx.
1.6.1