#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"

Go to the source code of this file.
| #define MAX_TOGGLES 50 |
| typedef struct toggle_name_struct toggle_name |
| enum DSM_OPTION |
| static void add_toggle_name | ( | int * | obj, | |
| char * | name | |||
| ) | [static] |
Definition at line 144 of file opt_actions.c.
References address, toggle_name_struct::address, i, internal_error(), last_toggle_index, MAX_TOGGLES, toggle_name_struct::name, option_name, and string_copy().
| 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] |
Definition at line 1083 of file opt_actions.c.
References earliest_phase(), get_phase(), last_phase, NIL, NULL, option_name, P_NONE, parse_error(), and warn_ignored().
| static void change_phase_path | ( | char * | arg | ) | [static] |
Definition at line 1045 of file opt_actions.c.
References concat_strings(), dir, get_phase(), get_phase_mask(), getenv(), is_directory(), NIL, NULL, option_name, P_any_fe, P_NONE, parse_error(), s, and set_phase_dir().
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 | ) |
| 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.
Definition at line 653 of file opt_actions.c.
References ABI_64, ABI_I32, ABI_I64, ABI_IA32, ABI_N32, ABI_W64, add_option_seen(), debug, default_isa, default_proc, fprintf(), get_option_name(), get_platform_abi(), get_toggle_name(), internal_error(), ISA_COMPUTE_10, ISA_IA32, ISA_IA641, ISA_MIPS1, ISA_MIPS2, ISA_MIPS3, ISA_MIPS4, ISA_MIPS64, ISA_X8664, M_ARCH, NULL, option_name, proc, set_cpu(), target_cpu, toggle(), UNDEFINED, and warning.
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 | ( | ) |
Definition at line 1722 of file opt_actions.c.
References ABI_64, buf, cpu_name, error(), f, FALSE, fclose(), fgets(), fopen, get_default_cpu_name(), get_num_after_colon(), get_platform_abi(), NULL, strcmp(), strncmp(), strstr(), and TRUE.
| 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] |
Definition at line 215 of file opt_actions.c.
References n, NULL, result, strchr, strcspn(), strdup, strlen(), strncasecmp(), and TRUE.
Referenced by Process_Default_Group(), Process_Opt_Group(), and Process_Targ_Group().
| 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 | |||
| ) |
Definition at line 1543 of file opt_actions.c.
References asprintf(), check_for_saved_option(), execlp(), exit(), fprintf(), NULL, P_alt_library, P_be, P_gas, P_gcpp, P_library, print_phase_path(), and print_relative_path().
| static int print_magic_path | ( | const char * | base, | |
| const char * | fname | |||
| ) | [static] |
Definition at line 1481 of file opt_actions.c.
References asprintf(), check_for_saved_option(), ends_with(), file_exists(), get_suffix(), NULL, path, puts(), slash, strcmp(), strlen(), strrchr(), and strstr().
Referenced by print_phase_path(), and print_relative_path().
| 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().
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 | ) |
Definition at line 410 of file opt_actions.c.
References add_option_seen(), add_string_option(), atoi(), concat_strings(), debug, default_isa, default_olevel, fprintf(), Get_Group_Option_Value(), i, NULL, s, same_string_prefix, and strlen().
| void Process_fb_cdir | ( | char * | fname | ) |
| void Process_fb_create | ( | char * | fname | ) |
Definition at line 1209 of file opt_actions.c.
References add_option_seen(), add_string_option(), fb_file, instrumentation_invoked, string_copy(), toggle(), and TRUE.
| 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 | ) |
Definition at line 1194 of file opt_actions.c.
References add_option_seen(), add_string_option(), fb_type, profile_type, sprintf(), sscanf(), str, string_copy(), and tmp.
| void Process_fb_xdir | ( | char * | fname | ) |
| void Process_fbexe | ( | char * | fname | ) |
| void Process_fbuse | ( | char * | fname | ) |
Definition at line 1183 of file opt_actions.c.
References add_string(), count_files, drop_path(), FALSE, Get_Binary_Name(), NULL, prof_file, TRUE, and Use_feedback.
Definition at line 984 of file opt_actions.c.
References args, FALSE, NULL, option_name, strcasecmp(), strchr, strncmp(), toggle_inline_normal(), toggle_inline_off(), toggle_inline_on(), and TRUE.
Definition at line 1415 of file opt_actions.c.
References add_option_seen(), debug, fprintf(), option_was_seen(), and set_dsm_default_options().
Referenced by add_special_options().
| void Process_Mp_Group | ( | char * | mp_args | ) |
Definition at line 1329 of file opt_actions.c.
References debug, Disable_old_mp, Disable_open_mp, DSM_OFF, DSM_ON, fprintf(), option_name, parse_error(), reset_dsm_default_options(), set_dsm_default_options(), set_option_unseen(), strncasecmp(), and TRUE.
| void Process_Ofast | ( | char * | ipname | ) |
Definition at line 313 of file opt_actions.c.
References add_option_seen(), add_string_option(), concat_strings(), ftz_crt, Gen_feedback, O3_flag, ofast, toggle(), and TRUE.
| void Process_Opt_Group | ( | char * | opt_args | ) |
Definition at line 370 of file opt_actions.c.
References add_option_seen(), atoi(), Bool_Group_Value(), debug, fprintf(), Get_Group_Option_Value(), instrumentation_invoked, NULL, TRUE, and warning.
Definition at line 969 of file opt_actions.c.
References add_string_option(), option_name, and strncmp().
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 | ) |
Definition at line 461 of file opt_actions.c.
References ABI_64, ABI_N32, ABI_W64, add_option_seen(), add_string_option(), Bool_Group_Value(), buf, debug, error(), FALSE, fprintf(), ftz_crt, Get_Group_Option_Value(), M_ARCH, NULL, set_cpu(), sprintf(), strncasecmp(), target, toggle(), and TRUE.
| void Process_Tenv_Group | ( | char * | opt_args | ) |
Definition at line 1468 of file opt_actions.c.
References debug, fprintf(), set_memory_model(), and strncmp().
Definition at line 976 of file opt_actions.c.
References add_string_option(), option_name, and strncmp().
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 1854 of file opt_actions.c.
References add_toggle_name(), drop_option, get_toggle_name(), NULL, parsing_default_options, strcmp(), TRUE, and warning.
Referenced by Check_Target(), and Process_Targ_Group().
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().
Definition at line 1292 of file opt_actions.c.
References add_option_seen(), DSM_ON, option_was_seen(), reset_dsm_default_options(), and set_option_unseen().
Referenced by add_special_options().
| 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 | |||
| ) |
Definition at line 185 of file opt_actions.c.
References add_toggle_name(), drop_option, get_toggle_name(), is_toggled(), option_name, parsing_default_options, TRUE, UNDEFINED, and warning.
Referenced by add_special_options(), Check_Target(), if(), Process_fb_create(), Process_fb_opt(), Process_Ofast(), Process_Targ_Group(), set_defaults(), write_implicits(), write_opt_action(), and write_option_names().
Definition at line 934 of file opt_actions.c.
References inline_t, TRUE, and UNDEFINED.
Referenced by Process_Inline().
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().
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 | |||
| ) |
| 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().
| boolean dashdash_flag = FALSE |
Definition at line 86 of file opt_actions.c.
Referenced by add_file_args(), add_object(), check_dashdash(), main(), Prepare_Source(), and Process_Command_Line().
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] |
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.
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 |
Definition at line 79 of file opt_actions.c.
Referenced by add_file_args(), add_inline_option(), add_special_options(), post_fe_phase(), run_compiler(), run_phase(), toggle_inline_normal(), toggle_inline_off(), and toggle_inline_on().
| int instrumentation_invoked = UNDEFINED |
Definition at line 97 of file opt_actions.c.
Referenced by add_file_args(), add_instr_archive(), add_special_options(), Process_fb_create(), Process_fb_opt(), Process_Opt_Group(), and run_ld().
int last_toggle_index = 0 [static] |
Definition at line 77 of file opt_actions.c.
Referenced by add_toggle_name(), and get_toggle_name().
| mem_model_t mem_model = M_SMALL |
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 1630 of file opt_actions.c.
| int proc = UNDEFINED |
Definition at line 101 of file opt_actions.c.
Referenced by alarm_(), Check_Target(), Collect_stids_in_unstructured_cflow(), emit_lkcord(), fei_next_func_idx(), ffecom_subscript_check_(), Initialize_Targ_Info(), Intra_PU_Global_Cprop(), main(), SUMMARIZE< program >::Process_procedure(), Propagate_vals_in_unstructured_cflow(), send_procedure(), and Update_annot_with_all_callee_mods().
| int profile_type = 0 |
Definition at line 98 of file opt_actions.c.
Referenced by add_instr_archive(), and Process_fb_type().
| boolean read_stdin = FALSE |
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 |
Definition at line 1658 of file opt_actions.c.
Referenced by add_file_args(), add_final_ld_args(), add_targ_options(), Check_Target(), and print_defaults().
| 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.
Definition at line 88 of file opt_actions.c.
Referenced by add_object(), append_objects_to_list(), check_dashdash(), and init_phase_info().
1.5.6