Commit Graph

73 Commits

Author SHA1 Message Date
Jan Hubicka a8a5f53add common.opt (fprofile-generate,fprofile-use): Add.
* common.opt (fprofile-generate,fprofile-use): Add.
	* gcc.c (LINK_COMMAND_SPEC): Arrange -fprofile-generate to imply -lgcov
	* opts.c (profile_arc_flag_set, flag_profile_values_set,
	flag_unroll_loops_set, flag_tracer_set,
	flag_value_profile_transformations_set,
	flag_peel_loops_set): New static variables.
	(common_handle_option): Deal with -fprofile-generate/-fprofile-use
	* invoke.texi (-fprofile-generate, -fprofile-use): Describe.

From-SVN: r74976
2003-12-23 17:55:33 +00:00
Zack Weinberg dc170a876a common.opt: Remove -fgnu-linker.
* common.opt: Remove -fgnu-linker.
	* flags.h: Remove flag_gnu_linker.
	* opts.c: Don't handle OPT_fgnu_linker.
	* toplev.c: Don't initialize flag_gnu_linker.
	Remove gnu-linker entry from f_options.
	* config/dsp16xx/dsp16xx.h (OPTIMIZATION_OPTIONS):
	Don't reset flag_gnu_linker.
	* config/mips/mips.c (override_options): Likewise.
	* doc/invoke.texi: Remove all mention of -fgnu-linker.

From-SVN: r74117
2003-12-01 18:25:39 +00:00
Richard Henderson c132886e7c ssa.c, [...]: Remove files.
* ssa.c, ssa-dce.c, ssa-ccp.c: Remove files.
        * Makefile.in (OBJS-common, GTFILES): Don't reference them.
        (gtype-desc.o, toplev.o, flow.o): Remove ssa.h.
        (ssa.o, ssa-dce.o, ssa-ccp.o): Remove.
        * flow.c: Don't include ssa.h.
        (set_phi_alternative_reg): Remove.
        (calculate_global_regs_live): Don't call it.
        (mark_used_regs): Don't handle PHI.
        * gengtype.c (open_base_files): Don't reference ssa.h.
        * rtl.def (PHI): Remove.
        * timevar.def (TV_TO_SSA, TV_SSA_CCP, TV_SSA_DCE, TV_FROM_SSA): Kill.
        * common.opt: Remove -fssa, -fssa-ccp, -fssa-dce.
        * opts.c (common_handle_option): Likewise.
        * toplev.c (f_options): Likewise.
        (DFI_ssa, DFI_ssa_ccp, DFI_ssa_dce, DFI_ussa): Remove.
        (dump_file): Update to match.
        (flag_ssa, flag_ssa_ccp, flag_ssa_dce): Remove.
        (rest_of_handle_ssa): Remove.
        (rest_of_compilation): Don't call it.
        * toplev.h (flag_ssa, flag_ssa_dce, flag_ssa_ccp): Remove.
        * doc/invoke.texi: Remove -fssa, -fssa-ccp, -fssa-dce.
        * doc/passes.texi (SSA optimizations): Remove.

        * gcc.dg/20020201-2.c: Remove.
        * gcc.dg/20020201-4.c: Remove.
        * gcc.dg/20020304-1.c: Remove.

From-SVN: r73789
2003-11-20 20:05:08 -08:00
Zdenek Dvorak fca9dc0058 Makefile.in (toplev.o): Add value-prof.h dependency.
* Makefile.in (toplev.o): Add value-prof.h dependency.
	(value-prof.o): Add REGS_H dependency.
	* common.opt (fprofile-values, fvpt): New.
	* flags.h (flag_value_profile_transformations): Declare.
	* opts.c (common_handle_option): Handle -fprofile_values and
	-fvpt.
	* profile.c (branch_prob): Don't remove death notes here.
	* timevar.def (TV_VPT): New.
	* value-prof.c: Include regs.h.
	(insn_divmod_values_to_profile, gen_divmod_fixed_value, gen_mod_pow2,
	gen_mod_subtract, divmod_fixed_value_transform,mod_pow2_value_transform,
	mod_subtract_transform, value_profile_transformations): New.
	(insn_values_to_profile): Call insn_divmod_values_to_profile.
	(find_values_to_profile): Add dumps.
	* value-prof.h (value_profile_transformations): Declare.
	* toplev.c: Include value-prof.h.
	(rest_of_handle_value_profile_transformations): New.
	(enum dump_file_index): Add DFI_vpt.
	(dump_file): Add vpt dump.
	(flag_value_profile_transformations): New.
	(lang_independent_options): Add flag_profile_values and
	flag_value_profile_transformations.
	(rest_of_compilation): Call
	rest_of_handle_value_profile_transformations.
	(process_options): Let -fvpt imply -fprofile-values.
	* doc/invoke.texi (-fvpt): Document.

From-SVN: r72685
2003-10-19 21:37:32 +00:00
Mostafa Hagog f5f2e3cd9b common.opt: Add description of the new -fgcse-las flag.
2003-10-17  Mostafa Hagog  <mustafa@il.ibm.com>

	* common.opt: Add description of the new -fgcse-las flag.
	* flags.h (flag_gcse_las): Declaration of global flag_gcse_las.
	* gcse.c (hash_scan_set): Handle the case of store expression and
	insert the memory expression to the hash table, this way we make it
	possible to discover redundant loads after stores and remove them.
	(pre_insert_copy_insn): moved the call to update_ld_motion_stores,
	to pre_insert_copies, it is not the correct place to call it after
	adding stores to be in the available expression hash table.
	(pre_insert_copies): Added the call to update_ld_motion_stores when
	one or more copies were inserted.
	* opts.c (common_handle_option): Handle the -fgcse-las flag.
	* toplev.c (flag_gcse_las): Initialization of flag_gcse_las.

	* doc/invoke.tex: Document new -fgcse-las flag.

From-SVN: r72612
2003-10-17 16:16:45 +00:00
Jan Hubicka 62551c66fd Makefile.in (web.o): New.
* Makefile.in (web.o): New.
	* web.c: New file.
	* rtl.h (web_main): Declare.
	* timervar.def (TV_WEB): New.
	* toplev.c (dump_file_index, dump_file_info): Add DFI_web.
	(rest_of_hanle_web): New.
	(flag_web): New static variable.
	(lang_independent_options): Add "web".
	(rest_of_compilation): Call rest_of_handle_web.
	* invoke.texi (-fweb): Document.
	* common.opt (fweb): New.
	* flags.h (flag_web): New.
	* opts.c (decode_options): Set flag_web at -O3.

	* passes.texi (web construction):  Document.
	* invoke.texi (-O3): Document that -fweb is enabled.

	* regrename.c (regrename_optimize): Deal better with situation when
	replacement failed.

	* sched-ebb.c: Include params.h and profile.h
	(schedule_ebbs):  Use tracer parameters to discover superblocks
	* Makefile.in (sched-ebb.o):  Add dependencies.

From-SVN: r72383
2003-10-11 22:57:48 +00:00
Dorit Naishlos 569fa502d1 haifa-sched.c (ok_for_early_schedule): New function.
* haifa-sched.c (ok_for_early_schedule): New function.
        (early_queue_to_ready): New function.
        (schedule_block): Allow early removal of insns from Q.
        (schedule_insn): Update INSN_TICK in case of premature
        issue.
        * common.opt (sched_stalled_insns): New flag.
        (sched_stalled_insns_dep): New flag.
        * flags.h: Same above flags.
        * opts.c: Same as above.
        * toplev.c: Same as above.
        * target.h (targetm.sched.is_costly_dependence): New
        hook.
        * target-def.h: Same as above.
        * config/rs6000/rs6000.h: (rs6000_sched_costly_dep):
        Support new flag -msched-costly-dep.
        (DEFAULT_SCHED_COSTLY_DEP): Define.
        * config/rs6000/rs6000.c:
        (rs6000_is_costly_dependence): New function.
        (is_load_insn, is_store_insn): New functions.
        (is_load_insn1, is_store_insn1, is_mem_ref): New
        functions.
        * doc/invoke.texi (-fsched-stalled-insns-dep)
        (-fsched-stalled-insns, -msched-costly-dep): Document
        options.
        * doc/tm.texi (is_costly_dependence): Define new
        scheduler target hook.

From-SVN: r72261
2003-10-09 09:08:37 +00:00
Roger Sayle 039c3d42d5 toplev.c (flag_rounding_math): New global variable.
* toplev.c (flag_rounding_math): New global variable.
	(f_options): Add to the list of language independent options.
	* flags.h (flag_rounding_math): Prototype here.
	(HONOR_SIGN_DEPENDENT_ROUNDING): Use flag_rounding_math instead.
	* common.opt (frounding-math): New common command line option.
	* opts.c (common_handle_option): Handle OPT_frounding_math.
	(set_fast_math_flags): -ffast-math clears flag_rounding_math.

	* doc/invoke.texi: Document this new command line option.

From-SVN: r71032
2003-09-03 20:57:31 +00:00
Neil Booth df38ffef8c common.opt: Add debug switches.
* common.opt: Add debug switches.
	* flags.h (use_gnu_debug_info_extensions): Boolify.
	* opts.c (write_symbols, debug_info_level,
	use_gnu_debug_info_extensions): Move from toplev.c.
	(set_debug_level): New.
	(common_handle_options): Handle debug switches.
	(print_help): Display target options directly.
	* toplev.c (debug_hooks): Don't initialize.
	(write_symbols, debug_info_level,
	use_gnu_debug_info_extensions): Move to opts.c.
	(debug_args, display_help, decode_g_option): Remove.
	(process_options): Set no debug if level zero here,
	and no-debug-hooks.  Error here if impossible debug format selected.
	* toplev.h (display_help, decode_g_option): Remove.
testsuite:
	* lib/gcc-dg.exp: Update for diagnostic change.

From-SVN: r70253
2003-08-08 19:22:44 +00:00
Neil Booth 2cc980567a common.opt: Document --param.
* common.opt:  Document --param.
	* opts.c (columns, undocumented_msg): New.
	(print_help): Get number of columns from environment.  Print
	--param help.  Tweak newline handling.
	(print_param_help): New.
	(print_filtered_help): Better handling of duplicates.  Complain
	about undocumented switches.
	(print_switch): New.
	(wrap_help): Improve wrapping, use COLUMNS.
	* opts.sh: Ignore comments in records.
	* params.def: Fix typos and remove trailing periods.
	* toplev.c (display_help): Don't dump --param help.
	* doc/sourcebuild.texi: Update.
java:
	* lang.opt: Don't show -MD_ and -MDD_.

From-SVN: r69581
2003-07-19 08:13:58 +00:00
Neil Booth f3fdaec48d common.opt: More --help messages.
* common.opt: More --help messages.
	* opts.c (print_help): Use puts().
	* toplev.c (f_options): Remove help text.
	(display_help): Don't dump f_options.

From-SVN: r69217
2003-07-11 05:35:06 +00:00
Neil Booth 28786366d6 toplev.c (warn_dummy, W_options): Die.
* toplev.c (warn_dummy, W_options): Die.
	(display_help): Don't print W_options.
	* common.opt: Add W_options help from toplev.c.

From-SVN: r69125
2003-07-09 05:28:04 +00:00
Neil Booth cf03fd63cd Makefile.in: Update.
* Makefile.in: Update.
	* c-opts.c (c_common_handle_option): opt_text now contains the '-'.
	* c.opt: Update documentation.
	* common.opt: Add some help text.
	* opts.c: Include intl.h.
	(wrap_help, print_help): New.
	(find_opt, handle_option, common_handle_option): opt_text now
	contains the '-'.  Use print_help to output help.
	* opts.h (struct cl_option): New member "help".
	* opts.sh: Update to handle help text output and to prepend
	options with '-'.
	* toplev.c (display_help): Remove some help text.

From-SVN: r69068
2003-07-08 05:25:39 +00:00
Devang Patel 6a08f7b337 final.c (debug_flush_symbol_queue): New function.
* final.c (debug_flush_symbol_queue): New function.
        (debug_queue_symbol): New function.
        (debug_free_queue): New function.
        (debug_nesting): New variable.
        (symbol_queue): New variable.
        (symbol_queue_index): Same.
        (symbol_queue_size): Same.
        * debug.h (debug_flush_symbol_queue): New.
        (debug_queue_symbol): New.
        (debug_free_queue): New.
        (debug_nesting): New.
        (symbol_queue_index): New.
        * dbxout.c (DBXOUT_DECR_NESTING): New macro.
        (DBXOUT_DECR_NESTING_AND_RETURN): New macro.
        (dbxout_init): Delay symbol output.
        (dbxout_global_decl): Save, set and reset TREE_USED bit around dbxout_symbol()
        call.
        (dbxout_begin_function): Same.
        (dbxout_finish): Free symbol queue.
        (dbxout_type): Put appropriate symbols in queue.
        (dbxout_symbol): Put info for symbol's type in queue. Decrement/Increment
        nesting counts flush symbol queue appropriately.
        (dbxout_parms): Increment dbxout nesting.
        (dbxout_reg_parms): Same.
        * flags.h (flag_debug_only_used_symbols): New.
        * toplev.c (flag_debug_only_used_symbols): New variable.
        (lang_independent_options): Add entries for new option -feliminate-unused-debug-symbols.
        * common.opt: Add entry for -feliminate-unused-debug-symbols.
        * opts.c (common_handle_options): Same.
        * config/rs6000/darwin.h (CC1_SPEC): Interpret -gused as -feliminate-unused-debug-symbols.
        * doc/invoke.texi (Debugging Options): Document -feliminate-unused-debug-symbols.

From-SVN: r68556
2003-06-26 20:04:40 -07:00
Neil Booth d302c9d6ce common.opt: Add -finline-limit.
* common.opt: Add -finline-limit.
	* opts.c (common_handle_options): Handle it.
	* opts.sh: Temporary kludge for -finline-limit.
	* toplev.c (decode_f_option, independent_decode_option): Die.
	(parse_options_and_default_flags): No independent_decode_option.

From-SVN: r68348
2003-06-22 20:21:35 +00:00
Neil Booth 6ff3a151fd common.opt: More -f switches.
* common.opt: More -f switches.
	* opts.c (common_handle_options): Handle them.
	* toplev.c (time_report): Make extern.
	(f_options): USe flag_dummy.
	(decode_f_option): No need to use f_options now.
	* toplev.h (flag_cprop_registers, flag_ssa, flag_ssa_ccp,
	flag_ssa_dce, time_report, flag_new_regalloc): Make extern.

From-SVN: r68328
2003-06-22 13:44:40 +00:00
Neil Booth de32c0cb3b Makefile.in: Update.
* Makefile.in: Update.
	* common.opt: New switches.
	* opts.c: Include diagnostic.h.
	(common_handle_option): Handle new switches.
	* toplev.c (flag_loop_optimize, flag_crossjumping, flag_if_conversion,
	flag_if_conversion2, flag_delete_null_pointer_checks,
	flag_rerun_cse_after_loop): Make extern.
	(flag_dummy): New.
	(f_options): Update to use flag_dummy for moved options.
	(decode_f_option): Some switches moved to opts.c.
	* toplev.h (flag_loop_optimize, flag_crossjumping, flag_if_conversion,
	flag_if_conversion2, flag_delete_null_pointer_checks,
	flag_rerun_cse_after_loop, flag_keep_static_consts, flag_peel_loops,
	flag_tracer, flag_thread_jumps, flag_unroll_loops,
	flag_unroll_all_loops, flag_unswitch_loops): New.
f:
	* lang.opt: Add -fpreprocessed.
	* top.c (ffe_handle_option): Handle it.

From-SVN: r68315
2003-06-21 20:28:18 +00:00
Neil Booth 058de654c5 Makefile.in: Update.
* Makefile.in: Update.
	* c-opts.c (c_common_handle_option): Don't return -1.
	* common.opt: New switches.
	* opts.c: Include rtl.h, ggc.h and output.h.
	(find_opt): Only stop searching when input switch compares
	less than the stored switch.  Continue searching if greater.
	(handle_option): No need to handle negative return values.
	(common_handle_option): Handle new switches.
	(set_fast_math_flags, fast_math_flags_set_p): New.
	* toplev.c (set_fast_math_flags, fast_math_flags_set_p):
	Move to opts.c.
	(decode_f_option): Some switches moved to opts.c.
	(parse_options_and_default_flags): No need to cater for negative
	return values.
f:
	* top.c (ffe_handle_option): No need to return -1 any more.

From-SVN: r68307
2003-06-21 15:59:31 +00:00
Neil Booth e01cc6dc62 c-decl.c (store_parm_decls): Make saved_warn_shadow boolean.
* c-decl.c (store_parm_decls): Make saved_warn_shadow boolean.
	* common.opt: Add remaining -W options and -g.
	* diagnostic.c (warnings_are_errors): Remove.
	* flags.h: Make most warning flags boolean.
	* opts.c (common_handle_option): Handle remaining -W options, and -g.
	Move many warning flags from toplev.c, making them boolean.
	* toplev.c: Remove many warning flags.
	(decode_W_option): Remove.
	(decode_g_option): Make extern.  Error on unknown switch.
	(lang_independent_W_options): Use warn_dummy.
	(independent_decode_option): Just handle -f switches now.
	* toplev.h (decode_g_option): New.

From-SVN: r68287
2003-06-20 22:56:36 +00:00
Neil Booth 903caebf49 Makefile.in: Update.
* Makefile.in: Update.
	* common.opt: New options.
	* opts.c (maybe_warn_unused_parameter, set_Wextra, handle_param,
	set_Wunused): New.
	(common_handle_option): Handle new options.
	* toplev.c (set_target_switch): Export.
	(set_Wextra, set_Wunused, maybe_warn_unused_parameter): Move to opts.c.
	(decode_W_option): -Wunused and -Wextra handled in opts.c now.
	(independent_decode_option): More options handled in opts.c now.
	Change prototype.
	* toplev.h (set_target_switch): New.

From-SVN: r68138
2003-06-18 06:00:06 +00:00
Neil Booth 7b086b11df c-opts.c (c_common_handle_option): s/on/value/.
* c-opts.c (c_common_handle_option): s/on/value/.
	(OPT_fabi_version_, OPT_ftabstop_, OPT_ftemplate_depth_): Use value
	directly rather than converting the argument.
	* c.opt: Update docs.  Use UInteger where appropriate.
	* common.opt: Use UInteger where appropriate.
	* opts.c (integral_argument): New.
	(handle_argument): Handle integral arguments, and optional
	joined arguments.
	(common_handle_option): Update.
	* opts.h (CL_MISSING_OK, CL_UINTEGER): New.
	* opts.sh: Handle JoinedOrMissing and UInteger flags.
java:
	* lang.c (java_handle_option): Special-casing of optional
	joined arguments no longer needed.
	* lang.opt: Update switches that take optional argument.

From-SVN: r67999
2003-06-16 05:47:07 +00:00
Neil Booth d185d26881 c-pch.c (asm_file_name): Remove.
* c-pch.c (asm_file_name): Remove.
	* common.opt: Add more switches.
	* flags.h (g_switch_set): Boolify.
	* opts.c (g_switch_value, g_switch_set, exit_after_options,
	version_flag): Move from toplev.c.
	(common_handle_option): Handle more switches from toplev.c.
	* toplev.c (display_help, display_target_options, decode_d_option,
	print_version): Make non-static, remove prototypes.
	(aux_base_name, asm_file_name, aux_info_file_name): Constify.
	(version_flag, g_switch_value, g_switch_set, exit_after_options):
	Remove.
	(independent_decode_option): Move some handlers to opts.c.
	* toplev.h (aux_info_file_name, aux_base_name, asm_file_name,
	exit_after_options, version_flag, display_help, display_target_options,
	print_version, decode_d_option): New.
java:
	* lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.

From-SVN: r67971
2003-06-15 08:30:02 +00:00
Neil Booth d7b4261875 Makefile.in: Update to use common.opt and lang_opt_files.
* Makefile.in: Update to use common.opt and lang_opt_files.
	(c-options.c, c-options.h): Remove.
	(options.c, options.h): Add.
	* c-opts.c: Include options.h not c-options.h.
	* common.opt: New file.
	* configure, configure.in: Add lang_opt_files.
	* opts.c: Include flags.h and diagnostic.h.
	(common_handle_option): New.
	(handle_option): Update to recognize common options and all
	language-dependent options.
	* opts.h (CL_F77, CL_JAVA, CL_ADA, CL_COMMON, CL_TREELANG): New.
	(struct cl_option): Make flags of type int.
	* opts.h: Flag option with front ends to which it applies.
	Handle duplicate options.
	* toplev.c (filename): Remove.
	(independent_decode_option): Don't handle filenames and -quiet.
	(process_options, do_compile): Update.
ada:
	* Make-lang.in: Update to use options.c and options.h.
	* misc.c: Include options.h not aoptions.h.
	(gnat_handle_option): Abort on unrecognized switch.
	(gnat_init_options): Request Ada switches.
cp:
	* Make-lang.in: Remove c-options.o.
f:
	* Make-lang.in: Update to use options.c and options.h.
	* top.c: Include options.h not f-options.h.
	(gnat_handle_option): Abort on unrecognized switch.
	(ffe_init_options): From com.c.  Request F77 options.
	(ffe_handle_options): Abort on unrecognized switch.
	* com.c (ffe_init_options): Move to top.c.
	* top.h (fee_init_options): New.
java:
	* Make-lang.in: Update to use options.c and options.h.
	* lang.c: Include options.h not j-options.h.
	(java_handle_option): Abort on unrecognized option.
	(java_init_options): Request Java switches.
treelang:
	* Make-lang.in: Update to use options.c and options.h.
	* tree1.c: Include options.h not t-options.h.
	(treelang_init_options): New.
	(treelang_handle_option): Abort on unrecognized switch.
	* treetree.c (LANG_HOOKS_INIT_OPTIONS): Override.
	* treetree.h (treelang_init_options): New.

From-SVN: r67941
2003-06-14 12:26:36 +00:00