osprey/kg++fe/wfe_misc.cxx File Reference

#include <values.h>
#include <sys/types.h>
#include <elf.h>
#include "defs.h"
#include "config.h"
#include "config_debug.h"
#include "config_list.h"
#include "config_targ_opt.h"
#include "controls.h"
#include "erglob.h"
#include "erlib.h"
#include "file_util.h"
#include "flags.h"
#include "glob.h"
#include "mempool.h"
#include "tracing.h"
#include "util.h"
#include "errors.h"
#include "err_host.tab"
#include <stdarg.h>
#include "gnu_config.h"
#include "gnu/system.h"
#include "gnu/tree.h"
#include "wn.h"
#include "wn_util.h"
#include "wn_simp.h"
#include "symtab.h"
#include "pu_info.h"
#include "ir_reader.h"
#include "ir_bwrite.h"
#include "wfe_decl.h"
#include "wfe_expr.h"
#include "wfe_dst.h"
#include "wfe_misc.h"
#include "wfe_stmt.h"
#include "c_int_model.h"

Include dependency graph for wfe_misc.cxx:

Go to the source code of this file.

Data Types

type  wn_stmt

Defines

#define DEF_DEBUG_LEVEL   0
#define MAX_MSG_LEVEL   2
#define DEF_MSG_LEVEL   2
#define IRB_FILE_EXTENSION   ".B"
#define IRD_FILE_EXTENSION   ".D"
#define ERR_FILE_EXTENSION   ".e"
#define LST_FILE_EXTENSION   ".l"
#define TRC_FILE_EXTENSION   ".t"
#define DSTDUMP_FILE_EXTENSION   ".fe.dst"
#define ENLARGE(x)   (x + (x >> 1))
#define WN_STMT_STACK_SIZE   32

Typedefs

typedef struct wn_stmt WN_STMT

Enumerations

enum  debug_info_level {
  DINFO_LEVEL_NONE, DINFO_LEVEL_TERSE, DINFO_LEVEL_NORMAL, DINFO_LEVEL_VERBOSE,
  DINFO_LEVEL_NONE, DINFO_LEVEL_TERSE, DINFO_LEVEL_NORMAL, DINFO_LEVEL_VERBOSE,
  DINFO_LEVEL_NONE, DINFO_LEVEL_TERSE, DINFO_LEVEL_NORMAL, DINFO_LEVEL_VERBOSE,
  DINFO_LEVEL_NONE, DINFO_LEVEL_TERSE, DINFO_LEVEL_NORMAL, DINFO_LEVEL_VERBOSE,
  DINFO_LEVEL_NONE, DINFO_LEVEL_TERSE, DINFO_LEVEL_NORMAL, DINFO_LEVEL_VERBOSE,
  DINFO_LEVEL_NONE, DINFO_LEVEL_TERSE, DINFO_LEVEL_NORMAL, DINFO_LEVEL_VERBOSE,
  DINFO_LEVEL_NONE, DINFO_LEVEL_TERSE, DINFO_LEVEL_NORMAL, DINFO_LEVEL_VERBOSE
}

Functions/Subroutines

void Initialize_IRB (void)
static BOOL Prepare_Source (void)
static void WFE_Stmt_Stack_Init (void)
static void WFE_Stmt_Stack_Free (void)
void Cleanup_Files (BOOL report, BOOL delete_dotofile)
void Terminate (INT status)
void WFE_Init (INT argc, char **argv, char **envp)
void WFE_File_Init (INT argc, char **argv)
void WFE_File_Finish (void)
void WFE_Finish ()
void WFE_Check_Errors (int *error_count, int *warning_count, BOOL *need_inliner)
void WFE_Stmt_Push (WN *wn, WFE_STMT_KIND kind, SRCPOS srcpos)
WNWFE_Stmt_Top (void)
void WFE_Stmt_Append (WN *wn, SRCPOS srcpos)
WNWFE_Stmt_Last (void)
WNWFE_Stmt_Delete ()
WNWFE_Stmt_Pop (WFE_STMT_KIND kind)

Variables

int WFE_Keep_Zero_Length_Structs = TRUE
int optimize
PU_InfoPU_Tree_Root = NULL
int wfe_invoke_inliner = FALSE
char * asm_file_name
int trace_verbose = FALSE
enum debug_info_level debug_info_level
INT8 Debug_Level = DEF_DEBUG_LEVEL
static INT32 Argc
static char ** Argv
static INT32 Source_Arg = 0
static INT32 Src_Count = 0
static char Dash [] = "-"
static BOOL Echo_Flag = FALSE
static BOOL Delete_IR_File = FALSE
static WN_STMTwn_stmt_stack
static WN_STMTwn_stmt_sp
static WN_STMTwn_stmt_stack_last
static INT wn_stmt_stack_size
char * WFE_Stmt_Kind_Name [wfe_stmk_last+1]


Define Documentation

#define DEF_DEBUG_LEVEL   0

Definition at line 130 of file wfe_misc.cxx.

#define DEF_MSG_LEVEL   2

Definition at line 133 of file wfe_misc.cxx.

#define DSTDUMP_FILE_EXTENSION   ".fe.dst"

Definition at line 147 of file wfe_misc.cxx.

#define ENLARGE (  )     (x + (x >> 1))

#define ERR_FILE_EXTENSION   ".e"

Definition at line 144 of file wfe_misc.cxx.

#define IRB_FILE_EXTENSION   ".B"

Definition at line 142 of file wfe_misc.cxx.

#define IRD_FILE_EXTENSION   ".D"

Definition at line 143 of file wfe_misc.cxx.

#define LST_FILE_EXTENSION   ".l"

Definition at line 145 of file wfe_misc.cxx.

#define MAX_MSG_LEVEL   2

Definition at line 132 of file wfe_misc.cxx.

#define TRC_FILE_EXTENSION   ".t"

Definition at line 146 of file wfe_misc.cxx.

#define WN_STMT_STACK_SIZE   32

Definition at line 476 of file wfe_misc.cxx.

Referenced by WFE_Stmt_Stack_Init(), and WGEN_Stmt_Stack_Init().


Typedef Documentation


Enumeration Type Documentation

Enumerator:
DINFO_LEVEL_NONE 
DINFO_LEVEL_TERSE 
DINFO_LEVEL_NORMAL 
DINFO_LEVEL_VERBOSE 
DINFO_LEVEL_NONE 
DINFO_LEVEL_TERSE 
DINFO_LEVEL_NORMAL 
DINFO_LEVEL_VERBOSE 
DINFO_LEVEL_NONE 
DINFO_LEVEL_TERSE 
DINFO_LEVEL_NORMAL 
DINFO_LEVEL_VERBOSE 
DINFO_LEVEL_NONE 
DINFO_LEVEL_TERSE 
DINFO_LEVEL_NORMAL 
DINFO_LEVEL_VERBOSE 
DINFO_LEVEL_NONE 
DINFO_LEVEL_TERSE 
DINFO_LEVEL_NORMAL 
DINFO_LEVEL_VERBOSE 
DINFO_LEVEL_NONE 
DINFO_LEVEL_TERSE 
DINFO_LEVEL_NORMAL 
DINFO_LEVEL_VERBOSE 
DINFO_LEVEL_NONE 
DINFO_LEVEL_TERSE 
DINFO_LEVEL_NORMAL 
DINFO_LEVEL_VERBOSE 

Definition at line 107 of file wfe_misc.cxx.


Function Documentation

void Cleanup_Files ( BOOL  report,
BOOL  delete_dotofile 
)

void Initialize_IRB ( void   ) 

static BOOL Prepare_Source ( void   )  [static]

Definition at line 517 of file driver_util.cxx.

void Terminate ( INT  status  ) 

Definition at line 222 of file wfe_misc.cxx.

References Cleanup_Files(), exit(), and FALSE.

void WFE_Check_Errors ( int *  error_count,
int *  warning_count,
BOOL need_inliner 
)

Definition at line 467 of file wfe_misc.cxx.

Referenced by main().

void WFE_File_Finish ( void   ) 

Definition at line 451 of file wfe_misc.cxx.

Referenced by main(), and WFE_Compile_File().

void WFE_File_Init ( INT  argc,
char **  argv 
)

Definition at line 433 of file wfe_misc.cxx.

Referenced by main(), and WFE_Compile_File().

void WFE_Finish ( void   ) 

Definition at line 461 of file wfe_misc.cxx.

Referenced by main(), and WFE_Compile_File().

void WFE_Init ( INT  argc,
char **  argv,
char **  envp 
)

Definition at line 377 of file wfe_misc.cxx.

Referenced by main(), and WFE_Compile_File().

void WFE_Stmt_Append ( WN wn,
SRCPOS  srcpos 
)

Definition at line 595 of file wfe_misc.cxx.

References wn_stmt::kind, last, NULL, OPR_BLOCK, opt_regions, TRUE, WFE_Stmt_Top(), WN_first(), WN_INSERT_BlockAfter(), WN_last(), WN_operator(), and WN_Set_Linenum().

Referenced by Call_Named_Function(), Create_ST_For_Tree(), Create_TY_For_Tree(), Do_EH_Cleanups(), Do_Handlers(), emit_barrier(), emit_builtin_compare_and_swap(), emit_builtin_lock_release(), emit_builtin_lock_test_and_set(), emit_builtin_synchronize(), Gen_Assign_Of_Init_Val(), Traverse_Aggregate_Pad(), WFE_Add_Case_Node(), WFE_Alloca_0(), WFE_Alloca_ST(), WFE_Array_Expr(), WFE_Dealloca(), Wfe_Expand_Asm_Operands(), WFE_expand_barrier(), WFE_Expand_Break(), WFE_Expand_Case(), WFE_Expand_Computed_Goto(), WFE_Expand_Continue(), WFE_Expand_Continue_Loop(), WFE_Expand_EH_Region_End(), WFE_Expand_End_All_Catch(), WFE_expand_end_atomic(), WFE_Expand_End_Case(), WFE_expand_end_critical(), WFE_Expand_End_Loop(), WFE_expand_end_ordered(), WFE_expand_end_section(), WFE_Expand_Exit_Loop_If_False(), WFE_Expand_Expr(), WFE_Expand_Expr_With_Sequence_Point(), WFE_expand_flush(), WFE_Expand_Goto(), WFE_Expand_Handlers_Or_Cleanup(), WFE_Expand_If(), WFE_Expand_Internal_Throw(), WFE_Expand_Label(), WFE_Expand_Leftover_Cleanups(), WFE_Expand_Loop(), WFE_Expand_Loop_Continue_Here(), WFE_Expand_Return(), WFE_Expand_Start_All_Catch(), WFE_expand_start_atomic(), WFE_Expand_Start_Case(), WFE_Expand_Start_Cond(), WFE_expand_start_critical(), WFE_expand_start_do_loop(), WFE_expand_start_for(), WFE_expand_start_master(), WFE_expand_start_ordered(), WFE_expand_start_parallel(), WFE_expand_start_parallel_for(), WFE_expand_start_parallel_sections(), WFE_expand_start_section(), WFE_expand_start_sections(), WFE_expand_start_single(), WFE_expand_threadprivate(), WFE_Expand_Try(), WFE_Finish_Function(), WFE_Generate_Thunk(), WFE_Initialize_Decl(), WFE_Lhs_Of_Modify_Expr(), WFE_Null_Return(), WFE_One_Stmt(), WFE_region(), WFE_Save_Expr(), and WFE_Start_Function().

WN* WFE_Stmt_Delete (  ) 

Definition at line 635 of file wfe_misc.cxx.

References last, NULL, prev, WFE_Stmt_Top(), WN_first(), WN_last(), WN_next(), and WN_prev().

WN* WFE_Stmt_Last ( void   ) 

Definition at line 625 of file wfe_misc.cxx.

References WFE_Stmt_Top(), and WN_last().

WN* WFE_Stmt_Pop ( WFE_STMT_KIND  kind  ) 

void WFE_Stmt_Push ( WN wn,
WFE_STMT_KIND  kind,
SRCPOS  srcpos 
)

static void WFE_Stmt_Stack_Free ( void   )  [static]

Definition at line 532 of file wfe_misc.cxx.

References free(), and NULL.

Referenced by WFE_Finish().

static void WFE_Stmt_Stack_Init ( void   )  [static]

Definition at line 522 of file wfe_misc.cxx.

References malloc, and WN_STMT_STACK_SIZE.

Referenced by WFE_Init().

WN* WFE_Stmt_Top ( void   ) 


Variable Documentation

INT32 Argc [static]

Definition at line 150 of file wfe_misc.cxx.

Referenced by Process_Command_Line(), WFE_Init(), and WGEN_Init().

char** Argv [static]

Definition at line 151 of file wfe_misc.cxx.

Referenced by Process_Command_Line(), WFE_Init(), and WGEN_Init().

Definition at line 367 of file toplev.c.

char Dash[] = "-" [static]

Definition at line 154 of file wfe_misc.cxx.

Referenced by Prepare_Source(), and WFE_Init().

Definition at line 380 of file toplev.c.

INT8 Debug_Level = DEF_DEBUG_LEVEL

Definition at line 131 of file wfe_misc.cxx.

BOOL Delete_IR_File = FALSE [static]

Definition at line 158 of file wfe_misc.cxx.

Referenced by Cleanup_Files(), Prepare_Source(), and WFE_Init().

BOOL Echo_Flag = FALSE [static]

Definition at line 157 of file wfe_misc.cxx.

Referenced by Process_Command_Line().

int optimize

Definition at line 352 of file genattrtab.c.

Definition at line 83 of file wfe_misc.cxx.

INT32 Source_Arg = 0 [static]

Definition at line 152 of file wfe_misc.cxx.

Referenced by Process_Command_Line().

INT32 Src_Count = 0 [static]

Definition at line 153 of file wfe_misc.cxx.

Referenced by Process_Cc1_Command_Line(), Process_Command_Line(), and WFE_File_Init().

int trace_verbose = FALSE

Definition at line 89 of file wfe_misc.cxx.

int wfe_invoke_inliner = FALSE

Definition at line 84 of file wfe_misc.cxx.

Referenced by WFE_Check_Errors(), WFE_Expand_Expr(), and WFE_Start_Function().

char* WFE_Stmt_Kind_Name[wfe_stmk_last+1]

Definition at line 488 of file wfe_misc.cxx.

WN_STMT* wn_stmt_sp [static]

Definition at line 484 of file wfe_misc.cxx.

Definition at line 483 of file wfe_misc.cxx.

Definition at line 485 of file wfe_misc.cxx.

Definition at line 486 of file wfe_misc.cxx.

Referenced by WGEN_Stmt_Push(), and WGEN_Stmt_Stack_Init().


Generated on Wed Apr 8 15:48:47 2009 for Open64 by  doxygen 1.5.6