osprey/driver/opt_actions.c File Reference

#include <string.h>
#include <stdlib.h>
#include <sys/utsname.h>
#include <unistd.h>
#include "cmplrs/rcodes.h"
#include "opt_actions.h"
#include "options.h"
#include "option_names.h"
#include "option_seen.h"
#include "lang_defs.h"
#include "errors.h"
#include "file_utils.h"
#include "file_names.h"
#include "string_utils.h"
#include "get_options.h"
#include "objects.h"
#include "pathscale_defs.h"
#include "phases.h"
#include "run.h"
#include "profile_type.h"
#include "opt_action.i"

Include dependency graph for opt_actions.c:

Go to the source code of this file.

Data Types

type  toggle_name_struct

Defines

#define MAX_TOGGLES   50

Typedefs

typedef struct toggle_name_struct toggle_name

Enumerations

enum  DSM_OPTION { DSM_UNDEFINED, DSM_OFF, DSM_ON }

Functions/Subroutines

static void set_cpu (char *name, m_flag flag_type)
static void add_toggle_name (int *obj, char *name)
static char * get_toggle_name (int *obj)
boolean is_toggled (int obj)
void toggle (int *obj, int value)
static char * Get_Group_Option_Value (char *arg, char *name, char *abbrev)
static boolean Bool_Group_Value (char *val)
void Process_Ofast (char *ipname)
void Process_Opt_Group (char *opt_args)
void Process_Default_Group (char *default_args)
void Process_Targ_Group (char *targ_args)
void Check_Target (void)
static void toggle_inline_normal (void)
void toggle_inline_on (void)
static void toggle_inline_off (void)
void Process_Profile_Arcs (void)
void Process_Test_Coverage (void)
void Process_Inline (void)
void dash_F_option (void)
void untoggle (int *obj, int value)
static void change_phase_path (char *arg)
static void change_last_phase (char *s)
void save_name (char **obj, char *value)
static void check_output_name (char *name)
void check_opt_tls_model (char *model)
void check_dashdash (void)
static char * Get_Binary_Name (char *name)
void Process_fbuse (char *fname)
void Process_fb_type (char *typename)
void Process_fb_create (char *fname)
void Process_fb_phase (char *phase)
void Process_fb_opt (char *fname)
void Process_fbexe (char *fname)
void Process_fb_xdir (char *fname)
void Process_fb_cdir (char *fname)
void set_dsm_default_options (void)
void reset_dsm_default_options (void)
void set_dsm_options (void)
void Process_Mp_Group (char *mp_args)
void Process_Mp (void)
void Process_Cray_Mp (void)
void Process_Promp (void)
void Process_Tenv_Group (char *opt_args)
static int print_magic_path (const char *base, const char *fname)
static int print_phase_path (phases_t phase, const char *fname)
static int print_relative_path (const char *s, const char *fname)
void print_file_path (char *fname, int exe)
void print_multi_lib ()
void set_memory_model (char *model)
static int get_platform_abi ()
static int get_num_after_colon (char *str)
static char * get_default_cpu_name (char *msg)
char * get_auto_cpu_name ()

Variables

static toggle_name toggled_names [MAX_TOGGLES]
static int last_toggle_index = 0
static int inline_on_seen = FALSE
int inline_t = UNDEFINED
boolean dashdash_flag = FALSE
boolean read_stdin = FALSE
boolean xpg_flag = FALSE
int default_olevel = 2
static int default_isa = UNDEFINED
static int default_proc = UNDEFINED
int instrumentation_invoked = UNDEFINED
int profile_type = 0
boolean ftz_crt = FALSE
int proc = UNDEFINED
boolean parsing_default_options
boolean drop_option
int ofast = UNDEFINED
static DSM_OPTION dsm_option = DSM_UNDEFINED
static DSM_OPTION dsm_clone = DSM_UNDEFINED
static DSM_OPTION dsm_check = DSM_UNDEFINED
mem_model_t mem_model = M_SMALL
char * mem_model_name = NULL
type {
   char *   cpu_name
   char *   target_name
   int   abi
   boolean   supports_sse2
   boolean   prefers_sse3
   boolean   supports_sse4a
supported_cpu_types []
char * target_cpu = NULL


Define Documentation

#define MAX_TOGGLES   50

Definition at line 75 of file opt_actions.c.

Referenced by add_toggle_name().


Typedef Documentation


Enumeration Type Documentation

enum DSM_OPTION

Enumerator:
DSM_UNDEFINED 
DSM_OFF 
DSM_ON 

Definition at line 1265 of file opt_actions.c.


Function Documentation

static void add_toggle_name ( int *  obj,
char *  name 
) [static]

static boolean Bool_Group_Value ( char *  val  )  [static]

Definition at line 259 of file opt_actions.c.

References FALSE, strcasecmp(), and TRUE.

Referenced by Process_Opt_Group(), and Process_Targ_Group().

static void change_last_phase ( char *  s  )  [static]

static void change_phase_path ( char *  arg  )  [static]

void check_dashdash ( void   ) 

Definition at line 1155 of file opt_actions.c.

References dashdash_flag, error(), option_name, and xpg_flag.

void check_opt_tls_model ( char *  model  ) 

Definition at line 1143 of file opt_actions.c.

References error(), and strcmp().

static void check_output_name ( char *  name  )  [static]

Definition at line 1104 of file opt_actions.c.

References file_exists(), get_source_kind(), NULL, option_name, option_was_seen(), S_c, S_o, S_s, and warning.

void Check_Target ( void   ) 

void dash_F_option ( void   ) 

Definition at line 1024 of file opt_actions.c.

References earliest_phase(), error(), invoked_lang, L_CC, L_f77, last_phase, P_ratfor, and parse_error().

char* get_auto_cpu_name (  ) 

static char* Get_Binary_Name ( char *  name  )  [static]

Definition at line 1167 of file opt_actions.c.

References len, string_copy(), strlen(), and strncmp().

Referenced by Process_fbuse().

static char* get_default_cpu_name ( char *  msg  )  [static]

Definition at line 1699 of file opt_actions.c.

References ABI_64, cpu_name, get_platform_abi(), NULL, and warning.

Referenced by get_auto_cpu_name().

static char* Get_Group_Option_Value ( char *  arg,
char *  name,
char *  abbrev 
) [static]

static int get_num_after_colon ( char *  str  )  [static]

Definition at line 1680 of file opt_actions.c.

References error(), NULL, p, sscanf(), and strchr.

Referenced by get_auto_cpu_name().

static int get_platform_abi (  )  [static]

Definition at line 1662 of file opt_actions.c.

References ABI_64, ABI_N32, ABI_W64, strcmp(), and uname().

Referenced by Check_Target(), get_auto_cpu_name(), and get_default_cpu_name().

static char* get_toggle_name ( int *  obj  )  [static]

Definition at line 164 of file opt_actions.c.

References address, i, internal_error(), last_toggle_index, and toggle_name_struct::name.

Referenced by Check_Target(), set_cpu(), and toggle().

boolean is_toggled ( int  obj  ) 

Definition at line 178 of file opt_actions.c.

References UNDEFINED.

Referenced by add_special_options(), display_version(), print_defaults(), set_defaults(), and toggle().

void print_file_path ( char *  fname,
int  exe 
)

static int print_magic_path ( const char *  base,
const char *  fname 
) [static]

void print_multi_lib (  ) 

Definition at line 1585 of file opt_actions.c.

References asprintf(), execlp(), exit(), fprintf(), and NULL.

static int print_phase_path ( phases_t  phase,
const char *  fname 
) [static]

Definition at line 1526 of file opt_actions.c.

References get_phase_dir(), and print_magic_path().

Referenced by print_file_path().

static int print_relative_path ( const char *  s,
const char *  fname 
) [static]

Definition at line 1531 of file opt_actions.c.

References asprintf(), base, directory_path(), get_executable_dir(), and print_magic_path().

Referenced by print_file_path().

void Process_Cray_Mp ( void   ) 

Definition at line 1433 of file opt_actions.c.

References error(), invoked_lang, and L_f90.

Referenced by add_special_options().

void Process_Default_Group ( char *  default_args  ) 

void Process_fb_cdir ( char *  fname  ) 

Definition at line 1259 of file opt_actions.c.

References fb_cdir, and string_copy().

void Process_fb_create ( char *  fname  ) 

void Process_fb_opt ( char *  fname  ) 

Definition at line 1239 of file opt_actions.c.

References FALSE, instrumentation_invoked, opt_file, string_copy(), and toggle().

void Process_fb_phase ( char *  phase  ) 

Definition at line 1227 of file opt_actions.c.

References add_option_seen(), add_string_option(), fb_phase, sprintf(), str, and string_copy().

void Process_fb_type ( char *  typename  ) 

void Process_fb_xdir ( char *  fname  ) 

Definition at line 1253 of file opt_actions.c.

References fb_xdir, and string_copy().

void Process_fbexe ( char *  fname  ) 

Definition at line 1247 of file opt_actions.c.

References prof_file, and string_copy().

void Process_fbuse ( char *  fname  ) 

void Process_Inline ( void   ) 

void Process_Mp ( void   ) 

void Process_Mp_Group ( char *  mp_args  ) 

void Process_Ofast ( char *  ipname  ) 

void Process_Opt_Group ( char *  opt_args  ) 

void Process_Profile_Arcs ( void   ) 

Definition at line 969 of file opt_actions.c.

References add_string_option(), option_name, and strncmp().

void Process_Promp ( void   ) 

Definition at line 1445 of file opt_actions.c.

References add_option_seen(), add_string_option(), debug, fprintf(), invoked_lang, L_cc, L_f77, and L_f90.

void Process_Targ_Group ( char *  targ_args  ) 

void Process_Tenv_Group ( char *  opt_args  ) 

Definition at line 1468 of file opt_actions.c.

References debug, fprintf(), set_memory_model(), and strncmp().

void Process_Test_Coverage ( void   ) 

Definition at line 976 of file opt_actions.c.

References add_string_option(), option_name, and strncmp().

void reset_dsm_default_options ( void   ) 

Definition at line 1284 of file opt_actions.c.

References DSM_OFF.

Referenced by Process_Mp_Group(), and set_dsm_options().

void save_name ( char **  obj,
char *  value 
)

Definition at line 1098 of file opt_actions.c.

References string_copy().

Referenced by if().

static void set_cpu ( char *  name,
m_flag  flag_type 
) [static]

void set_dsm_default_options ( void   ) 

Definition at line 1276 of file opt_actions.c.

References DSM_OFF, DSM_ON, DSM_UNDEFINED, invoked_lang, and L_CC.

Referenced by Process_Mp(), and Process_Mp_Group().

void set_dsm_options ( void   ) 

void set_memory_model ( char *  model  ) 

Definition at line 1601 of file opt_actions.c.

References error(), M_KERNEL, M_LARGE, M_MEDIUM, M_SMALL, NULL, and strcmp().

Referenced by Process_Tenv_Group().

void toggle ( int *  obj,
int  value 
)

static void toggle_inline_normal ( void   )  [static]

Definition at line 934 of file opt_actions.c.

References inline_t, TRUE, and UNDEFINED.

Referenced by Process_Inline().

static void toggle_inline_off ( void   )  [static]

Definition at line 959 of file opt_actions.c.

References FALSE, inline_on_seen, inline_t, option_name, TRUE, and warning.

Referenced by Process_Inline().

void toggle_inline_on ( void   ) 

Definition at line 943 of file opt_actions.c.

References FALSE, inline_on_seen, inline_t, option_name, TRUE, and warning.

Referenced by Process_Inline().

void untoggle ( int *  obj,
int  value 
)

Definition at line 1037 of file opt_actions.c.

References UNDEFINED.


Variable Documentation

int abi

Definition at line 1628 of file opt_actions.c.

Referenced by get_command_line(), and ipacom_process_symtab().

char* cpu_name

Definition at line 1626 of file opt_actions.c.

Referenced by get_auto_cpu_name(), get_default_cpu_name(), and init_cif().

int default_isa = UNDEFINED [static]

Definition at line 95 of file opt_actions.c.

Referenced by Check_Target(), and Process_Default_Group().

int default_olevel = 2

Definition at line 93 of file opt_actions.c.

Referenced by add_special_options(), and Process_Default_Group().

int default_proc = UNDEFINED [static]

Definition at line 96 of file opt_actions.c.

Referenced by Check_Target().

Definition at line 115 of file main.c.

Referenced by set_cpu(), and toggle().

DSM_OPTION dsm_check = DSM_UNDEFINED [static]

Definition at line 1273 of file opt_actions.c.

DSM_OPTION dsm_clone = DSM_UNDEFINED [static]

Definition at line 1272 of file opt_actions.c.

DSM_OPTION dsm_option = DSM_UNDEFINED [static]

Definition at line 1271 of file opt_actions.c.

boolean ftz_crt = FALSE

Definition at line 99 of file opt_actions.c.

Referenced by add_file_args(), Process_Ofast(), and Process_Targ_Group().

int inline_on_seen = FALSE [static]

Definition at line 78 of file opt_actions.c.

Referenced by toggle_inline_off(), and toggle_inline_on().

int inline_t = UNDEFINED

int instrumentation_invoked = UNDEFINED

int last_toggle_index = 0 [static]

Definition at line 77 of file opt_actions.c.

Referenced by add_toggle_name(), and get_toggle_name().

Definition at line 1597 of file opt_actions.c.

char* mem_model_name = NULL

Definition at line 1598 of file opt_actions.c.

int ofast = UNDEFINED

Definition at line 140 of file opt_actions.c.

Referenced by Process_Ofast().

Definition at line 114 of file main.c.

Referenced by set_cpu(), and toggle().

Definition at line 1630 of file opt_actions.c.

int proc = UNDEFINED

int profile_type = 0

Definition at line 98 of file opt_actions.c.

Referenced by add_instr_archive(), and Process_fb_type().

Definition at line 87 of file opt_actions.c.

Referenced by if(), and lang_specific_driver().

struct { ... } supported_cpu_types[] [static]

Definition at line 1629 of file opt_actions.c.

Definition at line 1631 of file opt_actions.c.

char* target_cpu = NULL

char* target_name

Definition at line 1627 of file opt_actions.c.

Referenced by build_bc_goto(), and pe_dll_id_target().

toggle_name toggled_names[MAX_TOGGLES] [static]

Definition at line 76 of file opt_actions.c.

boolean xpg_flag = FALSE

Definition at line 88 of file opt_actions.c.

Referenced by add_object(), append_objects_to_list(), check_dashdash(), and init_phase_info().


Generated on Wed Apr 8 15:07:21 2009 for Open64 by  doxygen 1.5.6