Commit Graph

244 Commits

Author SHA1 Message Date
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Andrew MacLeod 1916bcb556 flags.h: Don't include flag-types.h or options.h.
2015-07-09  Andrew MacLeod  <amacleod@redhat.com>

	* flags.h: Don't include flag-types.h or options.h.
	* opts-common.c: Adjust includes.
	* opts-global.c: Likewise.
	* common/config/epiphany/epiphany-common.c: Likewise.

c

	* c-array-notation.c: Adjust includes for flags.h changes.
	* c-objc-common.c: Likewise.

c-family

	* c-common.h: Adjust includes for flags.h changes.
	* stub-objc.c: Likewise.
	
fortran

	* arith.c: Adjust includes for flags.h changes.
	* array.c: Likewise.
	* check.c: Likewise.
	* decl.c: Likewise.
	* error.c: Likewise.
	* expr.c: Likewise.
	* frontend-passes.c: Likewise.
	* interface.c: Likewise.
	* intrinsic.c: Likewise.
	* io.c: Likewise.
	* match.c: Likewise.
	* openmp.c: Likewise.
	* parse.c: Likewise.
	* primary.c: Likewise.
	* resolve.c: Likewise.
	* scanner.c: Likewise.
	* simplify.c: Likewise.
	* symbol.c: Likewise.
	* target-memory.c: Likewise.

jit
	* dummy-frontend.c: Adjust includes for flags.h changes.
	* jit-common.h: Likewise.
	* jit-playback.c: Likewise.

lto
	* lto-lang.c: Adjust includes for flags.h changes.

From-SVN: r225608
2015-07-09 11:27:35 +00:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Richard Sandiford 23a5b65a92 Update copyright years in gcc/
From-SVN: r206289
2014-01-02 22:23:26 +00:00
Richard Sandiford d1e082c2c2 Update copyright years in gcc/
From-SVN: r195098
2013-01-10 20:38:27 +00:00
Jakub Jelinek 90d04a445c Update Copyright years for files modified in 2011 and/or 2012.
From-SVN: r194903
2013-01-04 13:49:55 +01:00
Steven Bosscher a27a5de969 invoke.texi: Remove -dv documentation.
gcc/
	* doc/invoke.texi: Remove -dv documentation.  Fix up graph dump related
	documentation.  Document the '-graph' dump option.  Complete the '-slim'
	dump option documentation.

	* common.opt (Variable graph_dump_format): Remove.
	* flag-types.h (enum graph_dump_types): Remove.
	* flags.h (dump_for_graph): Remove.
	* opts.c (decode_d_option): Remove -dv handling.
	* sched-int.h (print_insn, print_pattern, print_value): Move prototypes
	from here ...
	* rtl.h: ...to here.  Add note that these functions ought to be in
	another file.
	* sched-vis.c (print_insn): Add detailed dump for insn notes.
	* print-rtl.c (dump_for_graph): Remove.
	(print_rtx): Remove dump_for_graph related code.
	* graph.c: Almost complete re-write to dump DOT (GraphViz) dumps
	instead of VCG dumps.
	* graph.h (print_rtl_graph_with_bb): Update prototype.
	* passes.c (finish_optimization_passes): Fix profile dump finishing.
	Unconditionally loop over graph dumps to finalize.
	(execute_function_dump): Split code to dump graphs to separate block.
	(execute_one_pass): Don't set TDF_GRAPH here, let the dump option
	decoders do their job.

	* ddg.c (vcg_print_ddg): Make it a DEBUG_FUNCTION.
	* toplev.c: Don't include graph.h.
	* tree-optimize.c: Don't include graph.h.

testsuite/
	* testsuite/gcc.dg/20050811-1.c: Change -dv option to -graph option
	to -fdump-rtl-all.
	* testsuite/gcc.dg/pr37858.c: Remove -dv option.

From-SVN: r193821
2012-11-26 16:47:58 +00:00
Manuel López-Ibáñez 65d4f2cd2a re PR c/53063 (encode group options in the .opt files)
2012-10-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	PR c/53063
	PR c/40989
gcc/
	* optc-gen.awk: Handle new form of LangEnabledBy.
	* opts.c (set_Wstrict_aliasing): Declare here. Make static.
	* common.opt (Wstrict-aliasing=,Wstrict-overflow=): Do not use Init.
	* doc/options.texi (LangEnabledBy): Document new form.
	* flags.h (set_Wstrict_aliasing): Do not declare.
c-family/
	* c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
	* c-opts.c (c_common_handle_option): Do not set them here. Add
	comment.
	(c_common_post_options): Likewise.
testsuite/
	* gcc.dg/Wstrict-overflow-24.c: New.

From-SVN: r192502
2012-10-16 15:31:46 +00:00
Steven Bosscher 89ca6d794e flags.h (TYPE_OVERFLOW_WRAPS, [...]): Move to tree.h.
* flags.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED,
	TYPE_OVERFLOW_TRAPS, POINTER_TYPE_OVERFLOW_UNDEFINED): Move to tree.h.
	* tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED,
	TYPE_OVERFLOW_TRAPS, POINTER_TYPE_OVERFLOW_UNDEFINED): New home.

From-SVN: r189520
2012-07-16 11:42:47 +00:00
Steven Bosscher 79bdca32d4 alias.h: Do not include coretypes.h in header files.
gcc/
	* alias.h: Do not include coretypes.h in header files.
	* cppbuiltin.h: Likewise.
	* double-int.h: Likewise.
	* gimple-fold.h: Likewise.
	* flags.h: Likewise.
	* tree-ssa-alias.h: Likewise.
	* gengtype.h (obstack_chunk_alloc, obstack_chunk_free,
	OBSTACK_CHUNK_SIZE): Define here to avoid dependency on coretypes.h.
	* Makefile.in (RTL_BASE_H): Depend on coretypes.h.
	(TREE_H): Likewise.
	(ALIAS_H): Do not depend on coretypes.h.
	(FLAGS_H): Likewise.
	(realmpfr.o): Depend on coretypes.h.

java/
	* verify.h: Do not include system.h and coretypes.h here.
	* verify-impl.c: Include them here instead.

From-SVN: r189358
2012-07-08 09:57:36 +00:00
Manuel López-Ibáñez 0c3641b0ea flags.h (flag_permissive): Do not declare.
2012-05-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>

gcc/
	* flags.h (flag_permissive): Do not declare.
	* diagnostic.c (diagnostic_report_diagnostic): Handle fpermissive
	option specially.
	* toplev.c (flag_permissive): Do not define.
	* c-tree.h (system_header_p): Delete unused.
c-family/
	* c.opt (fpermissive): Add Var(flag_permissive).

From-SVN: r187123
2012-05-03 22:28:21 +00:00
Iain Sandoe fea3ca9130 shift flag_next/gnu_runtime to modern opts system.
gcc:

	* doc/tm.texi.in (NEXT_OBJC_RUNTIME): Update macro description.
	* doc/tm.texi: Regenerate.
	* flags.h (flag_next_runtime): Remove references.
	* toplev.c: Likewise.
	* defaults.h (NEXT_OBJC_RUNTIME): Provide default.
	* gccspec.c (lang_specific_driver): Adjust use of NEXT_OBJC_RUNTIME.
	* config/darwin.c (darwin_override_options): Provide default
	Objective-C abi settings and target conflict checks.
	* config/darwin.h (SUBTARGET_C_COMMON_OVERRIDE_OPTIONS): Remove unused
	code. Adjust indenting.

gcc/c-family:

	* c.opt (fgnu-runtime): Provide full description.
	(fnext-runtime): Likewise.
	* c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.

From-SVN: r181837
2011-11-30 10:42:58 +00:00
Joseph Myers a7d0d30f0b common.opt (in_lto_p): New Variable entry.
* common.opt (in_lto_p): New Variable entry.
	* flags.h (in_lto_p): Move to common.opt.
	* gcc.c: Include params.h.
	(set_option_handlers): Also use common_handle_option and
	target_handle_option.
	(main): Call global_init_params, finish_params and
	init_options_struct.
	* opts.c (debug_type_names): Move from toplev.c.
	(print_filtered_help): Access quiet_flag through opts pointer.
	(common_handle_option): Return early in the driver for some
	options.  Access in_lto_p, dwarf_version and
	warn_maybe_uninitialized through opts pointer.
	* toplev.c (in_lto_p): Move to common.opt.
	(debug_type_names): Move to opts.c.
	* Makefile.in (OBJS): Remove opts.o.
	(OBJS-libcommon-target): Add opts.o.
	(gcc.o): Update dependencies.

From-SVN: r175591
2011-06-28 18:00:59 +01:00
Joseph Myers 5e471ea65b common.opt (flag_stack_check): New Variable entry.
* common.opt (flag_stack_check): New Variable entry.
	(fcompare-debug-second): Use Var.
	* flags.h (flag_compare_debug, flag_stack_check): Remove.
	* opts.c (flag_compare_debug): Remove.
	(common_handle_option): Don't handle OPT_fcompare_debug_second.
	Set opts->x_flag_stack_check for OPT_fstack_check_.
	* toplev.c (flag_stack_check): Remove.

ada:
	* gcc-interface/misc.c (flag_compare_debug, flag_stack_check):
	Undefine as macros then define as variables.
	(gnat_post_options): Set variables from global_options.

From-SVN: r167331
2010-12-01 13:58:52 +00:00
Joseph Myers 299404a1ec common.opt (initial_max_fld_align, [...]): New Variable entries.
* common.opt (initial_max_fld_align, flag_debug_asm,
	flag_dump_rtl_in_asm, flag_dump_all_passed, rtl_dump_and_exit,
	flag_print_asm_name, graph_dump_format, help_printed,
	help_columns, flag_opts_finished): New Variable entries.
	(fdbg-cnt-list, fdbg-cnt=, fdebug-prefix-map=, frandom-seed,
	frandom-seed=): Mark deferred.
	(fsched-verbose=): Use UInteger and Var.
	* flags.h (set_struct_debug_option, flag_print_asm_name,
	rtl_dump_and_exit, flag_debug_asm, flag_dump_rtl_in_asm,
	graph_dump_format): Don't declare here.
	* haifa-sched.c (sched_verbose_param, fix_sched_param): Remove.
	* opts-global.c: Include dbgcnt.h and debug.h.
	(decode_options): Pass location to finish_options.
	(handle_common_deferred_options): Check flag_dump_all_passed.
	Handle OPT_fdbg_cnt_, OPT_fdbg_cnt_list, OPT_fdebug_prefix_map_,
	OPT_frandom_seed and OPT_frandom_seed_.  Don't assert on
	OPT_fstack_limit.
	* opts.c: Don't include toplev.h, dbgcnt.h or debug.h.
	(set_struct_debug_option): Add location_t parameter.  Update
	recursive call.  Use error_at.
	(default_options_optimization): Use error_at.
	(finish_options): Add location_t parameter.  Use
	opts->x_flag_opts_finished instead of first_time_p.  Use
	opts->x_optimize instead of optimize.  Use error_at.  Pass
	location to inform.
	(print_filtered_help): Use opts->x_help_printed to track what
	options have been printed.
	(print_specific_help): Use opts->x_help_columns to track number of
	columns.
	(common_handle_option): Pass locations and gcc_options pointers to
	more functions.  Use warning_at instead of fnotice and warning.
	Don't handle OPT_fdbg_cnt_, OPT_fdbg_cnt_list or
	OPT_fdebug_prefix_map_.  Use error_at.  Set
	opts->x_initial_max_fld_align; don't set maximum_field_alignment.
	Don't handle OPT_frandom_seed or OPT_frandom_seed_.  Don't handle
	OPT_fsched_verbose_.
	(handle_param): Add location_r parameter.  Use error_at.
	(set_debug_level): Add location_r parameter.  Use error_at and
	warning_at.
	(setup_core_dumping): Add diagnostic_context parameter.
	(decode_d_option): Add gcc_options, location_t and
	diagnostic_context parameters and use them instead of global
	state.  Use warning_at.
	(enable_warning_as_error): Use error_at.
	* opts.h (finish_options): Update prototype.
	(set_struct_debug_option): Declare here.
	* rtl.h (fix_sched_param): Remove.
	* stor-layout.c (initial_max_fld_align): Remove.
	* toplev.c (rtl_dump_and_exit, flag_print_asm_name,
	graph_dump_format, flag_debug_asm, flag_dump_rtl_in_asm): Remove.
	(process_options): Set maximum_field_alignment.
	* tree.h (initial_max_fld_align) Don't declare here.
	* Makefile.in (opts.o, opts-global.o): Update dependencies.

c-family:
	* c-opts.c (c_common_handle_option): Pass location to
	set_struct_debug_option.

testsuite:
	* gcc.dg/opts-5.c: New test.

From-SVN: r167106
2010-11-24 00:54:26 +00:00
Joseph Myers c98cd5bff6 flag-types.h (struct visibility_flags): Don't declare here.
* flag-types.h (struct visibility_flags): Don't declare here.
	* flags.h (strip_off_ending, fast_math_flags_set_p,
	fast_math_flags_struct_set_p): Declare here.
	(visibility_options): Don't declare here.
	* opts-common.c (option_enabled, get_option_state): Move from
	opts.c.
	* opts-global.c: Include diagnostic.h instead of
	diagnostic-core.h.  Include tree.h, langhooks.h, lto-streamer.h
	and toplev.h.
	(const_char_p, ignored_options, in_fnames, num_in_fnames,
	write_langs, complain_wrong_lang, postpone_unknown_option_warning,
	print_ignored_options, unknown_option_callback,
	post_handling_callback, lang_handle_option, add_input_filename,
	read_cmdline_options, initial_lang_mask, init_options_once,
	decode_cmdline_options_to_array_default_mask,
	set_default_handlers, decode_options): Move from opts.c.
	(print_ignored_options): Use warning_at instead of saving and
	restoring input_location.
	* opts.c: Include <signal.h> and <sys/resource.h>.  Include rtl.h
	instead of expr.h.  Don't include langhooks.h, except.h or
	lto-streamer.h.  Add more comments on includes.
	(strip_off_ending, setup_core_dumping, decode_d_option): Move from
	toplev.c.
	(visibility_options): Move to c-family/c-common.c.
	(const_char_p, ignored_options, in_fnames, num_in_fnames,
	write_langs, complain_wrong_lang, postpone_unknown_option_warning,
	print_ignored_options, unknown_option_callback,
	post_handling_callback, lang_handle_option, add_input_filename,
	read_cmdline_options, initial_lang_mask, init_options_once,
	decode_cmdline_options_to_array_default_mask,
	set_default_handlers, decode_options): Move to opts-global.c.
	(target_handle_option, default_options_optimization,
	finish_options, common_handle_option): Remove static.
	(option_enabled, get_option_state): Move to opts-common.c.
	* opts.h (common_handle_option, target_handle_option,
	finish_options, default_options_optimization): Declare.
	* toplev.c: Don't include <signal.h> or <sys/resource.h>.
	(setup_core_dumping, strip_off_ending, decode_d_option): Move to
	opts.c.
	* toplev.h (strip_off_ending, decode_d_option,
	fast_math_flags_set_p, fast_math_flags_struct_set_p): Don't
	declare here.
	* Makefile.in (opts.o, opts-global.o): Update dependencies.

c-family:
	* c-common.c (visibility_options): Move from ../opts.c.
	* c-common.h (struct visibility_flags, visibility_options):
	Declare here.
	* c-opts.c (finish_options): Rename to c_finish_options.
	(c_common_init): Update call to finish_options.

From-SVN: r167105
2010-11-24 00:51:48 +00:00
Joseph Myers 0576d21f39 common.opt (exit_after_options, [...]): New Variable entries.
* common.opt (exit_after_options, write_symbols, debug_info_level,
	use_gnu_debug_info_extensions): New Variable entries.
	(fprofile-dir=): Use Var.
	* flag-types.h (enum debug_info_level): Rename to enum
	debug_info_levels.
	* flags.h (write_symbols, debug_info_level,
	use_gnu_debug_info_extensions): Remove declarations.
	* opts.c (exit_after_options, write_symbols, debug_info_level):
	Remove.
	(set_struct_debug_option): Make static variables const.
	(use_gnu_debug_info_extensions): Remove.
	(set_debug_level, print_filtered_help, print_specific_help,
	fast_math_flags_set_p): Take gcc_options parameters and use them
	in place of global variables.
	(print_filtered_help): Make new_help non-static.
	(print_specific_help): Update call to print_filtered_help.
	(common_handle_option): Update calls to print_specific_help.  Use
	gcc_options structure for more settings.  Make --help table
	const.  Don't handle OPT_fprofile_dir_ here.  Update calls to
	set_debug_level.
	* toplev.c (profile_data_prefix): Remove.
	* toplev.h (profile_data_prefix, exit_after_options): Remove
	declarations.
	(fast_math_flags_set_p): Update prototype.
	* cppbuiltin.c (define_builtin_macros_for_compilation_flags):
	Update call to fast_math_flags_set_p.

objc:
	* objc-act.c (write_symbols): Don't declare here.

From-SVN: r167064
2010-11-22 23:59:18 +00:00
Joseph Myers 69ccdddbb8 common.opt (debug_struct_ordinary, [...]): New Variable entries.
* common.opt (debug_struct_ordinary, debug_struct_generic): New
	Variable entries.
	* dwarf2out.c (matches_main_base, dump_struct_debug, DUMP_GSTRUCT,
	should_emit_struct_debug): Move from opts.c.
	* flag-types.h (enum debug_struct_file): Move from opts.c.
	* flags.h (should_emit_struct_debug): Remove.
	(base_of_path): Declare.
	(set_struct_debug_option): Add gcc_options parameter.
	* optc-gen.awk, opth-gen.awk: Handle array variables.
	* opts.c (enum debug_struct_file, debug_struct_ordinary,
	debug_struct_generic): Remove.
	(set_struct_debug_option): Add gcc_options parameter.
	(base_of_path): Remove static.
	(main_input_basename, main_input_baselength, matches_main_base,
	dump_struct_debug, DUMP_GSTRUCT, should_emit_struct_debug):
	Remove.
	* toplev.c (main_input_basename, main_input_baselength): Define
	here.
	* toplev.h (main_input_basename, main_input_baselength): Declare
	here.

c-family:
	* c-opts.c (c_common_handle_option): Update calls to
	set_struct_debug_option.

From-SVN: r166944
2010-11-19 13:30:38 +00:00
Joseph Myers 6a1f6c9c86 common.opt (flag_instrument_functions_exclude_functions, [...]): New Variable definitions.
* common.opt (flag_instrument_functions_exclude_functions,
	flag_instrument_functions_exclude_files): New Variable
	definitions.
	* flags.h (flag_instrument_functions_exclude_p): Don't declare.
	* gimplify.c (char_p): Declare type and vectors.
	(flag_instrument_functions_exclude_p): Moved from opts.c.  Make
	static.
	* opts.c (flag_instrument_functions_exclude_functions,
	flag_instrument_functions_exclude_files): Remove.
	(add_comma_separated_to_vector): Take void **.
	(flag_instrument_functions_exclude_p): Move to gimplify.c.
	(common_handle_option): Use options structure for
	-finstrument-functions-exclude- options.

From-SVN: r166943
2010-11-19 13:27:18 +00:00
Joseph Myers d547878398 common.opt (flag_excess_precision_cmdline, [...]): New Variable declarations.
* common.opt (flag_excess_precision_cmdline, flag_generate_lto,
	warn_larger_than, larger_than_size, warn_frame_larger_than,
	frame_larger_than_size, flag_gen_aux_info, flag_shlib,
	default_visibility, flag_tls_default): New Variable declarations.
	(aux-info, auxbase, dumpbase, dumpdir, falign-functions=,
	falign-jumps=, falign-labels=, falign-loops=, o, v): Use Var.
	(v): Declare as Common and document here.
	* flags.h (default_visibility, flag_generate_lto,
	warn_larger_than, larger_than_size, warn_frame_larger_than,
	frame_larger_than_size, flag_gen_aux_info, flag_pedantic_errors,
	flag_shlib, flag_excess_precision_cmdline): Remove.
	(set_Wstrict_aliasing): Update prototype.
	* gcc.c (verbose_flag): Remove.
	(driver_handle_option): Add diagnostic_context parameter.  Don't
	handle OPT_v explicitly here.  Set verbose_flag to 1 rather than
	incrementing it.
	* opts-common.c (handle_option): Pass dc to handler.
	* opts.c (warn_larger_than, larger_than_size,
	warn_frame_larger_than, frame_larger_than_size,
	default_visibility): Remove.
	(common_handle_option): Add diagnostic_context parameter.
	(set_fast_math_flags, set_unsafe_math_optimizations_flags): Add
	gcc_options parameters.
	(lang_handle_option, target_handle_option, read_cmdline_options,
	decode_options): Add diagnostic_context parameters.
	(finish_options): Access option state through opts pointer where
	possible.
	(common_handle_option): Access option state through opts pointer
	where possible.  Do not set local static variable verbose.  Do not
	explicitly handle OPT_v, OPT_Wstrict_aliasing_,
	OPT_Wstrict_overflow_, OPT_Wunused, OPT_auxbase, OPT_dumpbase,
	OPT_dumpdir, OPT_falign_functions_, OPT_falign_jumps_,
	OPT_falign_labels_, OPT_falign_loops_, OPT_fira_verbose_, OPT_o or
	OPT_fwhopr_.  Do not explicitly set .opt file variables for
	OPT_aux_info or OPT_pedantic_errors.  Use dc for diagnostic
	context.
	(set_Wstrict_aliasing): Add gcc_options parameter.
	* opts.h (struct cl_option_handler_func): Add diagnostic_context
	parameter to handler.
	(decode_options): Add diagnostic_context parameter.
	* toplev.c (dump_base_name, dump_dir_name, aux_base_name,
	asm_file_name, flag_generate_lto, flag_gen_aux_info,
	aux_info_file_name, flag_shlib, flag_tls_default,
	flag_excess_precision_cmdline, flag_pedantic_errors): Remove.
	(toplev_main): Pass global_dc to decode_options.
	* toplev.h (dump_base_name, dump_dir_name, aux_base_name,
	aux_info_file_name, asm_file_name): Remove.
	* tree.h (flag_tls_default): Remove.

c-family:
	* c-common.c (parse_optimize_options): Pass global_dc to
	decode_options.
	* c-opts.c (c_common_handle_option): Pass &global_options to
	set_Wstrict_aliasing.
	* c.opt (v): Don't mark Common or document here.

fortran:
	* cpp.c (asm_file_name): Don't declare here.

objc:
	* objc-act.c (dump_base_name): Don't declare here.

From-SVN: r166565
2010-11-10 22:35:13 +00:00
Joseph Myers f938f60cb6 flag-types.h: New.
* flag-types.h: New.
	* Makefile.in (TH_H): Include $(OPTIONS_H) instead of $(FLAGS_H).
	(FLAGS_H): Include flag-types.h.  Include $(OPTIONS_H) instead of
	options.h.
	(OPTIONS_H): Define.
	(c-family/c-opts.o, lto-opts.o, opts.o): Use $(OPTIONS_H) instead
	of options.h.
	* configure.ac (tm_include_list): Include options.h not flags.h.
	* configure: Regenerate.
	* flags.h: Include flag-types.h.  Include options.h at top of file
	again.
	(enum debug_info_type, enum debug_info_level, enum
	debug_info_usage, enum symbol_visibility, struct visibility_flags,
	enum ira_algorithm, enum ira_region, enum excess_precision, enum
	graph_dump_types, enum stack_check_type, enum
	warn_strict_overflow_code): Move to flag-types.h
	* opth-gen.awk: Include flag-types.h in options.h.

ada:
	* gcc-interface/Make-lang.in (ada/misc.o): Use $(OPTIONS_H)
	instead of options.h.

java:
	* Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
	options.h.

From-SVN: r165362
2010-10-12 12:25:16 +01:00
Joseph Myers a75bfaa6cd Makefile.in (TM_H): Include $(FLAGS_H) instead of options.h.
* Makefile.in (TM_H): Include $(FLAGS_H) instead of options.h.
	(TREE_H): Include $(FLAGS_H) instead of options.h.
	(opts-common.o): Depend on $(FLAGS_H) instead of options.h.
	* c-objc-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
	* common.opt (flag_complex_method, flag_evaluation_order,
	flag_ira_algorithm, flag_ira_region, flag_warn_unused_result): New
	Variable declarations.
	* configure.ac (tm_include_list): Include flags.h instead of
	options.h.
	* configure: Regenerate.
	* flags.h: Condition out contents for target libraries.  Include
	options.h at end of file.
	(flag_complex_method, flag_ira_algorithm, flag_ira_region,
	flag_evaluation_order, flag_warn_unused_result): Remove.
	* gcc.c (main): Intialize global_options with global_options_init.
	* langhooks-def.h (lhd_init_options_struct): Declare.
	(LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
	(LANG_HOOKS_INITIALIZER): Include LANG_HOOKS_INIT_OPTIONS_STRUCT.
	* langhooks.c (lhd_init_options_struct): New.
	* langhooks.h (struct lang_hooks): Add init_options_struct.
	Update comment on init_options.
	* optc-gen.awk: Generate initializer for global_options_init, not
	global_options.
	* opth-gen.awk: Condition out structure declarations for target
	libraries.  Declare global_options_init.
	* opts-common.c: Include flags.h instead of options.h.
	* opts.c (flag_warn_unused_result): Remove.
	(read_cmdline_options): Take gcc_options parameters.  Pass them to
	read_cmdline_option.
	(initial_lang_mask, initial_min_crossjump_insns,
	initial_max_fields_for_field_sensitive,
	initial_loop_invariant_max_bbs_in_loop): Define at file scope.
	(init_options_once): New.  Split out of decode_options.
	(init_options_struct): New.  Split out of decode_options.
	(decode_cmdline_options_to_array_default_mask): New.
	(default_options_optimization): New.  Split out of decode_options.
	(decode_options): Move most code to other functions.  Update call
	to read_cmdline_options.
	(finish_options): New.  Split out of decode_options.
	* opts.h (decode_options): Add gcc_options parameters.
	(init_options_once, init_options_struct,
	decode_cmdline_options_to_array_default_mask): New.
	* toplev.c (flag_complex_method, flag_ira_algorithm,
	flag_ira_region, flag_evaluation_order): Remove.
	(general_init): Use global_options_init for initial flag values
	for global_dc.
	(toplev_main): Call init_options_once, init_options_struct,
	lang_hooks.init_options_struct,
	decode_cmdline_options_to_array_default_mask and
	lang_hooks.init_option before decode_options.  Update arguments to
	decode_options.
	* tree.h: Include flags.h instead of options.h.

ada:
	* gcc-interface/misc.c (gnat_init_options_struct): New.  Split out
	from gnat_init_options.
	(LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.

c-family:
	* c-common.c (parse_optimize_options): Call
	decode_cmdline_options_to_array_default_mask before
	decode_options.  Update arguments to decode_options.
	* c-common.h (c_common_init_options_struct): Declare.
	* c-opts.c (c_common_init_options_struct): New.  Split out from
	c_common_init_options.

cp:
	* cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.

fortran:
	* f95-lang.c (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
	* gfortran.h (gfc_init_options_struct): Declare.
	* options.c (gfc_init_options_struct): New.  Split out from
	gfc_init_options.

java:
	* lang.c (java_init_options_struct): New.  Split out from
	java_init_options.
	(LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.

lto:
	* lto-lang.c (lto_init_options): Change to
	lto_init_options_struct.  Update parameters.
	(LANG_HOOKS_INIT_OPTIONS): Don't define.
	(LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.

From-SVN: r165189
2010-10-08 16:17:32 +01:00
Joseph Myers fa37ed29b9 flags.h (g_switch_value, [...]): Remove.
* flags.h (g_switch_value, g_switch_set): Remove.
	* opts.c (g_switch_value, g_switch_set): Remove.
	* config/g.opt (G): Add Var(g_switch_value).
	* config/alpha/alpha.c (alpha_handle_option): Don't handle -G
	here.
	(alpha_option_override): Check global_options_set.x_g_switch_value
	instead of g_switch_set.
	(alpha_in_small_data_p): Remove cast in comparison with
	g_switch_value.
	* config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Cast
	g_switch_value to unsigned HOST_WIDE_INT.
	* config/frv/frv.c (frv_const_unspec_p): Remove cast in comparison
	with g_switch_value.
	(frv_handle_option): Don't handle -G here.
	(frv_option_override): Check global_options_set.x_g_switch_value
	instead of g_switch_set.  Don't modify g_switch_set.
	(frv_in_small_data_p): Remove cast in comparison with
	g_switch_value.
	* config/frv/frv.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Cast
	g_switch_value to unsigned HOST_WIDE_INT.
	* config/ia64/ia64.c (ia64_handle_option): Don't handle -G here.
	(ia64_option_override): Check global_options_set.x_g_switch_value
	instead of g_switch_set.
	* config/lm32/lm32.c (lm32_handle_option, TARGET_HANDLE_OPTION):
	Remove.
	(lm32_in_small_data_p): Remove cast in comparison with
	g_switch_value.
	* config/lm32/lm32.h (ASM_OUTPUT_ALIGNED_LOCAL,
	ASM_OUTPUT_ALIGNED_COMMON): Cast g_switch_value to unsigned
	HOST_WIDE_INT.
	* config/m32r/m32r.c (m32r_handle_option): Don't handle -G here.
	(m32r_init): Check global_options_set.x_g_switch_value instead of
	g_switch_set.
	(m32r_in_small_data_p): Remove cast in comparison with
	g_switch_value.
	(m32r_file_start): Format g_switch_value with %d.
	* config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_COMMON,
	ASM_OUTPUT_ALIGNED_BSS): Cast g_switch_value to unsigned
	HOST_WIDE_INT.
	* config/microblaze/microblaze.c (microblaze_handle_option): Don't
	handle -G here.
	(microblaze_option_override): Check
	global_options_set.x_g_switch_value instead of g_switch_set.
	* config/mips/mips.c (mips_handle_option): Don't handle -G here.
	(mips_option_override): Check global_options_set.x_g_switch_value
	instead of g_switch_set.
	* config/rs6000/rs6000.c (rs6000_handle_option): Don't handle -G
	here.
	(rs6000_file_start): Format g_switch_value with %d.
	(small_data_operand, rs6000_elf_in_small_data_p): Remove casts in
	comparisons with g_switch_value.
	* config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Check
	global_options_set.x_g_switch_value instead of g_switch_set.
	* config/rs6000/vxworks.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Check
	global_options_set.x_g_switch_value instead of g_switch_set.
	* config/score/score.c (score_handle_option): Don't handle -G
	here.
	* config/score/score3.c (score3_option_override): Check
	global_options_set.x_g_switch_value instead of g_switch_set.
	* config/score/score7.c (score7_option_override): Check
	global_options_set.x_g_switch_value instead of g_switch_set.

From-SVN: r164960
2010-10-04 21:48:39 +01:00
Joseph Myers d4d24ba450 optc-gen.awk: Define global_options_set.
* optc-gen.awk: Define global_options_set.  Don't define
	target_flags_explicit.
	* opth-gen.awk: Declare global_options_set.  Define
	target_flags_explicit as macro.
	* opts-common.c (handle_option): Take opts_set and generated_p
	parameters.
	(handle_generated_option, read_cmdline_option, set_option): Take
	opts_set parameter.
	(set_option): Use opts_set instead of hardcoding target_flags and
	target_flags_explicit.
	* opts.c (sel_sched_switch_set, profile_arc_flag_set,
	flag_profile_values_set, flag_unroll_loops_set, flag_tracer_set,
	flag_value_profile_transformations_set, flag_peel_loops_set,
	flag_branch_probabilities_set, flag_inline_functions_set,
	flag_ipa_cp_set, flag_ipa_cp_clone_set,
	flag_predictive_commoning_set, flag_unswitch_loops_set,
	flag_gcse_after_reload_set): Remove.
	(common_handle_option, lang_handle_option, target_handle_option):
	Take opts_set parameter.  Assert that it is &global_options_set.
	(common_handle_option): Don't set _set variables.  Check opts_set
	instead of such variables.
	(enable_warning_as_error): Pass &global_options_set to
	handle_generated_option.
	* opts.h (cl_option_handler_func.handler, set_option,
	handle_option, handle_generated_option, read_cmdline_option): Add
	opts_set parameters.
	(handle_option): Add generated_p parameter.
	* config/i386/i386.c (ix86_function_specific_save,
	ix86_function_specific_restore): Updat for renaming of
	target_flags_explicit field.
	* config/i386/i386.opt (target_flags_explicit): Rename to
	ix86_target_flags_explicit.
	* config/ia64/ia64.c (ia64_override_options_after_change): Check
	global_options_set.x_flag_selective_scheduling and
	global_options_set.x_flag_selective_scheduling2, not
	sel_sched_switch_set.
	* flags.h (sel_sched_switch_set,
	flag_speculative_prefetching_set): Remove.
	* gcc.c (driver_handle_option): Take opts_set parameter.  Assert
	that it is &global_options_set.
	(process_command): Pass &global_options_set to
	read_cmdline_option.
	* lto-opts.c (lto_reissue_options): Pass &global_options_set to
	set_option.
	* toplev.c (target_flags_explicit): Remove.

c-family:
	* c-opts.c (c_common_handle_option): Pass &global_options_set to
	handle_generated_option.

From-SVN: r164932
2010-10-04 12:51:00 +01:00
Joseph Myers 46625112d2 opt-functions.awk (static_var): Update comment.
* opt-functions.awk (static_var): Update comment.
	(var_ref): Return offsetof expression or -1, not variable address.
	* optc-gen.awk: Generate structure field initializers instead of
	static variables.  Expect -1 for missing variables instead of null
	pointer.  Add gcc_options parameters to generated functions.
	* opth-gen.awk: Generate structure fields for static variables.
	Add gcc_options parameters to generated functions.
	* common.opt (optimize, optimize_size): Add variables.
	* config/i386/i386-c.c (ix86_pragma_target_parse): Pass
	&global_options to cl_target_option_restore.
	* config/i386/i386.c (ix86_valid_target_attribute_p): Pass
	&global_options to cl_optimization_restore, cl_target_option_save
	and cl_target_option_restore.
	(ix86_set_current_function): Pass &global_options to
	cl_target_option_restore.
	* config/pdp11/pdp11.h (optimize): Remove.
	* config/rs6000/rs6000.h (optimize): Remove.
	* config/sh/sh.h (optimize): Remove.
	* config/xtensa/xtensa.h (optimize): Remove.
	* coretypes.h (struct gcc_options): Declare.
	* diagnostic.c (diagnostic_initialize): Initialize
	context->option_state.
	(diagnostic_report_diagnostic): Pass option_state to
	option_enabled hook.
	* diagnostic.h (diagnostic_context.option_enabled): Add void *
	parameter.
	(diagnostic_context.option_state): New field.
	* final.c (final_start_function, final, final_scan_insn): Rename
	optimize parameter to optimize_p.
	* flags.h (optimize, optimize_size): Remove.
	* function.c (invoke_set_current_function_hook): Pass
	&global_options to cl_optimization_restore.
	* gcc.c (driver_handle_option): Take gcc_options parameter.
	Assert that it is &global_options.
	(process_command): Pass &global_options to read_cmdline_option.
	* ipa-pure-const.c (suggest_attribute): Pass &global_options to
	option_enabled.
	* lto-opts.c (lto_reissue_options): Use option_flag_var.  Pass
	&global_options to set_option.
	* opts-common.c (handle_option, handle_generated_option,
	read_cmdline_option, set_option): Take explicit gcc_options
	parameters.  Use option_flag_var.
	(option_flag_var): New.
	* opts.c (common_handle_option, lang_handle_option,
	target_handle_option): Take gcc_options parameter.  Assert that it
	is &global_options.
	(read_cmdline_options): Pass &global_options to
	read_cmdline_option.
	(print_filtered_help): Use option_flag_var.  Pass &global_options
	to option_enabled.
	(common_handle_option): Use option_flag_var.
	(option_enabled): Take opts parameter.  Use option_flag_var.
	(get_option_state): Take gcc_options parameter.  Use
	option_flag_var.  Pass gcc_options parameter to option_enabled.
	(enable_warning_as_error): Pass &global_options to
	handle_generated_option.
	* opts.h (struct cl_option): Change flag_var to flag_var_offset.
	(cl_option_handler_func.handler): Take gcc_options parameter.
	(option_enabled, get_option_state, set_option, handle_option,
	handle_generated_option, read_cmdline_option): Take gcc_options
	parameters.
	* toplev.c (optimize, optimize_size): Remove.
	(print_switch_values): Pass &global_options to option_enabled.
	(option_affects_pch_p): Use option_flag_var.  Pass &global_options
	to get_option_state.
	(general_init): Initialize global_dc->option_state.
	* tree.c (build_optimization_node): Pass &global_options to
	cl_optimization_save.
	(build_target_option_node): Pass &global_options to
	cl_target_option_save.

c-family:
	* c-common.c (handle_optimize_attribute): Pass &global_options to
	cl_optimization_save and cl_optimization_restore.
	* c-opts.c (c_common_handle_option): Pass &global_options to
	handle_generated_option.
	* c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
	(handle_pragma_pop_options, handle_pragma_reset_options): Pass
	&global_options to cl_optimization_restore.

From-SVN: r164751
2010-09-30 14:53:12 +01:00
Joseph Myers e3339d0f33 optc-gen.awk: Generate global_options initializer instead of individual variables.
gcc:
	* optc-gen.awk: Generate global_options initializer instead of
	individual variables.  Add x_ prefix to names of structure
	members.
	* opth-gen.awk: Generate gcc_options structure.  Add x_ prefix to
	names of structure members.
	* doc/tm.texi.in (HARD_FRAME_POINTER_IS_FRAME_POINTER,
	HARD_FRAME_POINTER_IS_ARG_POINTER): Document.
	* doc/tm.texi: Regenerate.
	* alias.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER
	* builtins.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER.
	* c-parser.c (disable_extension_diagnostics,
	restore_extension_diagnostics): Update names of cpp_options
	members.
	* combine.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER
	* common.opt (fcompare-debug-second): Don't use Var.
	* config/alpha/alpha.h (target_flags): Remove.
	* config/arm/arm.h (HARD_FRAME_POINTER_IS_FRAME_POINTER,
	HARD_FRAME_POINTER_IS_ARG_POINTER): Define.
	* config/bfin/bfin.h (target_flags): Remove.
	* config/cris/cris.h (target_flags): Remove.
	* config/i386/i386-c.c (ix86_pragma_target_parse): Update names of
	cl_target_option members.
	* config/i386/i386.c (ix86_force_align_arg_pointer): Remove.
	(ix86_function_specific_print, ix86_valid_target_attribute_tree,
	ix86_can_inline_p): Update names of cl_target_option members.
	* config/i386/i386.h (ix86_isa_flags): Remove.
	* config/lm32/lm32.h (target_flags): Remove.
	* config/mcore/mcore.h (mcore_stack_increment): Remove.
	* config/mcore/mcore.md (addsi3): Remove extern declaration of
	flag_omit_frame_pointer.
	* config/mep/mep.h (target_flags): Remove.
	* config/mips/mips.h (HARD_FRAME_POINTER_IS_FRAME_POINTER,
	HARD_FRAME_POINTER_IS_ARG_POINTER): Define.
	* config/mmix/mmix.h (target_flags): Remove.
	* config/rs6000/rs6000.h (rs6000_xilinx_fpu, flag_pic,
	flag_expensive_optimizations): Remove.
	* config/s390/s390.h (flag_pic): Remove.
	* config/score/score-conv.h (target_flags): Remove.
	* config/sh/sh.h (sh_fixed_range_str): Remove.
	* config/spu/spu.h (target_flags, spu_fixed_range_string): Remove.
	* dbxout.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER
	* df-scan.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
	* diagnostic.c (diagnostic_initialize): Update names of
	diagnostic_context members.
	* diagnostic.h (diagnostic_context): Rename inhibit_warnings and
	warn_system_headers.
	(diagnostic_report_warnings_p): Update for new names.
	* dwarf2out.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER
	* emit-rtl.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER and
	HARD_FRAME_POINTER_IS_ARG_POINTER.
	* flags.h (flag_compare_debug): Declare.
	* ira.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER
	* opts.c (flag_compare_debug): Define.
	(common_handle_option): Update names of diagnostic_context
	members.  Handle -fcompare-debug-second.
	(fast_math_flags_struct_set_p): Update names of cl_optimization
	members.
	* reginfo.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
	* regrename.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
	* reload.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
	* reload1.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
	* resource.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
	* rtl.h (HARD_FRAME_POINTER_IS_FRAME_POINTER,
	HARD_FRAME_POINTER_IS_ARG_POINTER): Define and use.
	* sel-sched.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER
	* stmt.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER.

gcc/c-family:
	* c-common.c (c_cpp_error): Update names of diagnostic_context
	members.
	* c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
	cl_optimization members.
	* c-opts.c (warning_as_error_callback, c_common_handle_option,
	sanitize_cpp_opts, finish_options): Update names of cpp_options
	members.

gcc/fortran:
	* cpp.c (cpp_define_builtins): Update names of gfc_option_t
	members.
	(gfc_cpp_post_options): Update names of cpp_options members.
	(cb_cpp_error): Update names of diagnostic_context members.
	* f95-lang.c (gfc_init_builtin_functions): Update names of
	gfc_option_t members.
	* gfortran.h (gfc_option_t): Rename warn_conversion and
	flag_openmp.
	* intrinsic.c (gfc_convert_type_warn): Update names of
	gfc_option_t members.
	* options.c (gfc_init_options, gfc_post_options, set_Wall,
	gfc_handle_option): Update names of gfc_option_t members.
	* parse.c (next_free, next_fixed): Update names of gfc_option_t
	members.
	* scanner.c (pedantic): Remove extern declaration.
	(skip_free_comments, skip_fixed_comments, include_line): Update
	names of gfc_option_t members.
	* trans-decl.c (gfc_generate_function_code): Update names of
	gfc_option_t members.

gcc/java:
	* java-tree.h (flag_filelist_file, flag_assert, flag_jni,
	flag_force_classes_archive_check, flag_redundant, flag_newer,
	flag_use_divide_subroutine, flag_use_atomic_builtins,
	flag_use_boehm_gc, flag_hash_synchronization,
	flag_check_references, flag_optimize_sci, flag_indirect_classes,
	flag_indirect_dispatch, flag_store_check,
	flag_reduced_reflection): Remove.
	* jcf-dump.c (flag_newer): Remove.
	* jcf.h (quiet_flag): Remove.
	* parse.h (quiet_flag): Remove.

libcpp:
	* include/cpplib.h (cpp_options): Rename warn_deprecated,
	warn_traditional, warn_long_long and pedantic.
	* directives.c (directive_diagnostics, _cpp_handle_directive):
	Update names of cpp_options members.
	* expr.c (cpp_classify_number, eval_token): Update names of
	cpp_options members.
	* init.c (cpp_create_reader, post_options): Update names of
	cpp_options members.
	* internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of
	cpp_options members.
	* macro.c (parse_params): Update names of cpp_options members.

From-SVN: r164723
2010-09-29 15:49:14 +01:00
Joseph Myers e90afde6fe options.texi (Variable): Document.
* doc/options.texi (Variable): Document.
	* optc-gen.awk, opth-gen.awk: Handle Variable records.  Don't
	generate target_flags declarations explicitly.  Don't define
	VarExists variables for the driver.
	* common.opt (target_flags): New Variable record.
	(flag_dump_unnumbered, flag_dump_unnumbered_links,
	flag_var_tracking, flag_var_tracking_assignments,
	flag_var_tracking_assignments_toggle): Don't mark variables with
	VarExists.
	* config/i386/i386.c (ix86_isa_flags): Don't define here.
	* config/i386/i386.opt (ix86_isa_flags): Define here.
	* config/mcore/mcore.c (mcore_stack_increment): Don't define here.
	* config/mcore/mcore.opt (mcore_stack_increment): Don't mark with
	VarExists.
	* flags.h (flag_dump_unnumbered, flag_var_tracking): Remove.
	* print-rtl.c (flag_dump_unnumbered, flag_dump_unnumbered_links):
	Only define for generator programs.
	* rtlanal.c (target_flags): Remove.
	* toplev.c (flag_var_tracking, flag_var_tracking_assignments,
	flag_var_tracking_assignments_toggle): Remove.

From-SVN: r164370
2010-09-17 15:14:49 +01:00
Richard Sandiford b660937531 flags.h (target_flagstate): Add x_flag_excess_precision.
gcc/
	* flags.h (target_flagstate): Add x_flag_excess_precision.
	(flag_excess_precision): Redefine as a macro.
	* toplev.c (flag_excess_precision): Delete.

From-SVN: r162096
2010-07-12 18:54:26 +00:00
Richard Sandiford 3bd36029de tm.texi.in (SWITCHABLE_TARGET): Document.
gcc/
	* doc/tm.texi.in (SWITCHABLE_TARGET): Document.
	* doc/tm.texi: Regenerate.
	* Makefile.in (OBJS-common): Add target-globals.o.
	(gtype-desc.o): Depend on $(IPA_PROP_H), $(LTO_STREAMER_H)
	and target-globals.h.
	(target-globals.o): New rule.
	(GTFILES): Include $(srcdir)/target-globals.h.
	* defaults.h (SWITCHABLE_TARGET): Define.
	* gengtype.c (open_base_files): Add target-globals.h to the
	list of includes.
	* target-globals.h: New file.
	* target-globals.c: Likewise.

	* Makefile.in (target-globals.o): Depend on $(FLAGS_H).
	* flags.h (target_flag_state): New structure.
	(default_target_flag_state): Declare.
	(this_target_flag_state): Declare as a variable or define as a macro.
	(align_loops_log): Redefine as a macro.
	(align_loops_max_skip, align_jumps_log): Likewise.
	(align_jumps_max_skip, align_labels_log): Likewise.
	(align_labels_max_skip, align_functions_log): Likewise.
	* toplev.c (default_target_flag_state): New variable.
	(this_target_flag_state): New conditional variable.
	(align_loops_log): Delete.
	(align_loops_max_skip, align_jumps_log): Likewise.
	(align_jumps_max_skip, align_labels_log): Likewise.
	(align_labels_max_skip, align_functions_log): Likewise.
	* target-globals.h (this_target_flag_state): Declare.
	(target_globals): Add a flag_state field.
	(restore_target_globals): Copy the flag_state field to
	this_target_flag_state.
	* target-globals.c: Include flags.h.
	(default_target_globals): Initialize the flag_state field.
	(save_target_globals): Likewise.

From-SVN: r162086
2010-07-12 18:53:01 +00:00
Joseph Myers 5498f0112f common.opt (fira-verbose): Use Var.
* common.opt (fira-verbose): Use Var.
	(fpcc-struct-return): Use Init instead of VarExists.
	* defaults.h (DEFAULT_PCC_STRUCT_RETURN): Move definition from
	toplev.c.
	* flags.h (flag_signed_char, flag_short_enums,
	flag_pcc_struct_return, flag_ira_verbose,
	flag_detailed_statistics, flag_remove_unreachable_functions):
	Remove.
	* toplev.c (flag_detailed_statistics, flag_signed_char,
	flag_short_enums, flag_pcc_struct_return, flag_ira_verbose):
	Remove.
	(DEFAULT_PCC_STRUCT_RETURN): Move definition to defaults.h.
	* toplev.h (flag_crossjumping, flag_if_conversion,
	flag_if_conversion2, flag_keep_static_consts, flag_peel_loops,
	flag_rerun_cse_after_loop, flag_thread_jumps, flag_tracer,
	flag_unroll_loops, flag_unroll_all_loops, flag_unswitch_loops,
	flag_cprop_registers, time_report, flag_ira_loop_pressure,
	flag_ira_coalesce, flag_ira_move_spills,
	flag_ira_share_save_slots, flag_ira_share_spill_slots): Remove.

c-family:
	* c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
	flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
	flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
	flag_signed_bitfields, warn_strict_null_sentinel,
	flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
	flag_gen_declaration, flag_no_gnu_keywords,
	flag_implement_inlines, flag_implicit_templates,
	flag_implicit_inline_templates, flag_optional_diags,
	flag_elide_constructors, flag_default_inline, flag_rtti,
	flag_conserve_space, flag_access_control, flag_check_new,
	flag_new_for_scope, flag_weak, flag_working_directory,
	flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
	flag_enforce_eh_specs, flag_threadsafe_statics,
	flag_pretty_templates): Remove.
	* c-common.h (flag_preprocess_only, flag_nil_receivers,
	flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
	flag_replace_objc_classes, flag_undef, flag_no_builtin,
	flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
	flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
	flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
	flag_no_gnu_keywords, flag_implement_inlines,
	flag_implicit_templates, flag_implicit_inline_templates,
	flag_optional_diags, flag_elide_constructors, flag_default_inline,
	flag_rtti, flag_conserve_space, flag_access_control,
	flag_check_new, flag_new_for_scope, flag_weak,
	flag_working_directory, flag_use_cxa_atexit,
	flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
	flag_threadsafe_statics, flag_pretty_templates,
	warn_strict_null_sentinel): Remove.
	* c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
	fbuiltin, fcheck-new, fconserve-space, felide-constructors,
	fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
	fimplicit-inline-templates, fimplicit-templates,
	flax-vector-conversions, fms-extensions, fnil-receivers,
	fnonansi-builtins, fpretty-templates, freplace-objc-classes,
	frtti, fshort-double, fshort-enums, fshort-wchar,
	fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
	funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
	fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
	gen-decls, undef): Use Var.
	(fdefault-inline, foptional-diags): Document as doing nothing.
	* c-opts.c (c_common_handle_option): Remove cases for options now
	using Var.  Mark ignored options as such.

fortran:
	* lang.opt (fshort-enums): Define using Var and VarExists.
	* options.c (gfc_handle_option): Don't set flag_short_enums here.

lto:
	* lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
	(lto_handle_option): Don't set flag_signed_char here.

From-SVN: r160384
2010-06-07 17:46:23 +01:00
Jakub Jelinek 6ca5d1f6d0 re PR debug/43516 ("-fcompare-debug failure" at -O2)
PR debug/43516
	* flags.h (final_insns_dump_p): New extern.
	* final.c (final_insns_dump_p): New variable.
	(rest_of_clean_state): Set it before -fdump-final-insns=
	dumping, clear afterwards.
	* print-rtl.c (print_rtx): If final_insns_dump_p don't dump
	MEM_ALIAS_SET on MEMs.

From-SVN: r157753
2010-03-26 17:18:51 +01:00
Rainer Orth 6a4d4e8a85 re PR bootstrap/41771 (Bootstrap with Sun Studio 12.1 fails)
gcc:
	PR bootstrap/41771
	* flags.h: Don't include real.h.
	(HONOR_NANS, HONOR_SNANS, HONOR_INFINITIES, HONOR_SIGNED_ZEROS,
	HONOR_SIGN_DEPENDENT_ROUNDING): Move ...
	* real.h (HONOR_NANS, HONOR_SNANS, HONOR_INFINITIES,
	HONOR_SIGNED_ZEROS, HONOR_SIGN_DEPENDENT_ROUNDING): ... here.
	* dominance.c: Update copyright.
	* gimple.c (walk_gimple_op): Remove inline.
	* tree-ssa-reassoc.c: Include real.h.
	* Makefile.in (FLAGS_H): Remove $(REAL_H).
	(tree-ssa-reassoc.o): Depend on $(REAL_H).

	include:
	PR bootstrap/41771
	* ansidecl.h: Fix inline test for C99 and Sun Studio cc.

From-SVN: r155654
2010-01-05 17:14:30 +00:00
H.J. Lu b8698a0f37 Remove trailing white spaces.
2009-11-25  H.J. Lu  <hongjiu.lu@intel.com>

	* alias.c: Remove trailing white spaces.
	* alloc-pool.c: Likewise.
	* alloc-pool.h: Likewise.
	* attribs.c: Likewise.
	* auto-inc-dec.c: Likewise.
	* basic-block.h: Likewise.
	* bb-reorder.c: Likewise.
	* bt-load.c: Likewise.
	* builtins.c: Likewise.
	* builtins.def: Likewise.
	* c-common.c: Likewise.
	* c-common.h: Likewise.
	* c-cppbuiltin.c: Likewise.
	* c-decl.c: Likewise.
	* c-format.c: Likewise.
	* c-lex.c: Likewise.
	* c-omp.c: Likewise.
	* c-opts.c: Likewise.
	* c-parser.c: Likewise.
	* c-pretty-print.c: Likewise.
	* c-tree.h: Likewise.
	* c-typeck.c: Likewise.
	* caller-save.c: Likewise.
	* calls.c: Likewise.
	* cfg.c: Likewise.
	* cfganal.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfghooks.c: Likewise.
	* cfghooks.h: Likewise.
	* cfglayout.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgloop.h: Likewise.
	* cfgloopmanip.c: Likewise.
	* cfgrtl.c: Likewise.
	* cgraph.c: Likewise.
	* cgraph.h: Likewise.
	* cgraphbuild.c: Likewise.
	* cgraphunit.c: Likewise.
	* cif-code.def: Likewise.
	* collect2.c: Likewise.
	* combine.c: Likewise.
	* convert.c: Likewise.
	* coverage.c: Likewise.
	* crtstuff.c: Likewise.
	* cse.c: Likewise.
	* cselib.c: Likewise.
	* dbgcnt.c: Likewise.
	* dbgcnt.def: Likewise.
	* dbgcnt.h: Likewise.
	* dbxout.c: Likewise.
	* dce.c: Likewise.
	* ddg.c: Likewise.
	* ddg.h: Likewise.
	* defaults.h: Likewise.
	* df-byte-scan.c: Likewise.
	* df-core.c: Likewise.
	* df-problems.c: Likewise.
	* df-scan.c: Likewise.
	* df.h: Likewise.
	* dfp.c: Likewise.
	* diagnostic.c: Likewise.
	* diagnostic.h: Likewise.
	* dominance.c: Likewise.
	* domwalk.c: Likewise.
	* double-int.c: Likewise.
	* double-int.h: Likewise.
	* dse.c: Likewise.
	* dwarf2asm.c: Likewise.
	* dwarf2asm.h: Likewise.
	* dwarf2out.c: Likewise.
	* ebitmap.c: Likewise.
	* ebitmap.h: Likewise.
	* emit-rtl.c: Likewise.
	* et-forest.c: Likewise.
	* except.c: Likewise.
	* except.h: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* expr.h: Likewise.
	* final.c: Likewise.
	* flags.h: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* function.h: Likewise.
	* fwprop.c: Likewise.
	* gcc.c: Likewise.
	* gcov-dump.c: Likewise.
	* gcov-io.c: Likewise.
	* gcov-io.h: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.
	* genattr.c: Likewise.
	* genattrtab.c: Likewise.
	* genautomata.c: Likewise.
	* genchecksum.c: Likewise.
	* genconfig.c: Likewise.
	* genflags.c: Likewise.
	* gengtype-parse.c: Likewise.
	* gengtype.c: Likewise.
	* gengtype.h: Likewise.
	* genmddeps.c: Likewise.
	* genmodes.c: Likewise.
	* genopinit.c: Likewise.
	* genpreds.c: Likewise.
	* gensupport.c: Likewise.
	* ggc-common.c: Likewise.
	* ggc-page.c: Likewise.
	* ggc-zone.c: Likewise.
	* ggc.h: Likewise.
	* gimple-iterator.c: Likewise.
	* gimple-low.c: Likewise.
	* gimple-pretty-print.c: Likewise.
	* gimple.c: Likewise.
	* gimple.def: Likewise.
	* gimple.h: Likewise.
	* gimplify.c: Likewise.
	* graphds.c: Likewise.
	* graphite-clast-to-gimple.c: Likewise.
	* gthr-nks.h: Likewise.
	* gthr-posix.c: Likewise.
	* gthr-posix.h: Likewise.
	* gthr-posix95.h: Likewise.
	* gthr-single.h: Likewise.
	* gthr-tpf.h: Likewise.
	* gthr-vxworks.h: Likewise.
	* gthr.h: Likewise.
	* haifa-sched.c: Likewise.
	* hard-reg-set.h: Likewise.
	* hooks.c: Likewise.
	* hooks.h: Likewise.
	* hosthooks.h: Likewise.
	* hwint.h: Likewise.
	* ifcvt.c: Likewise.
	* incpath.c: Likewise.
	* init-regs.c: Likewise.
	* integrate.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-reference.c: Likewise.
	* ipa-struct-reorg.c: Likewise.
	* ipa-struct-reorg.h: Likewise.
	* ipa-type-escape.c: Likewise.
	* ipa-type-escape.h: Likewise.
	* ipa-utils.c: Likewise.
	* ipa-utils.h: Likewise.
	* ipa.c: Likewise.
	* ira-build.c: Likewise.
	* ira-color.c: Likewise.
	* ira-conflicts.c: Likewise.
	* ira-costs.c: Likewise.
	* ira-emit.c: Likewise.
	* ira-int.h: Likewise.
	* ira-lives.c: Likewise.
	* ira.c: Likewise.
	* jump.c: Likewise.
	* lambda-code.c: Likewise.
	* lambda-mat.c: Likewise.
	* lambda-trans.c: Likewise.
	* lambda.h: Likewise.
	* langhooks.c: Likewise.
	* lcm.c: Likewise.
	* libgcov.c: Likewise.
	* lists.c: Likewise.
	* loop-doloop.c: Likewise.
	* loop-init.c: Likewise.
	* loop-invariant.c: Likewise.
	* loop-iv.c: Likewise.
	* loop-unroll.c: Likewise.
	* lower-subreg.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-compress.c: Likewise.
	* lto-opts.c: Likewise.
	* lto-section-in.c: Likewise.
	* lto-section-out.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* lto-streamer.c: Likewise.
	* lto-streamer.h: Likewise.
	* lto-symtab.c: Likewise.
	* lto-wpa-fixup.c: Likewise.
	* matrix-reorg.c: Likewise.
	* mcf.c: Likewise.
	* mode-switching.c: Likewise.
	* modulo-sched.c: Likewise.
	* omega.c: Likewise.
	* omega.h: Likewise.
	* omp-low.c: Likewise.
	* optabs.c: Likewise.
	* optabs.h: Likewise.
	* opts-common.c: Likewise.
	* opts.c: Likewise.
	* params.def: Likewise.
	* params.h: Likewise.
	* passes.c: Likewise.
	* plugin.c: Likewise.
	* postreload-gcse.c: Likewise.
	* postreload.c: Likewise.
	* predict.c: Likewise.
	* predict.def: Likewise.
	* pretty-print.c: Likewise.
	* pretty-print.h: Likewise.
	* print-rtl.c: Likewise.
	* print-tree.c: Likewise.
	* profile.c: Likewise.
	* read-rtl.c: Likewise.
	* real.c: Likewise.
	* recog.c: Likewise.
	* reg-stack.c: Likewise.
	* regcprop.c: Likewise.
	* reginfo.c: Likewise.
	* regmove.c: Likewise.
	* regrename.c: Likewise.
	* regs.h: Likewise.
	* regstat.c: Likewise.
	* reload.c: Likewise.
	* reload1.c: Likewise.
	* resource.c: Likewise.
	* rtl.c: Likewise.
	* rtl.def: Likewise.
	* rtl.h: Likewise.
	* rtlanal.c: Likewise.
	* sbitmap.c: Likewise.
	* sched-deps.c: Likewise.
	* sched-ebb.c: Likewise.
	* sched-int.h: Likewise.
	* sched-rgn.c: Likewise.
	* sched-vis.c: Likewise.
	* sdbout.c: Likewise.
	* sel-sched-dump.c: Likewise.
	* sel-sched-dump.h: Likewise.
	* sel-sched-ir.c: Likewise.
	* sel-sched-ir.h: Likewise.
	* sel-sched.c: Likewise.
	* sel-sched.h: Likewise.
	* sese.c: Likewise.
	* sese.h: Likewise.
	* simplify-rtx.c: Likewise.
	* stack-ptr-mod.c: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* store-motion.c: Likewise.
	* stringpool.c: Likewise.
	* stub-objc.c: Likewise.
	* sync-builtins.def: Likewise.
	* target-def.h: Likewise.
	* target.h: Likewise.
	* targhooks.c: Likewise.
	* targhooks.h: Likewise.
	* timevar.c: Likewise.
	* tlink.c: Likewise.
	* toplev.c: Likewise.
	* toplev.h: Likewise.
	* tracer.c: Likewise.
	* tree-affine.c: Likewise.
	* tree-affine.h: Likewise.
	* tree-browser.def: Likewise.
	* tree-call-cdce.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-chrec.c: Likewise.
	* tree-chrec.h: Likewise.
	* tree-complex.c: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-data-ref.h: Likewise.
	* tree-dfa.c: Likewise.
	* tree-dump.c: Likewise.
	* tree-dump.h: Likewise.
	* tree-eh.c: Likewise.
	* tree-flow-inline.h: Likewise.
	* tree-flow.h: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-loop-linear.c: Likewise.
	* tree-mudflap.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-nomudflap.c: Likewise.
	* tree-nrv.c: Likewise.
	* tree-object-size.c: Likewise.
	* tree-optimize.c: Likewise.
	* tree-outof-ssa.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-pass.h: Likewise.
	* tree-phinodes.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-alias.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* tree-ssa-copy.c: Likewise.
	* tree-ssa-copyrename.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-ssa-dse.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-ifcombine.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-live.h: Likewise.
	* tree-ssa-loop-ch.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-loop-unswitch.c: Likewise.
	* tree-ssa-loop.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-operands.c: Likewise.
	* tree-ssa-operands.h: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-sink.c: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-ssa-ter.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa-uncprop.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-ssanames.c: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-tailcall.c: Likewise.
	* tree-vect-data-refs.c: Likewise.
	* tree-vect-generic.c: Likewise.
	* tree-vect-loop-manip.c: Likewise.
	* tree-vect-loop.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-vect-slp.c: Likewise.
	* tree-vect-stmts.c: Likewise.
	* tree-vectorizer.c: Likewise.
	* tree-vectorizer.h: Likewise.
	* tree-vrp.c: Likewise.
	* tree.c: Likewise.
	* tree.def: Likewise.
	* tree.h: Likewise.
	* treestruct.def: Likewise.
	* unwind-compat.c: Likewise.
	* unwind-dw2-fde-glibc.c: Likewise.
	* unwind-dw2.c: Likewise.
	* value-prof.c: Likewise.
	* value-prof.h: Likewise.
	* var-tracking.c: Likewise.
	* varasm.c: Likewise.
	* varpool.c: Likewise.
	* vec.c: Likewise.
	* vec.h: Likewise.
	* vmsdbgout.c: Likewise.
	* web.c: Likewise.
	* xcoffout.c: Likewise.

From-SVN: r154645
2009-11-25 02:55:54 -08:00
Diego Novillo d7f09764d7 Merge lto branch into trunk.
From-SVN: r152434
2009-10-03 17:10:11 -04:00
Richard Guenther a406865a08 re PR c/40401 (ICE: verify_gimple failed)
2009-07-17  Richard Guenther  <rguenther@suse.de>

	PR c/40401
	* tree-pass.h (pass_diagnose_omp_blocks): Declare.
	(pass_warn_unused_result): Likewise.
	(TODO_set_props): Remove.
	* omp-low.c (diagnose_omp_structured_block_errors): Change to
	run as a pass.
	(pass_diagnose_omp_blocks): Define.
	* c-decl.c (pop_file_scope): Do not finalize the CU here.
	(c_gimple_diagnostics_recursively): Remove.
	(finish_function): Do not call it.
	(c_write_global_declarations): Continue after errors.
	Finalize the CU here.
	* c-gimplify.c (c_genericize): Do not gimplify here.
	* c-common.c (c_warn_unused_result): Move ...
	* tree-cfg.c (do_warn_unused_result): ... here.
	(run_warn_unused_result): New function.
	(gate_warn_unused_result): New function.
	(pass_warn_unused_result): New pass.
	* c-common.h (c_warn_unused_result): Remove.
	* flags.h (flag_warn_unused_result): Declare.
	* c-opts.c (c_common_init_options): Enable flag_warn_unused_result.
	* opts.c (flag_warn_unused_result): Initialize to false.

	* toplev.c (compile_file): Add comment.
	* omp-low.c (create_omp_child_function): Do not register
	the function with the frontend.
	(diagnose_omp_structured_block_errors): Prepare to be
	called as optimization pass.
	(gate_diagnose_omp_blocks): New function.
	(pass_diagnose_omp_blocks): New pass.
	* cgraph.h (cgraph_optimize): Remove.
	(cgraph_analyze_function): Likewise.
	* cgraph.c (cgraph_add_new_function): Gimplify C++ thunks.
	* cgraphunit.c (cgraph_lower_function): Lower nested functions
	before their parents here.
	(cgraph_finalize_function): Not here.
	(cgraph_analyze_function): Gimplify functions here.
	(cgraph_finalize_compilation_unit): Continue after errors.
	Optimize the callgraph from here.
	(cgraph_optimize): Make static.
	* langhooks.c (write_global_declarations): Finalize the CU.
	* gimplify.c (gimplify_asm_expr): Do not emit ASMs with errors.
	(gimplify_function_tree): Assert we gimplify only once.
	Set PROP_gimple_any property.
	* tree-nested.c (gimplify_all_functions): New function.
	(lower_nested_functions): Gimplify all nested functions.
	* gimple.h (diagnose_omp_structured_block_errors): Remove.
	* passes.c (init_optimization_passes): Add pass_warn_unused_result
	and pass_diagnose_omp_blocks after gimplification.  Do not
	set TODO_set_props on all_lowering_passes.
	(execute_one_pass): Do not handle TODO_set_props.
	* Makefile.in (cgraphunit.o): Add $(TREE_DUMP_H) dependency.
	(gimplify.o): Add tree-pass.h dependency.
	* tree-inline.c (copy_statement_list): Properly copy STATEMENT_LIST.
	(copy_tree_body_r): Properly handle TARGET_EXPR like SAVE_EXPR.
	(unsave_r): Likewise.
	* c-omp.c (c_finish_omp_atomic): Set DECL_CONTEXT on the
	temporary variable.

	cp/
	* decl.c (finish_function): Do not emit unused result warnings
	from here.
	* cp-objcp-common.h (LANG_HOOKS_POST_GIMPLIFY_PASS): Use
	c_warn_unused_result_pass.
	* semantics.c (expand_or_defer_fn): Adjust assertion about IL status.
	* optimize.c (clone_body): Clone in GENERIC.
	(maybe_clone_body): Do not clear DECL_SAVED_TREE.
	* decl2.c (cp_write_global_declarations): Fix body test.
	Do not call cgraph_optimize.
	* Make-lang.in (optimize.o): Add tree-iterator.h dependency.
	* method.c (use_thunk): Register thunk with
	cgraph_finalize_function.
	* error.c (function_category): Guard access of DECL_LANG_SPECIFIC.

	java/
	* java-gimplify.c (java_genericize): Do not gimplify here.
	But replace all local references.
	(java_gimplify_expr): Do not replace local references here.
	(java_gimplify_modify_expr): Likewise.
	* jcf-parse.c (java_parse_file): Do not finalize the CU or
	optimize the cgraph here.
	* decl.c (java_replace_reference): Make static.
	(java_replace_references): New function.
	(end_java_method): Clear base_decl_map.
	* java-tree.h (java_replace_references): Declare.
	(java_replace_reference): Remove.

	ada/
	* utils.c (end_subprog_body): Revert to pre-tuples state.  Remove
	unused parameter.
	(gnat_gimplify_function): Do not gimplify here.
	Fold into its only caller and remove.
	(gnat_builtin_function): Adjust for end_subprog_body signature change.
	(gnat_write_global_declarations): Also finalize the CU.
	* misc.c (gnat_parse_file): Do not finalize the CU here.
	* trans.c (gigi): Revert to pre-tuples state.
	(Subprogram_Body_to_gnu): Adjust for end_subprog_body signature
	change.
	* gigi.h (end_subprog_body): Remove unused parameter.

	fortran/
	* f95-lang.c (gfc_be_parse_file): Do not finalize the CU here.
	* trans-decl.c (gfc_gimplify_function): Remove.
	(build_entry_thunks): Do not gimplify here.
	(create_main_function): Likewise.
	(gfc_generate_function_code): Likewise.

	* g++.dg/rtti/crash4.C: New testcase.
	* g++.dg/torture/20090706-1.C: Likewise.
	* gcc.dg/redecl-17.c: Likewise.

	* gfortran.dg/missing_optional_dummy_5.f90: Adjust pattern.
	* gcc.dg/declspec-9.c: Expect extra error.
	* gcc.dg/declspec-10.c: Likewise.
	* gcc.dg/declspec-11.c: Likewise.
	* gcc.dg/redecl-10.c: Expect extra warnings.
	* gcc.target/i386/pr39082-1.c: Adjust diagnostic location.
	* gcc.target/i386/pr39545-1.c: Likewise.
	* g++.dg/ext/asm3.C: Expect more errors.
	* g++.dg/gomp/block-1.C: Likewise.
	* g++.dg/gomp/block-2.C: Likewise.
	* g++.dg/gomp/block-3.C: Likewise.
	* g++.dg/gomp/block-5.C: Likewise.
	* g++.old-deja/g++.jason/report.C: Expect extra warnings.
	* g++.dg/warn/unused-result1.C: XFAIL.

From-SVN: r149750
2009-07-17 15:49:34 +00:00
Manuel López-Ibáñez 62a67c94b7 flags.h (extra_warnings): Delete.
2009-05-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* flags.h (extra_warnings): Delete.
	* toplev.c (process_options): Handle Wuninitialized here.
	* opts.c (extra_warnings): Delete.
	(set_Wextra): Delete.
	(common_handle_option): -Wextra can be handled automatically.
	* c-opts.c (c_common_handle_option): Delete obsolete code.
	(c_common_post_options): Simplify comment.
	* common.opt (W): Add Var.
	(Wextra): Add Var.
	(Wuninitialized): Initialize to -1.

From-SVN: r147080
2009-05-03 19:14:06 +00:00
Joseph Myers 8ce94e4446 re PR middle-end/323 (optimized code gives strange floating point results)
PR rtl-optimization/323
	* c-common.c (c_fully_fold, convert_and_check,
	c_common_truthvalue_conversion): Handle EXCESS_PRECISION_EXPR.
	(c_fully_fold_internal): Disallow EXCESS_PRECISION_EXPR.
	* c-common.def (EXCESS_PRECISION_EXPR): New.
	* c-cppbuiltin.c (builtin_define_float_constants): Define
	constants with enough digits for long double.
	* c-lex.c (interpret_float): Interpret constant with excess
	precision where appropriate.
	* c-opts.c (c_common_post_options): Set
	flag_excess_precision_cmdline.  Give an error for
	-fexcess-precision=standard for C++ for processors where the
	option is significant.
	* c-parser.c (c_parser_conditional_expression): Handle excess
	precision in condition.
	* c-typeck.c (convert_arguments): Handle arguments with excess
	precision.
	(build_unary_op): Move excess precision outside operation.
	(build_conditional_expr): Likewise.
	(build_compound_expr): Likewise.
	(build_c_cast): Do cast on operand of EXCESS_PRECISION_EXPR.
	(build_modify_expr): Handle excess precision in RHS.
	(convert_for_assignment): Handle excess precision in converted
	value.
	(digest_init, output_init_element, process_init_element): Handle
	excess precision in initializer.
	(c_finish_return): Handle excess precision in return value.
	(build_binary_op): Handle excess precision in operands and add
	excess precision as needed for operation.
	* common.opt (-fexcess-precision=): New option.
	* config/i386/i386.h (X87_ENABLE_ARITH, X87_ENABLE_FLOAT): New.
	* config/i386/i386.md (float<SSEMODEI24:mode><X87MODEF:mode>2):
	For standard excess precision, output explicit conversion to and
	truncation from XFmode.
	(*float<SSEMODEI24:mode><X87MODEF:mode>2_1,
	*float<SSEMODEI24:mode><X87MODEF:mode>2_i387_with_temp,
	*float<SSEMODEI24:mode><X87MODEF:mode>2_i387, two unnamed
	define_splits, floatdi<X87MODEF:mode>2_i387_with_xmm, two unnamed
	define_splits, *floatunssi<mode>2_1, two unnamed define_splits,
	floatunssi<mode>2, add<mode>3, sub<mode>3, mul<mode>3, divdf3,
	divsf3, *fop_<mode>_comm_i387, *fop_<mode>_1_i387,
	*fop_<MODEF:mode>_2_i387, *fop_<MODEF:mode>_3_i387,
	*fop_df_4_i387, *fop_df_5_i387, *fop_df_6_i387, two unnamed
	define_splits, sqrt<mode>2): Disable where appropriate for
	standard excess precision.
	* convert.c (convert_to_real): Do not shorten arithmetic to type
	for which excess precision would be used.
	* defaults.h (TARGET_FLT_EVAL_METHOD_NON_DEFAULT): Define.
	* doc/invoke.texi (-fexcess-precision=): Document option.
	(-mfpmath=): Correct index entry.
	* flags.h (enum excess_precision, flag_excess_precision_cmdline,
	flag_excess_precision): New.
	* langhooks.c (lhd_post_options): Set
	flag_excess_precision_cmdline.
	* opts.c (common_handle_option): Handle -fexcess-precision=.
	* toplev.c (flag_excess_precision_cmdline, flag_excess_precision,
	init_excess_precision): New.
	(lang_dependent_init_target): Call init_excess_precision.
	* tree.c (excess_precision_type): New.
	* tree.h (excess_precision_type): Declare.

ada:
	* gcc-interface/misc.c (gnat_post_options): Set
	flag_excess_precision_cmdline.  Give an error for
	-fexcess-precision=standard for processors where the option is
	significant.

fortran:
	* options.c (gfc_post_options): Set
	flag_excess_precision_cmdline.  Give an error for
	-fexcess-precision=standard for processors where the option is
	significant.

java:
	* lang.c (java_post_options): Set flag_excess_precision_cmdline.
	Give an error for -fexcess-precision=standard for processors where
	the option is significant.

testsuite:
	* gcc.target/i386/excess-precision-1.c,
	gcc.target/i386/excess-precision-2.c,
	gcc.target/i386/excess-precision-3.c,
	gcc.target/i386/excess-precision-4.c,
	gcc.target/i386/excess-precision-5.c,
	gcc.target/i386/excess-precision-6.c: New tests.

From-SVN: r145272
2009-03-30 02:50:44 +01:00
Jakub Jelinek 574872ff83 re PR c++/39554 (-Wdisallowed-function-list fails when #including <algorithm>)
PR c++/39554
	* opts.c (warning_disallowed_functions, warn_disallowed_functions,
	warn_if_disallowed_function_p): Removed.
	(common_handle_option): Don't handle OPT_Wdisallowed_function_list_.
	* c-parser.c (c_parser_postfix_expression_after_primary): Don't call
	warning_if_disallowed_function_p.
	* flags.h (warn_if_disallowed_function_p,
	warn_disallowed_functions): Removed.
	* common.opt (Wdisallowed-function-list=): Removed.
	* doc/invoke.texi (-Wdisallowed-function-list=): Removed.

	* parser.c (cp_parser_postfix_expression): Don't call
	warning_if_disallowed_function_p.

	* gcc.dg/wdisallowed-functions-1.c: Removed.
	* gcc.dg/wdisallowed-functions-2.c: Removed.
	* gcc.dg/wdisallowed-functions-3.c: Removed.
	* g++.dg/warn/Wdisallowed-functions-1.C: Removed.
	* g++.dg/warn/Wdisallowed-functions-2.C: Removed.
	* g++.dg/warn/Wdisallowed-functions-3.C: Removed.

From-SVN: r145198
2009-03-28 18:23:08 +01:00
Jakub Jelinek 66647d441f Update Copyright years for files modified in 2008 and/or 2009.
From-SVN: r144324
2009-02-20 16:20:38 +01:00
Vladimir Makarov 7db7ed3cbd tm.texi (TARGET_IRA_COVER_CLASSES): Modify description.
2008-12-09  Vladimir Makarov  <vmakarov@redhat.com>

	* doc/tm.texi (TARGET_IRA_COVER_CLASSES): Modify description.

	* doc/invoke.texi (-fira-region): Describe new option.
	(-fira-algorithm): Change the values.

	* ira-conflicts.c (build_conflict_bit_table,
	build_allocno_conflicts): Use ira_reg_classes_intersect_p.
	(ira_build_conflicts): Use flag flag_ira_region instead of
	flag_ira_algorithm.  Prohibit usage of callee-saved likely spilled
	base registers for allocnos crossing calls.

	* flags.h (enum ira_algorithm): Redefine.
	(enum ira_region): New.
	(flag_ira_region): New.

	* cfgloopanal.c (estimate_reg_pressure_cost): Use flag_ira_region
	instead of flag_ira_algorithm.

	* toplev.c (flag_ira_algorithm): Change the initial value.
	(flag_ira_region): New.

	* ira-int.h (ira_reg_classes_intersect_p,
	ira_reg_class_super_classes): New.

	* ira-color.c (update_copy_costs): Use
	ira_reg_classes_intersect_p.  Use right class to find hard reg
	index.
	(update_conflict_hard_regno_costs): Ditto.  Add a new parameter.
	(assign_hard_reg): Ditto.  Pass additional argument to
	update_conflict_hard_regno_costs.  Do not uncoalesce for priority
	coloring.
	(allocno_priorities, setup_allocno_priorities,
	allocno_priority_compare_func): Move before color_allocnos.
	(color_allocnos): Add priority coloring.  Use flag flag_ira_region
	instead of flag_ira_algorithm.
	(move_spill_restore): Check classes of the same reg allocno from
	different regions.
	(update_curr_costs): Use ira_reg_classes_intersect_p.
	(ira_reassign_conflict_allocnos): Ditto.

	* opts.c (decode_options): Always set up flag_ira.  Set up
	flag_ira_algorithm.  Warn CB can not be used for architecture.
	(common_handle_option): Modify code for -fira-algorithm.  Add code
	to process -fira-region.

	* ira-lives.c (update_allocno_pressure_excess_length): Process
	superclasses too.
	(set_allocno_live, clear_allocno_live, mark_reg_live,
	mark_reg_dead, process_bb_node_lives): Ditto.

	* ira-emit.c (ira_emit): Fix insn codes.
	
	* ira-build.c (propagate_allocno_info): Use flag flag_ira_region
	instead of flag_ira_algorithm.
	(allocno_range_compare_func): Ignore classes for priority
	coloring.
	(setup_min_max_conflict_allocno_ids): Ditto.
	(ira_flattening): Use ira_reg_classes_intersect_p.

	* genpreds.c (write_enum_constraint_num): Output
	CONSTRAINT__LIMIT.
	
	* common.opt (fira-algorithm): Modify.
	(fira-region): New.

	* ira.c (setup_class_hard_regs): Initialize.
	(setup_cover_and_important_classes): Modify code setting class
	related info for priority coloring.
	(setup_class_translate): Ditto.
	(ira_reg_classes_intersect_p, ira_reg_class_super_classes): New.
	(setup_reg_class_intersect_union): Rename to
	setup_reg_class_relations.  Add code for setting up new variables.
	(find_reg_class_closure): Do not check targetm.ira_cover_classes.
	(ira): Use flag flag_ira_region instead of flag_ira_algorithm.

	* ira-costs.c (common_classes): New.
	(print_costs): Use flag flag_ira_region instead of
	flag_ira_algorithm.
	(find_allocno_class_costs): Ditto.  Use common_classes.  Translate
	alt_class.
	(ira_costs): Allocate/deallocate common_classes.
	
	* config/m32c/m32.h (REG_ALLOC_ORDER): Add reg 19.
	(REG_CLASS_CONTENTS, reg_class, REG_CLASS_NAMES): New entries for
	R02A_REGS.

	* reload1.c (choose_reload_regs): Use MODE_INT for partial ints in
	smallest_mode_for_size.

From-SVN: r142610
2008-12-09 21:25:11 +00:00
Andrey Belevantsev e855c69d16 sel-sched.h, [...]: New files.
2008-08-31  Andrey Belevantsev  <abel@ispras.ru>
        Dmitry Melnik  <dm@ispras.ru>
        Dmitry Zhurikhin  <zhur@ispras.ru>
        Alexander Monakov  <amonakov@ispras.ru>
        Maxim Kuvyrkov  <maxim@codesourcery.com>

	* sel-sched.h, sel-sched-dump.h, sel-sched-ir.h, sel-sched.c,
	sel-sched-dump.c, sel-sched-ir.c: New files.
	* Makefile.in (OBJS-common): Add selective scheduling object
	files.
	(sel-sched.o, sel-sched-dump.o, sel-sched-ir.o): New entries.
	(SEL_SCHED_IR_H, SEL_SCHED_DUMP_H): New entries.
	(sched-vis.o): Add dependency on $(INSN_ATTR_H).
	* cfghooks.h (get_cfg_hooks, set_cfg_hooks): New prototypes.
	* cfghooks.c (get_cfg_hooks, set_cfg_hooks): New functions.
	(make_forwarder_block): Update loop latch if we have redirected
	the loop latch edge.
	* cfgloop.c (get_loop_body_in_custom_order): New function.
	* cfgloop.h (LOOPS_HAVE_FALLTHRU_PREHEADERS): New enum field.
	(CP_FALLTHRU_PREHEADERS): Likewise.
	(get_loop_body_in_custom_order): Declare.
	* cfgloopmanip.c (has_preds_from_loop): New.
	(create_preheader): Honor CP_FALLTHRU_PREHEADERS.
	Assert that the preheader edge will be fall thru when it is set.
	* common.opt (fsel-sched-bookkeeping, fsel-sched-pipelining,
	fsel-sched-pipelining-outer-loops, fsel-sched-renaming,
	fsel-sched-substitution, fselective-scheduling): New flags.
    	* cse.c (hash_rtx_cb): New.
	(hash_rtx): Use it.
	* dbgcnt.def (sel_sched_cnt, sel_sched_region_cnt,
	sel_sched_insn_cnt): New counters. 
	* final.c (compute_alignments): Export.  Free dominance info after loop_optimizer_finalize.
	* genattr.c (main): Output maximal_insn_latency prototype.
	* genautomata.c (output_default_latencies): New. Factor its code from ...
	(output_internal_insn_latency_func): ... here.
	(output_internal_maximal_insn_latency_func): New.
	(output_maximal_insn_latency_func): New.
	* hard-reg-set.h (UHOST_BITS_PER_WIDE_INT): Define unconditionally.
	(struct hard_reg_set_iterator): New.
	(hard_reg_set_iter_init, hard_reg_set_iter_set,
	hard_reg_set_iter_next): New functions.
	(EXECUTE_IF_SET_IN_HARD_REG_SET): New macro.
	* lists.c (remove_free_INSN_LIST_node,
	remove_free_EXPR_LIST_node): New functions.
	* loop-init.c (loop_optimizer_init): When LOOPS_HAVE_FALLTHRU_PREHEADERS,
	set CP_FALLTHRU_PREHEADERS when calling create_preheaders.
	(loop_optimizer_finalize): Do not verify flow info after reload.
	* recog.c (validate_replace_rtx_1): New parameter simplify.
	Default it to true.  Update all uses.  Factor out simplifying
	code to ...
	(simplify_while_replacing): ... this new function.
	(validate_replace_rtx_part,
	validate_replace_rtx_part_nosimplify): New.
	* recog.h (validate_replace_rtx_part,
	validate_replace_rtx_part_nosimplify): Declare.
	* rtl.c (rtx_equal_p_cb): New.
	(rtx_equal_p): Use it.
	* rtl.h (rtx_equal_p_cb, hash_rtx_cb): Declare.
	(remove_free_INSN_LIST_NODE, remove_free_EXPR_LIST_node,
	debug_bb_n_slim, debug_bb_slim,    print_rtl_slim): Likewise.
	* vecprim.h: Add a vector type for unsigned int. 
	* haifa-sched.c: Include vecprim.h and cfgloop.h.
	(issue_rate, sched_verbose_param, note_list, dfa_state_size,
	ready_try, cycle_issued_insns, spec_info): Make global.
	(readyp): Initialize.
	(dfa_lookahead): New global variable.
	(old_max_uid, old_last_basic_block): Remove.
	(h_i_d): Make it a vector.
	(INSN_TICK, INTER_TICK, QUEUE_INDEX, INSN_COST): Make them work
	through HID macro.
	(after_recovery, adding_bb_to_current_region_p):
	New variables to handle correct insertion of the recovery code.
	(struct ready_list): Move declaration to sched-int.h.
	(rgn_n_insns): Removed.
	(rtx_vec_t): Move to sched-int.h.
	(find_insn_reg_weight): Remove.
	(find_insn_reg_weight1): Rename to find_insn_reg_weight.
	(haifa_init_h_i_d, haifa_finish_h_i_d):
	New functions to initialize / finalize haifa instruction data.
	(extend_h_i_d, init_h_i_d): Rewrite.
	(unlink_other_notes): Move logic to add_to_note_list.  Handle
	selective scheduler.
	(ready_lastpos, ready_element, ready_sort, reemit_notes,
	find_fallthru_edge): Make global, remove static prototypes.
	(max_issue): Make global.  Add privileged_n and state parameters.  Use
	them.  
	(extend_global, extend_all): Removed.
	(init_before_recovery): Add new param.  Fix the handling of the case
	when we insert a recovery code before the EXIT which has a predecessor
	with a fallthrough edge to it.
	(create_recovery_block): Make global.  Rename to
	sched_create_recovery_block.  Update.
	(change_pattern): Rename to sched_change_pattern.  Make global.
	(speculate_insn): Rename to sched_speculate_insn.  Make global.
	Split haifa-specific functionality into ...
	(haifa_change_pattern): New static function.
	(sched_extend_bb): New static function.
	(sched_init_bbs): New function.
	(current_sched_info): Change type to struct haifa_sched_info.
	(insn_cost): Adjust for selective scheduling.
	(dep_cost_1): New function.  Move logic from ...
	(dep_cost): ... here.
	(dep_cost): Use dep_cost_1.
	(contributes_to_priority_p): Use sched_deps_info instead of
	current_sched_info.
	(priority): Adjust to work with selective scheduling.  Process the
	corner case when all dependencies don't contribute to priority.
	(rank_for_schedule): Use ds_weak instead of dep_weak.
	(advance_state): New function.  Move logic from ...
	(advance_one_cycle): ... here.
	(add_to_note_list, concat_note_lists): New functions.
	(rm_other_notes): Make static.  Adjust for selective scheduling.
	(remove_notes, restore_other_notes): New functions.
	(move_insn): Add two arguments.  Update assert.  Don't call
	reemit_notes.
	(choose_ready): Remove lookahead variable, use dfa_lookahead.
	Remove more_issue, max_points.  Move the code to initialize
	max_lookahead_tries to max_issue.
	(schedule_block): Remove rgn_n_insns1 parameter.  Don't allocate
	ready.  Adjust use of move_insn.  Call restore_other_notes.
	(luid): Remove.
	(sched_init, sched_finish): Move Haifa-specific initialization/
	finalization to ...
	(haifa_sched_init, haifa_sched_finish): ... respectively.
	New functions.
	(setup_sched_dump): New function.
	(haifa_init_only_bb): New static function.
	(haifa_speculate_insn): New static function.
	(try_ready): Use haifa_* instead of speculate_insn and
	change_pattern.
	(extend_ready, extend_all): Remove.
	(sched_extend_ready_list, sched_finish_ready_list): New functions.
	(create_check_block_twin, add_to_speculative_block): Use
	haifa_insns_init instead of extend_global.  Update to use new
	initialization functions.  Change parameter.  Factor out code from
	create_check_block_twin to ...
	(sched_create_recovery_edges) ... this new function.
	(add_block): Remove.
	(sched_scan_info): New.
	(extend_bb): Use sched_scan_info.
	(init_bb, extend_insn, init_insn, init_insns_in_bb, sched_scan): New
	static functions for walking through scheduling region.
	(sched_luids): New vector variable to replace uid_to_luid.
	(luids_extend_insn): New function.
	(sched_max_luid): New variable.
	(luids_init_insn): New function.
	(sched_init_luids, sched_finish_luids): New functions.
	(insn_luid): New debug function.
	(sched_extend_target): New function.
	(haifa_init_insn): New static function.
	(sched_init_only_bb): New hook.
	(sched_split_block): New hook.
	(sched_split_block_1): New function.
	(sched_create_empty_bb): New hook.
	(sched_create_empty_bb_1): New function.	
	(common_sched_info, ready): New global variables.
	(current_sched_info_var): Remove.
	(move_block_after_check): Use common_sched_info.		
	(haifa_luid_for_non_insn): New static function.	
	(init_before_recovery): Use haifa_init_only_bb instead of
	add_block.
	(increase_insn_priority): New.
	* modulo-sched.c: (issue_rate): Remove static declaration.
	(sms_sched_info): Change type to haifa_sched_info.
	(sms_sched_deps_info, sms_common_sched_info): New variables.
	(setup_sched_infos): New.
	(sms_schedule): Initialize them.  Call haifa_sched_init/finish.
	Do not call regstat_free_calls_crossed.
	(sms_print_insn): Use const_rtx.
	* params.def (PARAM_MAX_PIPELINE_REGION_BLOCKS,
	PARAM_MAX_PIPELINE_REGION_INSNS, PARAM_SELSCHED_MAX_LOOKAHEAD,
	PARAM_SELSCHED_MAX_SCHED_TIMES, PARAM_SELSCHED_INSNS_TO_RENAME,
	PARAM_SCHED_MEM_TRUE_DEP_COST): New.
	* sched-deps.c (sched_deps_info): New.  Update all relevant uses of
	current_sched_info to use it.
	(enum reg_pending_barrier_mode): Move to sched-int.h.
	(h_d_i_d): New variable. Initialize to NULL.
	({true, output, anti, spec, forward}_dependency_cache): Initialize
	to NULL.
	(estimate_dep_weak): Remove static declaration.
	(sched_has_condition_p): New function.  Adjust users of
	sched_get_condition to use it instead.
	(conditions_mutex_p): Add arguments indicating which conditions are
	reversed.  Use them.
	(sched_get_condition_with_rev): Rename from sched_get_condition.  Add
	argument to indicate whether returned condition is reversed.  Do not
	generate new rtx when condition should be reversed; indicate it by
	setting new argument instead.
	(add_dependence_list_and_free): Add deps parameter.
	Update all users.  Do not free dependence list when
	deps context is readonly.
	(add_insn_mem_dependence, flush_pending_lists): Adjust for readonly
	contexts.
	(remove_from_dependence_list, remove_from_both_dependence_lists): New.
	(remove_from_deps): New. Use the above functions.	
	(cur_insn, can_start_lhs_rhs_p): New static variables.
	(add_or_update_back_dep_1): Initialize present_dep_type.
	(haifa_start_insn, haifa_finish_insn, haifa_note_reg_set,
	haifa_note_reg_clobber, haifa_note_reg_use, haifa_note_mem_dep,
	haifa_note_dep): New functions implementing dependence hooks for
	the Haifa scheduler.
	(note_reg_use, note_reg_set, note_reg_clobber, note_mem_dep,
	note_dep): New functions.
	(ds_to_dt, extend_deps_reg_info, maybe_extend_reg_info_p): New
	functions.
	(init_deps): Initialize last_reg_pending_barrier and deps->readonly.
	(free_deps): Initialize deps->reg_last.
	(sched_analyze_reg, sched_analyze_1, sched_analyze_2,
	sched_analyze_insn): Update to use dependency hooks infrastructure
	and readonly contexts.
	(deps_analyze_insn): New function.  Move part of logic from ...
	(sched_analyze): ... here.  Also move some logic to ...
	(deps_start_bb): ... here.  New function.
	(add_forw_dep, delete_forw_dep): Guard use of INSN_DEP_COUNT with
	sel_sched_p.
	(sched_deps_init): New function.  Move code from ...
	(init_dependency_caches): ... here.  Remove.
	(init_deps_data_vector): New.
	(sched_deps_finish): New function.  Move code from ...
	(free_dependency_caches): ... here.  Remove.
	(init_deps_global, finish_deps_global): Adjust for use with
	selective scheduling.
	(get_dep_weak): Move logic to ...
	(get_dep_weak_1): New function.
	(ds_merge): Move logic to ...
	(ds_merge_1): New static function.
	(ds_full_merge, ds_max_merge, ds_get_speculation_types): New functions.
	(ds_get_max_dep_weak): New function.
	* sched-ebb.c (sched_n_insns): Rename to sched_rgn_n_insns.
	(n_insns): Rename to rgn_n_insns.
	(debug_ebb_dependencies): New function.
	(init_ready_list): Use it.
	(begin_schedule_ready): Use sched_init_only_bb.
	(ebb_print_insn): Indicate when an insn starts a new cycle.
	(contributes_to_priority, compute_jump_reg_dependencies,
	add_remove_insn, fix_recovery_cfg): Add ebb_ prefix to function names.
	(add_block1): Remove to ebb_add_block.
	(ebb_sched_deps_info, ebb_common_sched_info): New variables.
	(schedule_ebb): Initialize them.  Use remove_notes instead of
	rm_other_notes.  Use haifa_local_init/finish.
	(schedule_ebbs): Use haifa_sched_init/finish.
	* sched-int.h: Include vecprim.h, remove rtl.h.
	(struct ready_list): Delete declaration.
	(sched_verbose_param, enum sched_pass_id_t,
	bb_vec_t, insn_vec_t, rtx_vec_t): New.
	(struct sched_scan_info_def): New structure.
	(sched_scan_info, sched_scan, sched_init_bbs,
	sched_init_luids, sched_finish_luids, sched_extend_target,
	haifa_init_h_i_d, haifa_finish_h_i_d): Declare.
	(struct common_sched_info_def): New.
	(common_sched_info, haifa_common_sched_info,
	sched_emulate_haifa_p): Declare.
	(sel_sched_p): New.
	(sched_luids): Declare.
	(INSN_LUID, LUID_BY_UID, SET_INSN_LUID): Declare.
	(sched_max_luid, insn_luid): Declare.
	(note_list, remove_notes, restore_other_notes, bb_note): Declare.
	(sched_insns_init, sched_insns_finish, xrecalloc, reemit_notes,
	print_insn, print_pattern, print_value, haifa_classify_insn,
	sel_find_rgns, sel_mark_hard_insn, dfa_state_size, advance_state,
	setup_sched_dump, sched_init, sched_finish,
	sel_insn_is_speculation_check): Export.
	(struct ready_list): Move from haifa-sched.c.
	(ready_try, ready, max_issue): Export.
	(ebb_compute_jump_reg_dependencies, find_fallthru_edge,
	sched_init_only_bb, sched_split_block, sched_split_block_1,
	sched_create_empty_bb, sched_create_empty_bb_1,
	sched_create_recovery_block, sched_create_recovery_edges): Export.
	(enum reg_pending_barrier_mode): Export.
	(struct deps): New fields `last_reg_pending_barrier' and `readonly'.
	(deps_t): New.
	(struct sched_info): Rename to haifa_sched_info.  Use const_rtx for
	print_insn field.  Move add_block and fix_recovery_cfg to
	common_sched_info_def.  Move compute_jump_reg_dependencies, use_cselib  ...
	(struct sched_deps_info_def): ... this new structure.
	(sched_deps_info): Declare.
	(struct spec_info_def): Remove weakness_cutoff, add
	data_weakness_cutoff and control_weakness_cutoff.
	(spec_info): Declare.
	(struct _haifa_deps_insn_data): Split from haifa_insn_data.  Add
	dep_count field.
	(struct haifa_insn_data): Rename to struct _haifa_insn_data.
	(haifa_insn_data_def, haifa_insn_data_t): New typedefs.
	(current_sched_info): Change type to struct haifa_sched_info.
	(haifa_deps_insn_data_def, haifa_deps_insn_data_t): New typedefs.
	(h_d_i_d): New variable.
	(HDID): New accessor macro.
	(h_i_d): Change type to VEC (haifa_insn_data_def, heap) *.
	(HID): New accessor macro.  Rewrite h_i_d accessor macros through HID
	and HDID.
	(IS_SPECULATION_CHECK_P): Update for selective scheduler.
	(enum SCHED_FLAGS): Update for selective scheduler.
	(enum SPEC_SCHED_FLAGS): New flag SEL_SCHED_SPEC_DONT_CHECK_CONTROL.
	(init_dependency_caches, free_dependency_caches): Delete declarations.
	(deps_analyze_insn, remove_from_deps, get_dep_weak_1,
	estimate_dep_weak, ds_full_merge, ds_max_merge, ds_weak,
	ds_get_speculation_types, ds_get_max_dep_weak, sched_deps_init,
	sched_deps_finish, haifa_note_reg_set, haifa_note_reg_use,
	haifa_note_reg_clobber, maybe_extend_reg_info_p, deps_start_bb,
	ds_to_dt): Export.
	(rm_other_notes): Delete declaration.
	(schedule_block): Remove one argument.
	(cycle_issued_insns, issue_rate, dfa_lookahead, ready_sort,
	ready_element, ready_lastpos, sched_extend_ready_list,
	sched_finish_ready_list, sched_change_pattern, sched_speculate_insn,
	concat_note_lists): Export.
	(struct region): Move from sched-rgn.h.
	(nr_regions, rgn_table, rgn_bb_table, block_to_bb, containing_rgn,
	RGN_NR_BLOCKS, RGN_BLOCKS, RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB,
	BLOCK_TO_BB, CONTAINING_RGN): Export.
	(ebb_head, BB_TO_BLOCK, EBB_FIRST_BB, EBB_LAST_BB, INSN_BB): Likewise.
	(current_nr_blocks, current_blocks, target_bb): Likewise.
	(dep_cost_1, sched_is_disabled_for_current_region_p, sched_rgn_init,
	sched_rgn_finish, rgn_setup_region, sched_rgn_compute_dependencies,
	sched_rgn_local_init, extend_regions,
	rgn_make_new_region_out_of_new_block, compute_priorities,
	debug_rgn_dependencies, free_rgn_deps, contributes_to_priority,
	extend_rgns, deps_join rgn_setup_common_sched_info,
	rgn_setup_sched_infos, debug_regions, debug_region, dump_region_dot,
	dump_region_dot_file, haifa_sched_init, haifa_sched_finish): Export.
	(get_rgn_sched_max_insns_priority, sel_add_to_insn_priority, 
	increase_insn_priority): Likewise.
	* sched-rgn.c: Include sel-sched.h.
	(ref_counts): New static variable.  Use it ...
	(INSN_REF_COUNT): ... here.  Rewrite and move closer to uses.
	(FED_BY_SPEC_LOAD, IS_LOAD_INSN): Rewrite to use HID accessor macro.
	(sched_is_disabled_for_current_region_p): Delete static declaration.
	(struct region): Move to sched-int.h.
	(nr_regions, rgn_table, rgn_bb_table, block_to_bb, containing_rgn,
	ebb_head): Define and initialize.
	(RGN_NR_BLOCKS, RGN_BLOCKS, RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB,
	BLOCK_TO_BB, CONTAINING_RGN, debug_regions, extend_regions,
	BB_TO_BLOCK, EBB_FIRST_BB, EBB_LAST_BB): Move to
	sched-int.h.
	(find_single_block_region): Add new argument to indicate that EBB
	regions should be constructed.
	(debug_live): Delete declaration.
	(current_nr_blocks, current_blocks, target_bb): Remove static qualifiers.
	(compute_dom_prob_ps, check_live, update_live, set_spec_fed): Delete
	declaration.
	(init_regions): Delete declaration.
	(debug_region, bb_in_region_p, dump_region_dot_file, dump_region_dot,
	rgn_estimate_number_of_insns): New.
	(too_large): Use estimate_number_of_insns.
	(haifa_find_rgns): New. Move the code from ...
	(find_rgns): ... here.  Call either sel_find_rgns or haifa_find_rgns.
	(free_trg_info): New.
	(compute_trg_info): Allocate candidate tables here instead of ...
	(init_ready_list): ... here.
	(rgn_print_insn): Use const_rtx.
	(contributes_to_priority, extend_regions): Delete static declaration.
	(add_remove_insn, fix_recovery_cfg): Add rgn_ to function names.
	(add_block1): Rename to rgn_add_block.
	(debug_rgn_dependencies): Delete static qualifier.
	(new_ready): Use sched_deps_info.  Simplify.
	(rgn_common_sched_info, rgn_const_sched_deps_info,
	rgn_const_sel_sched_deps_info, rgn_sched_deps_info, rgn_sched_info): New.
	(region_sched_info): Rename to rgn_const_sched_info.
	(deps_join): New, extracted from ...
	(propagate_deps): ... here.
	(compute_block_dependences, debug_dependencies): Update for selective
	scheduling.
	(free_rgn_deps, compute_priorities): New functions.
	(sched_rgn_init, sched_rgn_finish, rgn_setup_region,
	sched_rgn_compute_dependencies): New functions.
	(schedule_region): Use them.
	(sched_rgn_local_init, sched_rgn_local_free, sched_rgn_local_finish,
	rgn_setup_common_sched_info, rgn_setup_sched_infos):
	New functions.
	(schedule_insns): Call new functions that were split out.
	(rgn_make_new_region_out_of_new_block): New.
	(get_rgn_sched_max_insns_priority): New.
	(rest_of_handle_sched, rest_of_handle_sched2): Call selective
	scheduling when appropriate.
	* sched-vis.c: Include insn-attr.h.
	(print_value, print_pattern): Make global.
	(print_rtl_slim, debug_bb_slim, debug_bb_n_slim): New functions.
	* target-def.h (TARGET_SCHED_ADJUST_COST_2,
	TARGET_SCHED_ALLOC_SCHED_CONTEXT, TARGET_SCHED_INIT_SCHED_CONTEXT,
	TARGET_SCHED_SET_SCHED_CONTEXT, TARGET_SCHED_CLEAR_SCHED_CONTEXT,
	TARGET_SCHED_FREE_SCHED_CONTEXT, TARGET_SCHED_GET_INSN_CHECKED_DS,
	TARGET_SCHED_GET_INSN_SPEC_DS, TARGET_SCHED_SKIP_RTX_P): New target
	hooks.  Initialize them to 0.
	(TARGET_SCHED_GEN_CHECK): Rename to TARGET_SCHED_GEN_SPEC_CHECK.
	* target.h (struct gcc_target): Add them.  Rename gen_check field to
	gen_spec_check.
	* flags.h (sel_sched_switch_set): Declare.
	* opts.c (sel_sched_switch_set): New variable.
	(decode_options): Unset flag_sel_sched_pipelining_outer_loops if
	pipelining is disabled from command line.
	(common_handle_option): Record whether selective scheduling is
	requested from command line.
	* doc/invoke.texi: Document new flags and parameters.
	* doc/tm.texi: Document new target hooks.
	* config/ia64/ia64.c (TARGET_SCHED_GEN_SPEC_CHECK): Define to ia64_gen_check.
	(dfa_state_size): Do not declare locally.
	* config/ia64/ia64.opt (msched-ar-data-spec): Default to 0.
	* config/rs6000/rs6000.c (rs6000_init_sched_context,
	rs6000_alloc_sched_context, rs6000_set_sched_context,
	rs6000_free_sched_context): New functions.
	(struct _rs6000_sched_context): New.
	(rs6000_sched_reorder2): Do not modify INSN_PRIORITY for selective
	scheduling.
	(rs6000_sched_finish): Do not run for selective scheduling. 

Co-Authored-By: Alexander Monakov <amonakov@ispras.ru>
Co-Authored-By: Dmitry Melnik <dm@ispras.ru>
Co-Authored-By: Dmitry Zhurikhin <zhur@ispras.ru>
Co-Authored-By: Maxim Kuvyrkov <maxim@codesourcery.com>

From-SVN: r139854
2008-09-01 12:57:00 +04:00
Vladimir Makarov 058e97ecf3 [multiple changes]
2008-08-26  Vladimir Makarov  <vmakarov@redhat.com>

	* ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c,
	ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files.

	* doc/passes.texi: Describe IRA.

	* doc/tm.texi (IRA_COVER_CLASSES,
	IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros.

	* doc/invoke.texi (ira-max-loops-num): Describe the new parameter.
	(-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills,
	-fira-propagate-cost, -fno-ira-share-save-slots,
	-fno-ira-share-spill-slots, -fira-verbose): Describe new options.

	* flags.h (ira_algorithm): New enumeration.
	(flag_ira_algorithm, flag_ira_verbose): New external variable
	declarations.

	* postreload.c (gate_handle_postreload): Don't do post reload
	optimizations unless the reload is completed.

	* reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for
	IRA.

	* tree-pass.h (pass_ira): New external variable declaration.

	* reload.h: Add 2008 to the Copyright.
    
	* cfgloopanal.c: Include params.h.
	(estimate_reg_pressure_cost): Decrease cost for IRA optimization
	mode.
    
	* params.h (IRA_MAX_LOOPS_NUM): New macro.

	* toplev.c (ira.h): New include.
	(flag_ira_algorithm, flag_ira_verbose): New external variables.
	(backend_init_target): Call ira_init.
	(backend_init): Call ira_init_once.
	(finalize): Call finish_ira_once.

	* toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills,
	flag_ira_share_save_slots, flag_ira_share_spill_slots): New
	external variables.

	* regs.h (contains_reg_of_mode, move_cost, may_move_in_cost,
	may_move_out_cost): New external variable declarations.
	(move_table): New typedef.
    
	* caller-save.c: Include headers output.h and ira.h.
	(no_caller_save_reg_set): New global variable.
	(save_slots_num, save_slots): New variables.
	(reg_save_code, reg_restore_code, add_stored_regs): Add
	prototypes.
	(init_caller_save): Set up no_caller_save_reg_set.
	(init_save_areas): Reset save_slots_num.
	(saved_hard_reg): New structure.
	(hard_reg_map, saved_regs_num, all_saved_regs): New variables.
	(initiate_saved_hard_regs, new_saved_hard_reg,
	finish_saved_hard_regs, saved_hard_reg_compare_func): New
	functions.
	(setup_save_areas): Add code for sharing stack slots.
	(all_blocks): New variable.
	(save_call_clobbered_regs): Process pseudo-register too.
	(mark_set_regs): Process pseudo-register too.
	(insert_one_insn): Put the insn after bb note in a empty basic
	block.  Add insn check.
    
	* global.c (eliminable_regset): Make it external.
	(mark_elimination): Use DF_LR_IN for IRA.
	(pseudo_for_reload_consideration_p): New.
	(build_insn_chain): Make it external.  Don't ignore spilled
	pseudos for IRA.  Use pseudo_for_reload_consideration_p.
	(gate_handle_global_alloc): New function.
	(pass_global_alloc): Add the gate function.

	* opts.c (decode_options): Set up flag_ira.  Print the warning for
	-fira.
	(common_handle_option): Process -fira-algorithm and -fira-verbose.

	* timevar.def (TV_IRA, TV_RELOAD): New passes.

	* regmove.c (regmove_optimize): Don't do replacement of output for
	IRA.

	* hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses):
	New external variable declarations.

	* local-alloc.c (update_equiv_regs): Make it external.  Return
	true if jump label rebuilding should be done.  Rescan new_insn for
	notes.
	(gate_handle_local_alloc): New function.
	(pass_local_alloc): Add the gate function.

	* alias.c (value_addr_p, stack_addr_p): New functions.
	(nonoverlapping_memrefs_p): Use them for IRA.

	* common.opt (fira, fira-algorithm, fira-coalesce,
	fira-move-spills, fira-share-save-slots, fira-share-spill-slots,
	fira-verbose): New options.

	* regclass.c (reg_class_subclasses, contains_reg_of_mode,
	move_cost, may_move_in_cost, may_move_out_cost): Make the
	variables external.
	(move_table): Remove typedef.
	(init_move_cost): Make it external.
	(allocate_reg_info, resize_reg_info, setup_reg_classes): New
	functions.

	* rtl.h (init_move_cost, allocate_reg_info, resize_reg_info,
	setup_reg_classes): New function prototypes.
	(eliminable_regset): New external variable declaration.
	(build_insn_chain, update_equiv_regs): New function prototypes.
    
	* Makefile.in (IRA_INT_H): New definition.
	(OBJS-common): Add ira.o, ira-build.o, ira-costs.o,
	ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o.
	(reload1.o, toplev.o): Add dependence on ira.h.
	(cfgloopanal.o): Add PARAMS_H.
	(caller-save.o): Add dependence on output.h and ira.h.
	(ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o,
	ira-emit.o, ira-lives.o): New entries.

	* passes.c (pass_ira): New pass.

	* params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter.

	* reload1.c (ira.h): Include the header.
	(changed_allocation_pseudos): New bitmap.
	(init_reload): Initiate the bitmap.
	(compute_use_by_pseudos): Permits spilled registers in FROM.
	(temp_pseudo_reg_arr): New variable.
	(reload): Allocate and free temp_pseudo_reg_arr.  Sort pseudos for
	IRA.  Call alter_reg with the additional parameter.  Don't clear
	spilled_pseudos for IRA.  Restore original insn chain for IRA.
	Clear changed_allocation_pseudos at the end of reload.
	(calculate_needs_all_insns): Call IRA's mark_memory_move_deletion.
	(hard_regno_to_pseudo_regno): New variable.
	(count_pseudo): Check spilled pseudos.  Set up
	hard_regno_to_pseudo_regno.
	(count_spilled_pseudo): Check spilled pseudos. Update
	hard_regno_to_pseudo_regno.
	(find_reg): Use better_spill_reload_regno_p.  Check
	hard_regno_to_pseudo_regno.
	(alter_reg): Set up spilled_pseudos.  Add a new parameter.  Add
	code for IRA.
	(eliminate_regs_1): Use additional parameter for alter_reg.
	(finish_spills): Set up pseudo_previous_regs only for spilled
	pseudos.  Call reassign_pseudos once for all spilled pseudos, pass
	more arguments.  Don't clear live_throughout and dead_or_set for
	spilled pseudos.  Use additional parameter for alter_reg.  Call
	mark_allocation_change.  Set up changed_allocation_pseudos.
	Remove sanity check.
	(emit_input_reload_insns, delete_output_reload): Use additional
	parameter for alter_reg.  Call mark_allocation_change.
	(substitute, gen_reload_chain_without_interm_reg_p): New
	functions.
	(reloads_conflict): Use gen_reload_chain_without_interm_reg_p.
    
	* testsuite/gcc.dg/20080410-1.c: New file.
	
	* config/s390/s390.h (IRA_COVER_CLASSES,
	IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define.

	* config/sparc/sparc.h (IRA_COVER_CLASSES): New macro.

	* config/i386/i386.h (IRA_COVER_CLASSES): Ditto.

	* config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto.

	* config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto.

	* config/arm/arm.h (IRA_COVER_CLASSES): Ditto.
    
	* config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto.
    
	2008-08-24  Jeff Law  <law@redhat.com>
	* ira.c (setup_reg_class_intersect_union): Prefer smallest class
	when ignoring unavailable registers.

	2008-08-24  Jeff Law  <law@redhat.com>
	* ira-color.c (coalesced_pseudo_reg_slot_compare): Check
	FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD.
	* ira.c (setup_eliminable_regset): Check stack_realign_needed.
	* config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro.

	2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com>
	* ira-build.c (allocno_range_compare_func): Stabilize sort.

	2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com>
	* config/avr/avr.h (IRA_COVER_CLASSES): New macro.
	* reload1.c (find_reg): Process registers in register allocation order.

	2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk>
	* toplev.c (backend_init_target): Move ira_init call from
	here...
	(lang_dependent_init_target): ...to here.

	2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk>
	* ira.c (setup_class_subset_and_memory_move_costs): Don't
	calculate memory move costs for NO_REGS.

	2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org>
	* ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if
	STACK_REGS is defined.

	2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com>
	* config/spu/spu.h (IRA_COVER_CLASSES): New macro.

	2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com>
	* config/bfin/bfin.h (IRA_COVER_CLASSES): New macro.

	2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org>
	* config/sh/sh.h (IRA_COVER_CLASSES): Define.
	* config/sh/sh.md (movsicc_true+3): Check if emit returns a
	barrier.

From-SVN: r139590
2008-08-26 12:39:58 +00:00
Eric Botcazou b38f3813f7 re PR middle-end/20548 (ACATS c52103x c52104x c52104y segfault)
PR ada/20548
	* common.opt (-fstack-check): Do not declare the variable here.
	(-fstack-check=): New option variant.
	* doc/invoke.texi (Code Gen Options): Document it.
	* expr.h (STACK_OLD_CHECK_PROTECT): New macro.
	(STACK_CHECK_PROTECT): Bump to 3 pages if DWARF-2 EH is used.
	(STACK_CHECK_STATIC_BUILTIN): New macro.
	* doc/tm.texi (Stack Checking): Document STACK_CHECK_STATIC_BUILTIN.
	* opts.c: Include expr.h.
	(common_handle_option) <OPT_fold_stack_check_>: New case.
	<OPT_fstack_check>: Likewise.
	* calls.c (initialize_argument_information): Use TYPE_SIZE_UNIT
	consistently in the test for variable-sized types.  Adjust for
	new behaviour of flag_stack_check.
	* explow.c: Include except.h.
	(allocate_dynamic_stack_space): Do not take into account
	STACK_CHECK_MAX_FRAME_SIZE for static builtin stack checking.
	* function.c (gimplify_parameters): Use DECL_SIZE_UNIT in the test
	for variable-sized parameters.  Treat all parameters whose size is
	greater than STACK_CHECK_MAX_VAR_SIZE as variable-sized if generic
	stack checking is enabled.
	* gimplify.c (gimplify_decl_expr): Treat non-static objects whose
	size is greater than STACK_CHECK_MAX_VAR_SIZE as variable-sized
	if generic stack checking is enabled.
	(expand_function_end): Adjust for new behaviour of flag_stack_check.
	* reload1.c (reload): Likewise.
	* stmt.c (expand_decl): Assert that all automatic variables have
	fixed size at this point and remove dead code.
	* flags.h (stack_check_type): New enumeration type.
	(flag_stack_check): Declare.
	* toplev.c (flag_stack_check): New global variable.
	* Makefile.in (opts.o): Add dependency on EXPR_H.
	(explow.o): Add dependency on except.h.
ada/
	* gcc-interface/decl.c (gnat_to_gnu_entity): Use DECL_SIZE_UNIT in the
	setjmp test consistently.  Adjust for new behaviour of flag_stack_check.
	* gcc-interface/utils2.c (build_call_alloc_dealloc): Remove redundant
	test of flag_stack_check.  Adjust for new behaviour of flag_stack_check.

From-SVN: r139159
2008-08-16 18:40:57 +00:00
Ulrich Weigand 4099e2c2bb real.h (struct real_format): New member has_sign_dependent_rounding.
* real.h (struct real_format): New member has_sign_dependent_rounding.
	* real.c (ieee_single_format, mips_single_format, motorola_single_format,
	spu_single_format, ieee_double_format, mips_double_format,
	motorola_double_format, ieee_extended_motorola_format,
	ieee_extended_intel_96_format, ieee_extended_intel_128_format,
	ieee_extended_intel_96_round_53_format, ibm_extended_format,
	mips_extended_format, ieee_quad_format, mips_quad_format,
	vax_f_format, vax_d_format, vax_g_format): Initialize it.
	* config/pdp11/pdp11.c (pdp11_f_format, pdp11_d_format): Likewise.

	* defaults.h (MODE_HAS_NANS, MODE_HAS_INFINITIES,
	MODE_HAS_SIGNED_ZEROS, MODE_HAS_SIGN_DEPENDENT_ROUNDING): Remove.
	* config/spu/spu.h (MODE_HAS_NANS, MODE_HAS_INFINITIES,
	MODE_HAS_SIGN_DEPENDENT_ROUNDING): Remove.
	(ROUND_TOWARDS_ZERO): Likewise.

	* real.h (REAL_MODE_FORMAT): Protect MODE against macro expansion.
	(FLOAT_MODE_FORMAT): New macro.
	(REAL_MODE_FORMAT_COMPOSITE_P): Remove, replace by ...
	(MODE_COMPOSITE_P): ... this new macro.
	(MODE_HAS_NANS, MODE_HAS_INFINITIES, MODE_HAS_SIGNED_ZEROS,
	MODE_HAS_SIGN_DEPENDENT_ROUNDING): New macros.
	* machmode.h (GET_MODE_INNER): Cast result to enum machine_mode.

	* flags.h: Include "real.h".

	* fold-const.c (const_binop): Use MODE_COMPOSITE_P instead of
	REAL_MODE_FORMAT_COMPOSITE_P.
	* simplify-rtx.c (simplify_const_binary_operation): Likewise.

	* doc/tm.texi (Storage Layout): Remove documentation of
	MODE_HAS_NANS, MODE_HAS_INFINITIES, MODE_HAS_SIGNED_ZEROS,
	MODE_HAS_SIGN_DEPENDENT_ROUNDING.  Update documentation of
	ROUND_TOWARDS_ZERO and LARGEST_EXPONENT_IS_NORMAL to clarify
	they only apply to libgcc2.a.

From-SVN: r139016
2008-08-12 13:25:22 +00:00
Manuel López-Ibáñez e73f7547c5 re PR c/28875 ("-Wextra -Wno-unused-parameter -Wall" doesn't work as expected)
2008-08-08  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR 28875
	* flags.h (set_Wunused): Delete
	* toplev.c (process_options): Handle Wunused flags here.
	* opts.c (maybe_warn_unused_parameter): Delete.
	(common_handle_option): Replace set_Wunused by warn_unused.
	(set_Wextra): Do not handle Wunused-parameter here.
	(set_Wunused): Delete.
	* c-opts.c (c_common_handle_option): Replace set_Wunused by
	warn_unused.
	* common.opt (Wunused): Add Var and Init.
	(Wunused-function): Likewise.
	(Wunused-label): Likewise.
	(Wunused-parameter): Likewise.
	(Wunused-value): Likewise.
	(Wunused-variable): Likewise.
fortran/
	* options.c (set_Wall): Replace set_Wunused by warn_unused.
java/	
	* lang.c (java_handle_option): Replace set_Wunused with
	warn_unused.
testsuite/
	* gcc.dg/unused-6-no.c: New.
	* gcc.dg/unused-6-WallWextra.c: New.

From-SVN: r138890
2008-08-08 23:15:31 +00:00
Jan Hubicka e90acd935a flags.h (flag_really_no_inline): Remove.
* flags.h (flag_really_no_inline): Remove.
	* cgraph.c (cgraph_function_possibly_inlined_p): Simplify.
	* toplev.c (flag_really_no_inline): Remove.
	* c-cppbuiltin.c (c_cpp_builtins): Use flag_no_inline.
	* ipa-inline.c (cgraph_decide_inlining): Do not check flag_no_inline.
	(cgraph_decide_inlining_incrementally): Likewise.
	(compute_inline_parameters): Likewise.
	* opts.c (decode_options): Simplify.
	* c-opts.c (c_common_post_options): Do not set flag_no_inline.
	* common.opt (finline): Initialize to 1.
	* tree-inline.c (inlinable_function_p): Check flag_no_inline.

	* lang.c (java_post_options): Remove handling of flag_no_inline.

	* misc.c (gnat_post_options): Do not set flag_no_inline.

	* options.c (gfc_post_options): Do not set flag_no_inline.

From-SVN: r138238
2008-07-29 11:00:58 +00:00
Rafael Avila de Espindola aa14403d28 Makefile.in: Replace toplev.h with TOPLEV_H.
2007-07-21  Rafael Avila de Espindola  <espindola@google.com>

	* Makefile.in: Replace toplev.h with TOPLEV_H.
	* c-decl.c (merge_decls): Don't set DECL_IN_SYSTEM_HEADER.
	* c-lex.c (fe_file_change): Don't set in_system_header.
	* c-parser.c (c_token): Remove in_system_header.
	(c_lex_one_token): Don't set in_system_header.
	(c_parser_set_source_position_from_token): Don't set in_system_header.
	* diagnostic.c (diagnostic_report_diagnostic): Use location from
	diagnostic_info.
	(warning_at): New.
	* diagnostic.h (diagnostic_report_warnings_p): Add LOC argument.
	* flags.h (in_system_header): Remove.
	* function.c (saved_in_system_header): Remove.
	(push_cfun): Don't set in_system_header.
	(pop_cfun): Don't set in_system_header.
	(push_struct_function): Don't set in_system_header.
	* input.h (expanded_location): Add sysp.
	(in_system_header_at): New.
	(in_system_header): New.
	* toplev.c (in_system_header): Remove.
	* toplev.h: Include input.h
	(warning_at): New.
	* tree-cfg.c (execute_warn_function_return): Call warning_at.
	* tree-ssa.c (warn_uninit): Call warning_at.
	(warn_uninitialized_var): Update calls to warn_uninit.
	(warn_uninitialized_phi): Update calls to warn_uninit.
	* tree.c (make_node_stat): Don't set DECL_IN_SYSTEM_HEADER.
	(expand_location): Initialize xloc.sysp.
	* tree.h (DECL_IN_SYSTEM_HEADER): Use in_system_header_at.
	(tree_decl_with_vis): Remove in_system_header_flag.

2007-07-21  Rafael Avila de Espindola  <espindola@google.com>

	* parser.c (cp_token): Remove in_system_header.
	(eof_token): Remove in_system_header.
	(cp_lexer_get_preprocessor_token): Don't set in_system_header.
	(cp_lexer_set_source_position_from_token): Don't set in_system_header.
	(cp_parser_member_declaration):  Use in_system_header_at.
	* pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
	(pop_tinst_level): Don't set in_system_header.
	(instantiate_class_template): Don't set in_system_header.
	(instantiate_decl): Don't set in_system_header.
	(instantiate_pending_templates): Don't set in_system_header.

From-SVN: r138031
2008-07-21 14:29:27 +00:00
Raksit Ashok 1ebc7e6810 invoke.texi (Option Summary): Mention new option -Wdisallowed-function-list=...
2008-07-09  Raksit Ashok <raksit@google.com>

	* doc/invoke.texi (Option Summary): Mention new option
	-Wdisallowed-function-list=...
	(Warning Options): Document -Wdisallowed-function-list=...
	* common.opt (Wdisallowed-function-list=): New flag.
	* flags.h (warn_disallowed_functions): External definition of new
	boolean warning flag.
	(warn_if_disallowed_function_p): Declare new function.
	* opts.c (warning_disallowed_functions): New static variable.
	(warn_disallowed_functions): New boolean warning flag.
	(warn_if_disallowed_function_p): New function.
	(add_comma_separated_to_vector): Rename
	add_instrument_functions_exclude_list to this.
	(common_handle_option): Handle new option. Rename calls to
	add_instrument_functions_exclude_list into calls to
	add_comma_separated_to_vector.
	* c-parser.c (c_parser_postfix_expression_after_primary): New warning
	based on flag warn_disallowed_functions.


gcc/cp/ChangeLog

2008-07-09  Raksit Ashok <raksit@google.com>

	* parser.c (cp_parser_postfix_expression): New warning based on flag
	warn_disallowed_functions.


gcc/testsuite/ChangeLog

2008-07-09  Raksit Ashok <raksit@google.com>

	* gcc.dg/wdisallowed-functions-1.c: New test.
	* gcc.dg/wdisallowed-functions-2.c: New test.
	* g++.dg/warn/Wdisallowed-functions-1.C: New test.
	* g++.dg/warn/Wdisallowed-functions-2.C: New test.

From-SVN: r137655
2008-07-09 08:23:48 +00:00
H.J. Lu 3bffa1954c final.c (frame_pointer_needed): Removed.
2008-05-25  H.J. Lu  <hongjiu.lu@intel.com>

	* final.c (frame_pointer_needed): Removed.
	* flags.h (frame_pointer_needed): Likewise.

	* function.h (rtl_data): Add frame_pointer_needed.
	(frame_pointer_needed): New.

From-SVN: r135870
2008-05-25 09:24:43 -07:00