#include <sys/elf_whirl.h>#include <time.h>#include "whirl2c_common.h"#include "config_clist.h"#include "config_list.h"#include "w2cf_parentize.h"#include "file_util.h"#include "flags.h"#include "timing.h"#include "wn_lower.h"#include "PUinfo.h"#include "ty2c.h"#include "st2c.h"#include "tcon2c.h"#include "wn2c.h"#include "w2c_driver.h"#include "unparse_target_c.h"#include <string>#include <stdio.h>
Go to the source code of this file.
Defines | |
| #define | MAX_LINE_LEN 2000 |
| #define | W2C_Extension(i) |
| #define | W2C_MAX_SKIP_ITEMS 128 |
| #define | MAX_FNAME_LENGTH 256-7 |
| #define | MAX_ANL_FNAME_LENGTH 256-5 |
Functions | |
| static void | Process_Filename_Options (const char *src_filename, const char *irb_filename) |
| static FILE * | Open_Read_File (const char *filename) |
| static FILE * | Open_Append_File (const char *filename) |
| static FILE * | Open_Create_File (const char *filename) |
| static void | Close_File (const char *filename, FILE *afile) |
| static void | Open_W2c_Output_File (W2C_FILE_KIND kind) |
| static void | Close_W2c_Output_File (W2C_FILE_KIND kind) |
| static void | Begin_New_Locations_File (void) |
| static void | End_Locations_File (void) |
| static void | Continue_Locations_File (void) |
| static void | Move_Locations_To_Anl_File (const char *loc_fname) |
| static void | W2C_Undo_Whirl_Side_Effects (void) |
| static void | W2C_Enter_Global_Symbols (void) |
| static BOOL | Check_Outfile_Initialized (const char *caller_name) |
| static BOOL | Check_Initialized (const char *caller_name) |
| static BOOL | Check_PU_Pushed (const char *caller_name) |
| BOOL | W2C_Should_Emit_Nested_PUs (void) |
| void | W2C_Process_Command_Line (INT phase_argc, char *const phase_argv[], INT argc, char *const argv[]) |
| void | W2C_Init (void) |
| void | W2C_Push_PU (const WN *pu, WN *body_part_of_interest) |
| void | W2C_Pop_PU (void) |
| void | W2C_Mark_Loads (void) |
| void | W2C_Nomark_Loads (void) |
| void | W2C_Set_Prompf_Emission (const WN_MAP *construct_map) |
| void | W2C_Set_Frequency_Map (WN_MAP frequency_map) |
| const char * | W2C_Get_Transformed_Src_Path (void) |
| void | W2C_Set_Purple_Emission (void) |
| void | W2C_Reset_Purple_Emission (void) |
| void | W2C_def_TY (FILE *outfile, TY_IDX ty) |
| void | W2C_Translate_Global_Types (FILE *outfile) |
| void | W2C_write_init (FILE *outfile) |
| void | W2C_Translate_Global_Defs (FILE *outfile) |
| const char * | W2C_Object_Name (const ST *func_st) |
| void | W2C_Translate_Stid_Lhs (char *strbuf, UINT bufsize, const ST *stid_st, STAB_OFFSET stid_ofst, TY_IDX stid_ty, TYPE_ID stid_mtype) |
| void | W2C_Translate_Istore_Lhs (char *strbuf, UINT bufsize, const WN *lhs, STAB_OFFSET istore_ofst, TY_IDX istore_ty_idx, TYPE_ID istore_mtype) |
| void | W2C_Translate_Wn (FILE *outfile, const WN *wn) |
| void | W2C_Translate_Wn_Str (char *strbuf, UINT bufsize, const WN *wn) |
| void | W2C_Translate_Purple_Main (FILE *outfile, const WN *pu, const char *region_name) |
| void | W2C_Fini (void) |
| void | W2C_Outfile_Init (BOOL emit_global_decls) |
| void | W2C_Outfile_Translate_Pu (WN *pu, BOOL emit_global_decls) |
| void | W2C_Outfile_Fini (BOOL emit_global_decls) |
| void | W2C_Cleanup (void) |
Variables | |
| static const char * | W2C_File_Extension [W2C_NUM_FILES] |
| static const char * | W2C_Cite_Extension [W2C_NUM_FILES] |
| static const char * | W2C_Prompf_Extension [W2C_NUM_FILES] |
| static W2CF_SKIP_ITEM | Skip [W2C_MAX_SKIP_ITEMS+1] |
| static INT | Next_Skip_Item = 0 |
| static BOOL | W2C_Outfile_Initialized = FALSE |
| static BOOL | W2C_Initialized = FALSE |
| static CONTEXT | Global_Context = INIT_CONTEXT |
| static const char * | W2C_Progname = "" |
| static const char * | W2C_File_Name [W2C_NUM_FILES] |
| static BOOL | File_Is_Created [W2C_NUM_FILES] |
| static MEM_POOL | W2C_Parent_Pool |
| FILE * | W2C_File [W2C_NUM_FILES] = {NULL, NULL, NULL, NULL} |
| BOOL | W2C_Enabled = TRUE |
| BOOL | W2C_Verbose = TRUE |
| BOOL | W2C_No_Pragmas = FALSE |
| BOOL | W2C_Emit_Adims = FALSE |
| BOOL | W2C_Emit_Prefetch = FALSE |
| BOOL | W2C_Emit_All_Regions = FALSE |
| BOOL | W2C_Emit_Linedirs = FALSE |
| BOOL | W2C_Emit_Nested_PUs = FALSE |
| BOOL | W2C_Emit_Frequency = FALSE |
| BOOL | W2C_Emit_Cgtag = FALSE |
| BOOL | W2C_Lower_Fortran = FALSE |
| BOOL | W2C_Emit_Omp = FALSE |
| INT32 | W2C_Line_Length = 0 |
| BOOL | W2C_Only_Mark_Loads = FALSE |
| BOOL | W2C_Purple_Emission = FALSE |
| BOOL | W2C_Prompf_Emission = FALSE |
| const WN_MAP * | W2C_Construct_Map = NULL |
| WN_MAP | W2C_Frequency_Map = WN_MAP_UNDEFINED |
| BOOL | W2C_Cplus_Initializer = FALSE |
| Unparse_Target * | W2X_Unparse_Target = NULL |
| #define MAX_ANL_FNAME_LENGTH 256-5 |
Referenced by Move_Locations_To_Anl_File().
| #define MAX_FNAME_LENGTH 256-7 |
Referenced by Get_Irb_File_Name(), and Process_Filename_Options().
| #define MAX_LINE_LEN 2000 |
Definition at line 88 of file w2c_driver.cxx.
Referenced by W2C_Outfile_Init().
| #define W2C_Extension | ( | i | ) |
(W2C_Prompf_Emission? W2C_Prompf_Extension[i] : \ (List_Cite ? W2C_Cite_Extension[i] : W2C_File_Extension[i]))
Definition at line 128 of file w2c_driver.cxx.
Referenced by Process_Filename_Options().
| #define W2C_MAX_SKIP_ITEMS 128 |
Definition at line 135 of file w2c_driver.cxx.
Referenced by W2C_Push_PU().
| static void Begin_New_Locations_File | ( | void | ) | [static] |
Definition at line 399 of file w2c_driver.cxx.
References NULL, Open_W2c_Output_File(), W2C_File, W2C_File_Name, W2C_LOC_FILE, W2C_Prompf_Emission, and Write_String().
Referenced by W2C_Outfile_Init().

| static BOOL Check_Initialized | ( | const char * | caller_name | ) | [static] |
Definition at line 598 of file w2c_driver.cxx.
References fprintf(), and W2C_Initialized.
Referenced by W2C_def_TY(), W2C_Fini(), W2C_Pop_PU(), W2C_Push_PU(), W2C_Translate_Global_Defs(), W2C_Translate_Global_Types(), W2C_Translate_Purple_Main(), W2C_Translate_Wn(), W2C_Translate_Wn_Str(), and W2C_write_init().

| static BOOL Check_Outfile_Initialized | ( | const char * | caller_name | ) | [static] |
Definition at line 588 of file w2c_driver.cxx.
References fprintf(), and W2C_Outfile_Initialized.
Referenced by W2C_Outfile_Fini(), and W2C_Outfile_Translate_Pu().

| static BOOL Check_PU_Pushed | ( | const char * | caller_name | ) | [static] |
Definition at line 608 of file w2c_driver.cxx.
References fprintf(), NULL, and PUinfo_current_func.
Referenced by W2C_Pop_PU(), W2C_Translate_Wn(), and W2C_Translate_Wn_Str().

| static void Close_File | ( | const char * | filename, | |
| FILE * | afile | |||
| ) | [static] |
Definition at line 345 of file w2c_driver.cxx.
References EC_Src_Close, ErrMsg(), errno, ERROR_LINE_UNKNOWN, NULL, Same_File(), and Set_Error_Line().
Referenced by Close_W2c_Output_File(), and Move_Locations_To_Anl_File().

| static void Close_W2c_Output_File | ( | W2C_FILE_KIND | kind | ) | [static] |
Definition at line 377 of file w2c_driver.cxx.
References Close_File(), W2C_File, and W2C_File_Name.
Referenced by End_Locations_File(), W2C_Cleanup(), and W2C_Outfile_Fini().

| static void Continue_Locations_File | ( | void | ) | [static] |
Definition at line 457 of file w2c_driver.cxx.
References NULL, Open_W2c_Output_File(), W2C_File_Name, and W2C_LOC_FILE.
Referenced by W2C_Outfile_Fini(), and W2C_Outfile_Translate_Pu().

| static void End_Locations_File | ( | void | ) | [static] |
Definition at line 428 of file w2c_driver.cxx.
References Close_W2c_Output_File(), NULL, Open_W2c_Output_File(), Terminate_Token_Buffer(), W2C_File, W2C_File_Name, W2C_LOC_FILE, W2C_Prompf_Emission, and Write_String().
Referenced by W2C_Fini().

| static void Move_Locations_To_Anl_File | ( | const char * | loc_fname | ) | [static] |
Definition at line 470 of file w2c_driver.cxx.
References Close_File(), EOF, Last_Pathname_Component(), MAX_ANL_FNAME_LENGTH, New_Extension(), Open_Append_File(), Open_Read_File(), and unlink.
Referenced by W2C_Outfile_Fini().

| static FILE* Open_Append_File | ( | const char * | filename | ) | [static] |
Definition at line 315 of file w2c_driver.cxx.
References EC_IR_Open, ErrMsg(), errno, f, and NULL.
Referenced by Move_Locations_To_Anl_File(), and Open_W2c_Output_File().

| static FILE* Open_Create_File | ( | const char * | filename | ) | [static] |
Definition at line 330 of file w2c_driver.cxx.
References EC_IR_Open, ErrMsg(), errno, f, and NULL.
Referenced by Open_W2c_Output_File().

| static FILE* Open_Read_File | ( | const char * | filename | ) | [static] |
Definition at line 300 of file w2c_driver.cxx.
References EC_IR_Open, ErrMsg(), errno, f, and NULL.
Referenced by Move_Locations_To_Anl_File().

| static void Open_W2c_Output_File | ( | W2C_FILE_KIND | kind | ) | [static] |
Definition at line 359 of file w2c_driver.cxx.
References File_Is_Created, NULL, Open_Append_File(), Open_Create_File(), W2C_File, and W2C_File_Name.
Referenced by Begin_New_Locations_File(), Continue_Locations_File(), End_Locations_File(), W2C_Outfile_Fini(), W2C_Outfile_Init(), and W2C_Outfile_Translate_Pu().

| static void Process_Filename_Options | ( | const char * | src_filename, | |
| const char * | irb_filename | |||
| ) | [static] |
Definition at line 218 of file w2c_driver.cxx.
References fprintf(), Last_Pathname_Component(), List_Cite, MAX_FNAME_LENGTH, New_Extension(), NULL, strcpy, W2C_DATA_FILE, W2C_DOTC_FILE, W2C_DOTH_FILE, W2C_Extension, W2C_File_Name, W2C_LOC_FILE, W2C_ORIG_FILE, and W2C_Prompf_Emission.
Referenced by W2C_Process_Command_Line().

| void W2C_Cleanup | ( | void | ) |
Definition at line 1347 of file w2c_driver.cxx.
References Close_W2c_Output_File(), NULL, unlink, W2C_DOTC_FILE, W2C_DOTH_FILE, W2C_File_Name, and W2C_LOC_FILE.
Referenced by Cleanup_Files().

| void W2C_def_TY | ( | FILE * | outfile, | |
| TY_IDX | ty | |||
| ) |
Definition at line 838 of file w2c_driver.cxx.
References Check_Initialized(), New_Token_Buffer(), TY2C_translate(), W2C_File, W2C_LOC_FILE, W2C_Undo_Whirl_Side_Effects(), and Write_And_Reclaim_Tokens().

| static void W2C_Enter_Global_Symbols | ( | void | ) | [static] |
Definition at line 538 of file w2c_driver.cxx.
References CLASS_FUNC, CLASS_VAR, FLD_next(), FOREACH_SYMBOL, GLOBAL_SYMTAB, FLD_HANDLE::Is_Null(), SCLASS_CPLINIT, ST_sclass(), ST_sym_class(), Stab_Is_Based_At_Common_Or_Equivalence(), TY_flist(), TY_Is_Structured(), Ty_Table, TY_Table_Size(), W2C_Cplus_Initializer, W2CF_Symtab_Nameof_Fld(), W2CF_Symtab_Nameof_St(), and W2CF_Symtab_Nameof_Ty().
Referenced by W2C_Init().

| void W2C_Fini | ( | void | ) |
Definition at line 1029 of file w2c_driver.cxx.
References Check_Initialized(), CONTEXT_reset, End_Locations_File(), FALSE, File_Is_Created, GLOBAL_SYMTAB, MEM_POOL_Delete(), MEM_POOL_Pop, NULL, PUinfo_finalize(), ST2C_finalize(), Stab_finalize_flags(), Stab_Reset_Referenced_Flag(), TCON2C_finalize(), Terminate_Token_Buffer(), TY2C_finalize(), W2C_Cplus_Initializer, W2C_Emit_Adims, W2C_Emit_All_Regions, W2C_Emit_Frequency, W2C_Emit_Linedirs, W2C_Emit_Nested_PUs, W2C_Emit_Prefetch, W2C_Enabled, W2C_File, W2C_File_Name, W2C_Initialized, W2C_Line_Length, W2C_LOC_FILE, W2C_Lower_Fortran, W2C_No_Pragmas, W2C_Only_Mark_Loads, W2C_Outfile_Initialized, W2C_Progname, W2C_Verbose, W2CF_Symtab_Terminate(), and WN2C_finalize().
Referenced by Local_Terminate(), and W2C_Outfile_Fini().

| const char* W2C_Get_Transformed_Src_Path | ( | void | ) |
| void W2C_Init | ( | void | ) |
Definition at line 671 of file w2c_driver.cxx.
References CONTEXT_reset, FALSE, FREE_FORMAT, Get_Error_Phase(), Initialize_Token_Buffer(), MEM_POOL_Initialize, MEM_POOL_Push, PUinfo_initialize(), Set_Error_Phase(), Set_Maximum_Linelength(), ST2C_initialize(), Stab_initialize_flags(), TCON2C_initialize(), TY2C_initialize(), W2C_Enter_Global_Symbols(), W2C_Initialized, W2C_Line_Length, W2C_Prompf_Emission, W2CF_Symtab_Push(), and WN2C_initialize().
Referenced by W2C_Outfile_Init(), and Whirl2C_Init().

| void W2C_Mark_Loads | ( | void | ) |
Definition at line 788 of file w2c_driver.cxx.
References W2C_Only_Mark_Loads.
| void W2C_Nomark_Loads | ( | void | ) |
Definition at line 795 of file w2c_driver.cxx.
References W2C_Only_Mark_Loads.
| const char* W2C_Object_Name | ( | const ST * | func_st | ) |
Definition at line 893 of file w2c_driver.cxx.
References W2CF_Symtab_Nameof_St().
Referenced by W2CF_TRANSLATOR::Transformed_Symname_To_String(), WN2C_Append_Purple_Funcinfo(), and WN2C_block().

| void W2C_Outfile_Fini | ( | BOOL | emit_global_decls | ) |
Definition at line 1295 of file w2c_driver.cxx.
References Check_Outfile_Initialized(), Close_W2c_Output_File(), Compile_Upc, Continue_Locations_File(), Move_Locations_To_Anl_File(), New_Token_Buffer(), NULL, Open_W2c_Output_File(), ST2C_Define_Common_Blocks(), W2C_DOTC_FILE, W2C_DOTH_FILE, W2C_File, W2C_File_Name, W2C_Fini(), W2C_LOC_FILE, W2C_Outfile_Initialized, W2C_Prompf_Emission, WN2C_translate_file_scope_defs(), and Write_And_Reclaim_Tokens().
Referenced by main(), and Phase_Fini().

| void W2C_Outfile_Init | ( | BOOL | emit_global_decls | ) |
Definition at line 1112 of file w2c_driver.cxx.
References Begin_New_Locations_File(), buf, Compile_Upc, EC_IR_Open, ErrMsg(), errno, fprintf(), Irb_File_Name, MAX_LINE_LEN, NULL, Open_W2c_Output_File(), W2C_DATA_FILE, W2C_DOTC_FILE, W2C_DOTH_FILE, W2C_File, W2C_File_Name, W2C_Init(), W2C_Initialized, W2C_LOC_FILE, W2C_ORIG_FILE, W2C_Outfile_Initialized, W2C_Progname, W2C_Prompf_Emission, W2C_Verbose, WN2C_translate_structured_types(), and Write_String().
Referenced by main(), and Phase_Init().

Definition at line 1242 of file w2c_driver.cxx.
References Check_Outfile_Initialized(), Continue_Locations_File(), Get_Error_Phase(), Is_True, LOWER_IO_STATEMENT, LOWER_MP, LOWER_NULL, New_Token_Buffer(), NULL, OPC_FUNC_ENTRY, Open_W2c_Output_File(), PUinfo_current_func, Set_Error_Phase(), Start_Timer(), Stop_Timer(), T_W2C_CU, W2C_DOTC_FILE, W2C_DOTH_FILE, W2C_Emit_Nested_PUs, W2C_File, W2C_LOC_FILE, W2C_Lower_Fortran, W2C_Pop_PU(), W2C_Push_PU(), W2C_Undo_Whirl_Side_Effects(), WN2C_translate(), WN_func_body, WN_Lower(), WN_opcode(), and Write_And_Reclaim_Tokens().
Referenced by main(), Post_LNO_Processing(), and Prompf_Emit_Whirl_to_Source().

| void W2C_Pop_PU | ( | void | ) |
Definition at line 751 of file w2c_driver.cxx.
References Check_Initialized(), Check_PU_Pushed(), CURRENT_SYMTAB, MEM_POOL_Pop, Next_Skip_Item, PUinfo_exit_pu(), Restore_Skips(), Stab_finalize(), TRUE, W2C_Frequency_Map, W2CF_Parent_Map, WN2C_new_symtab(), and WN_MAP_Delete.
Referenced by W2CF_TRANSLATOR::_Istore_Lhs_To_String(), W2CF_TRANSLATOR::Expr_To_File(), W2CF_TRANSLATOR::Expr_To_String(), W2CF_TRANSLATOR::Stid_Lhs_To_String(), W2CF_TRANSLATOR::Transformed_Symname_To_String(), W2C_Outfile_Translate_Pu(), W2C_Translate_Purple_Main(), Whirl2C_Emit(), Whirl2Src_Translate_Iload_Str(), and Whirl2Src_Translate_Istore_Str().

| void W2C_Process_Command_Line | ( | INT | phase_argc, | |
| char *const | phase_argv[], | |||
| INT | argc, | |||
| char *const | argv[] | |||
| ) |
Definition at line 636 of file w2c_driver.cxx.
References Irb_File_Name, NULL, Process_Filename_Options(), Src_File_Name, W2C_Emit_Adims, W2C_Emit_All_Regions, W2C_Emit_Cgtag, W2C_Emit_Frequency, W2C_Emit_Linedirs, W2C_Emit_Nested_PUs, W2C_Emit_Omp, W2C_Emit_Prefetch, W2C_Enabled, W2C_File_Name, W2C_Line_Length, W2C_Lower_Fortran, W2C_No_Pragmas, W2C_Progname, and W2C_Verbose.
Referenced by load_components(), main(), and Whirl2C_Init().

Definition at line 719 of file w2c_driver.cxx.
References Check_Initialized(), Is_True, MEM_POOL_Push, Next_Skip_Item, OPC_FUNC_ENTRY, OPR_BLOCK, PUinfo_init_pu(), Remove_Skips(), Stab_initialize(), TRUE, W2C_MAX_SKIP_ITEMS, W2CF_Parent_Map, W2CF_Parentize(), WN_MAP_Create, WN_opc_operator, and WN_opcode().
Referenced by W2CF_TRANSLATOR::_Istore_Lhs_To_String(), W2CF_TRANSLATOR::Expr_To_File(), W2CF_TRANSLATOR::Expr_To_String(), W2CF_TRANSLATOR::Stid_Lhs_To_String(), W2CF_TRANSLATOR::Transformed_Symname_To_String(), W2C_Outfile_Translate_Pu(), W2C_Translate_Purple_Main(), Whirl2C_Emit(), Whirl2Src_Translate_Iload_Str(), and Whirl2Src_Translate_Istore_Str().

| void W2C_Reset_Purple_Emission | ( | void | ) |
Definition at line 831 of file w2c_driver.cxx.
References W2C_Purple_Emission.
| void W2C_Set_Frequency_Map | ( | WN_MAP | frequency_map | ) |
Definition at line 810 of file w2c_driver.cxx.
References W2C_Frequency_Map.
Referenced by Post_LNO_Processing().
| void W2C_Set_Prompf_Emission | ( | const WN_MAP * | construct_map | ) |
Definition at line 802 of file w2c_driver.cxx.
References W2C_Construct_Map, and W2C_Prompf_Emission.
Referenced by load_components().
| void W2C_Set_Purple_Emission | ( | void | ) |
Definition at line 824 of file w2c_driver.cxx.
References W2C_Purple_Emission.
| BOOL W2C_Should_Emit_Nested_PUs | ( | void | ) |
Definition at line 628 of file w2c_driver.cxx.
References W2C_Emit_Nested_PUs.
Referenced by Post_LNO_Processing(), and Prompf_Emit_Whirl_to_Source().
| void W2C_Translate_Global_Defs | ( | FILE * | outfile | ) |
Definition at line 877 of file w2c_driver.cxx.
References Check_Initialized(), W2C_File, W2C_Undo_Whirl_Side_Effects(), and WN2C_translate_file_scope_defs().

| void W2C_Translate_Global_Types | ( | FILE * | outfile | ) |
Definition at line 854 of file w2c_driver.cxx.
References Check_Initialized(), W2C_File, W2C_Undo_Whirl_Side_Effects(), and WN2C_translate_structured_types().

| void W2C_Translate_Istore_Lhs | ( | char * | strbuf, | |
| UINT | bufsize, | |||
| const WN * | lhs, | |||
| STAB_OFFSET | istore_ofst, | |||
| TY_IDX | istore_ty_idx, | |||
| TYPE_ID | istore_mtype | |||
| ) |
Definition at line 925 of file w2c_driver.cxx.
References New_Token_Buffer(), Str_Write_And_Reclaim_Tokens(), Ty_Table, W2C_Undo_Whirl_Side_Effects(), and WN2C_memref_lhs().

| void W2C_Translate_Purple_Main | ( | FILE * | outfile, | |
| const WN * | pu, | |||
| const char * | region_name | |||
| ) |
Definition at line 999 of file w2c_driver.cxx.
References Check_Initialized(), Get_Error_Phase(), Is_True, New_Token_Buffer(), OPC_FUNC_ENTRY, Set_Error_Phase(), Start_Timer(), Stop_Timer(), T_W2C_CU, W2C_File, W2C_LOC_FILE, W2C_Pop_PU(), W2C_Push_PU(), W2C_Undo_Whirl_Side_Effects(), WN2C_translate_purple_main(), WN_func_body, WN_opcode(), and Write_And_Reclaim_Tokens().

| void W2C_Translate_Stid_Lhs | ( | char * | strbuf, | |
| UINT | bufsize, | |||
| const ST * | stid_st, | |||
| STAB_OFFSET | stid_ofst, | |||
| TY_IDX | stid_ty, | |||
| TYPE_ID | stid_mtype | |||
| ) |
Definition at line 900 of file w2c_driver.cxx.
References New_Token_Buffer(), Str_Write_And_Reclaim_Tokens(), W2C_Undo_Whirl_Side_Effects(), and WN2C_stid_lhs().
Referenced by W2CF_TRANSLATOR::Stid_Lhs_To_String().

| void W2C_Translate_Wn | ( | FILE * | outfile, | |
| const WN * | wn | |||
| ) |
Definition at line 951 of file w2c_driver.cxx.
References Check_Initialized(), Check_PU_Pushed(), Get_Error_Phase(), New_Token_Buffer(), Set_Error_Phase(), Start_Timer(), Stop_Timer(), T_W2C_CU, W2C_File, W2C_LOC_FILE, W2C_Undo_Whirl_Side_Effects(), WN2C_translate(), and Write_And_Reclaim_Tokens().
Referenced by W2CF_TRANSLATOR::Expr_To_File(), and Whirl2C_Emit().

Definition at line 975 of file w2c_driver.cxx.
References Check_Initialized(), Check_PU_Pushed(), Get_Error_Phase(), New_Token_Buffer(), Set_Error_Phase(), Start_Timer(), Stop_Timer(), Str_Write_And_Reclaim_Tokens(), T_W2C_CU, W2C_Undo_Whirl_Side_Effects(), and WN2C_translate().
Referenced by dummy(), W2CF_TRANSLATOR::Expr_To_String(), and Whirl2Src_Translate_Iload_Str().

| static void W2C_Undo_Whirl_Side_Effects | ( | void | ) | [static] |
Definition at line 519 of file w2c_driver.cxx.
References Stab_Free_Namebufs(), and Stab_Free_Tmpvars().
Referenced by W2C_def_TY(), W2C_Outfile_Translate_Pu(), W2C_Translate_Global_Defs(), W2C_Translate_Global_Types(), W2C_Translate_Istore_Lhs(), W2C_Translate_Purple_Main(), W2C_Translate_Stid_Lhs(), W2C_Translate_Wn(), and W2C_Translate_Wn_Str().

| void W2C_write_init | ( | FILE * | outfile | ) |
Definition at line 867 of file w2c_driver.cxx.
References Check_Initialized().

BOOL File_Is_Created[W2C_NUM_FILES] [static] |
{FALSE, FALSE, FALSE, FALSE, FALSE}
Definition at line 147 of file w2c_driver.cxx.
Referenced by Open_W2c_Output_File(), and W2C_Fini().
CONTEXT Global_Context = INIT_CONTEXT [static] |
Definition at line 143 of file w2c_driver.cxx.
INT Next_Skip_Item = 0 [static] |
Definition at line 137 of file w2c_driver.cxx.
Referenced by W2C_Pop_PU(), and W2C_Push_PU().
W2CF_SKIP_ITEM Skip[W2C_MAX_SKIP_ITEMS+1] [static] |
Definition at line 136 of file w2c_driver.cxx.
Referenced by WN_TREE_ITER< PRE_ORDER, WHIRL >::Delete().
const char* W2C_Cite_Extension[W2C_NUM_FILES] [static] |
{
".c",
"-after-lno.h",
"-after-lno.c",
".loc",
".global_data.c",
}
Definition at line 109 of file w2c_driver.cxx.
| const WN_MAP* W2C_Construct_Map = NULL |
Definition at line 171 of file w2c_driver.cxx.
Referenced by W2C_Set_Prompf_Emission(), WN2C_End_Prompf_Construct(), WN2C_Prompf_Construct_End(), WN2C_Prompf_Construct_Start(), and WN2C_Start_Prompf_Construct().
| BOOL W2C_Cplus_Initializer = FALSE |
Definition at line 173 of file w2c_driver.cxx.
Referenced by W2C_Enter_Global_Symbols(), W2C_Fini(), and WN2C_block().
| BOOL W2C_Emit_Adims = FALSE |
Definition at line 156 of file w2c_driver.cxx.
Referenced by W2C_Fini(), W2C_Process_Command_Line(), and WN2C_Normalize_Idx_To_Onedim().
| BOOL W2C_Emit_All_Regions = FALSE |
Definition at line 158 of file w2c_driver.cxx.
Referenced by W2C_Fini(), W2C_Process_Command_Line(), and WN2C_region().
| BOOL W2C_Emit_Cgtag = FALSE |
Definition at line 162 of file w2c_driver.cxx.
Referenced by W2C_Process_Command_Line(), and WN2C_do_loop().
| BOOL W2C_Emit_Frequency = FALSE |
Definition at line 161 of file w2c_driver.cxx.
Referenced by W2C_Fini(), W2C_Process_Command_Line(), and WN2C_Translate_Stmt_Sequence().
| BOOL W2C_Emit_Linedirs = FALSE |
Definition at line 159 of file w2c_driver.cxx.
Referenced by W2C_Fini(), W2C_Process_Command_Line(), and WN2C_Stmt_Newline().
| BOOL W2C_Emit_Nested_PUs = FALSE |
Definition at line 160 of file w2c_driver.cxx.
Referenced by W2C_Fini(), W2C_Outfile_Translate_Pu(), W2C_Process_Command_Line(), and W2C_Should_Emit_Nested_PUs().
| BOOL W2C_Emit_Omp = FALSE |
Definition at line 164 of file w2c_driver.cxx.
Referenced by W2C_Process_Command_Line(), and WN2C_is_omp().
| BOOL W2C_Emit_Prefetch = FALSE |
Definition at line 157 of file w2c_driver.cxx.
Referenced by W2C_Fini(), W2C_Process_Command_Line(), WN2C_iload(), WN2C_istore(), and WN2C_Skip_Stmt().
| BOOL W2C_Enabled = TRUE |
Definition at line 153 of file w2c_driver.cxx.
Referenced by W2C_Fini(), and W2C_Process_Command_Line().
| FILE* W2C_File[W2C_NUM_FILES] = {NULL, NULL, NULL, NULL} |
Definition at line 152 of file w2c_driver.cxx.
Referenced by Begin_New_Locations_File(), Close_W2c_Output_File(), End_Locations_File(), Open_W2c_Output_File(), TY2C_Output_Struct_Type(), TY2C_Translate_Structure(), W2C_def_TY(), W2C_Fini(), W2C_Outfile_Fini(), W2C_Outfile_Init(), W2C_Outfile_Translate_Pu(), W2C_Translate_Global_Defs(), W2C_Translate_Global_Types(), W2C_Translate_Purple_Main(), W2C_Translate_Wn(), WN2C_Append_Symtab_Consts(), WN2C_Append_Symtab_Types(), WN2C_Append_Symtab_Vars(), WN2C_Stmt_Newline(), WN2C_translate_file_scope_defs(), and WN2C_translate_structured_types().
const char* W2C_File_Extension[W2C_NUM_FILES] [static] |
{
".c",
".w2c.h",
".w2c.c",
".w2c.loc",
".global_data.c",
}
Definition at line 99 of file w2c_driver.cxx.
const char* W2C_File_Name[W2C_NUM_FILES] [static] |
{NULL, NULL, NULL, NULL}
Definition at line 145 of file w2c_driver.cxx.
Referenced by Begin_New_Locations_File(), Close_W2c_Output_File(), Continue_Locations_File(), End_Locations_File(), Open_W2c_Output_File(), Process_Filename_Options(), W2C_Cleanup(), W2C_Fini(), W2C_Get_Transformed_Src_Path(), W2C_Outfile_Fini(), W2C_Outfile_Init(), and W2C_Process_Command_Line().
| WN_MAP W2C_Frequency_Map = WN_MAP_UNDEFINED |
Definition at line 172 of file w2c_driver.cxx.
Referenced by W2C_Pop_PU(), W2C_Set_Frequency_Map(), and WN2C_Translate_Stmt_Sequence().
BOOL W2C_Initialized = FALSE [static] |
Definition at line 142 of file w2c_driver.cxx.
Referenced by Check_Initialized(), W2C_Fini(), W2C_Init(), and W2C_Outfile_Init().
| INT32 W2C_Line_Length = 0 |
Definition at line 165 of file w2c_driver.cxx.
Referenced by W2C_Fini(), W2C_Init(), and W2C_Process_Command_Line().
| BOOL W2C_Lower_Fortran = FALSE |
Definition at line 163 of file w2c_driver.cxx.
Referenced by W2C_Fini(), W2C_Outfile_Translate_Pu(), and W2C_Process_Command_Line().
| BOOL W2C_No_Pragmas = FALSE |
Definition at line 155 of file w2c_driver.cxx.
Referenced by W2C_Fini(), W2C_Process_Command_Line(), WN2C_func_entry(), WN2C_region(), and WN2C_Skip_Stmt().
| BOOL W2C_Only_Mark_Loads = FALSE |
Definition at line 168 of file w2c_driver.cxx.
Referenced by W2C_Fini(), W2C_Mark_Loads(), W2C_Nomark_Loads(), WN2C_iload(), WN2C_ldid(), and WN2C_mload().
BOOL W2C_Outfile_Initialized = FALSE [static] |
Definition at line 141 of file w2c_driver.cxx.
Referenced by Check_Outfile_Initialized(), W2C_Fini(), W2C_Outfile_Fini(), and W2C_Outfile_Init().
MEM_POOL W2C_Parent_Pool [static] |
Definition at line 149 of file w2c_driver.cxx.
const char* W2C_Progname = "" [static] |
Definition at line 144 of file w2c_driver.cxx.
Referenced by W2C_Fini(), W2C_Outfile_Init(), and W2C_Process_Command_Line().
| BOOL W2C_Prompf_Emission = FALSE |
Definition at line 170 of file w2c_driver.cxx.
Referenced by Begin_New_Locations_File(), End_Locations_File(), Process_Filename_Options(), W2C_Init(), W2C_Outfile_Fini(), W2C_Outfile_Init(), W2C_Set_Prompf_Emission(), WN2C_do_loop(), WN2C_do_while(), WN2C_func_entry(), WN2C_process_pragma(), WN2C_region(), and WN2C_while_do().
const char* W2C_Prompf_Extension[W2C_NUM_FILES] [static] |
{
".c",
".mh",
".m",
".anl_srcpos"
}
Definition at line 119 of file w2c_driver.cxx.
| BOOL W2C_Purple_Emission = FALSE |
Definition at line 169 of file w2c_driver.cxx.
Referenced by W2C_Reset_Purple_Emission(), W2C_Set_Purple_Emission(), WN2C_block(), and WN2C_pragma().
| BOOL W2C_Verbose = TRUE |
Definition at line 154 of file w2c_driver.cxx.
Referenced by W2C_Fini(), W2C_Outfile_Init(), and W2C_Process_Command_Line().
| Unparse_Target* W2X_Unparse_Target = NULL |
Definition at line 174 of file w2c_driver.cxx.
1.7.1