aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.h
AgeCommit message (Collapse)AuthorFilesLines
2013-08-05Handwritten part of conversion of passes to C++ classesDavid Malcolm1-1/+0
gcc/ * Makefile.in (PASS_MANAGER_H): Add dep on pass-instances.def. (toplev.o): Add dep on PASS_MANAGER_H. * cgraphunit.c (cgraph_process_new_functions): Rework invocation of early local pases to reflect this moving from a global to a member of gcc::pass_manager. (cgraph_add_new_function): Likewise. * lto-cgraph.c (lto_output_node): Update for conversion of struct ipa_opt_pass_d to a C++ subclass of opt_pass. * passes.c (opt_pass::clone): New. (opt_pass::gate): New. (opt_pass::execute): New. (opt_pass::opt_pass): New. (pass_manager::execute_early_local_passes): New. (pass_manager::execute_pass_mode_switching): new. (finish_optimization_passes): Convert to... (pass_manager::finish_optimization_passes): ...this. (finish_optimization_passes): Update for conversion of passes to C++ classes. (register_dump_files_1): Use has_gate since we cannot portably check a vtable entry against NULL. (dump_one_pass): Likewise. (ipa_write_summaries_2): Likewise. (ipa_write_optimization_summaries_1): Likewise. (ipa_read_summaries_1): Likewise. (ipa_read_optimization_summaries_1): Likewise. (execute_ipa_stmt_fixups): Likewise. (pass_manager::pass_manager): Rewrite pass-creation, invoking pass-creation functions rather than wiring up globals, and storing the results in fields of pass_manager generated using pass-instances.def. (pass_manager::dump_profile_report): Update for conversion of passes to C++ classes. (pass_manager::execute_ipa_summary_passes): Likewise. (execute_one_ipa_transform_pass): Likewise. (execute_one_pass): Use has_gate and has_execute since we cannot portably check a vtable entry against NULL. * pass_manager.h (pass_manager::finish_optimization_passes): New. (pass_manager): Use pass-instances.def to add fields for the various pass instances. * toplev.c (finalize): Update for move of finish_optimization_passes to a method of gcc::pass_manager. * toplev.h (finish_optimization_passes): Move to method of class pass_manager. * tree-pass.h (struct pass_data): New. (opt_pass): Convert to C++ class, make it a subclass of pass_data. (opt_pass::gate): Convert to virtual function. (opt_pass::~opt_pass): New. (opt_pass::clone): New. (opt_pass::execute): Convert to virtual function. (opt_pass::opt_pass): New. (opt_pass::ctxt_): new. (gimple_opt_pass): Convert to subclass of opt_pass. (gimple_opt_pass::gimple_opt_pass): New. (rtl_opt_pass): Convert to subclass of opt_pass. (rtl_opt_pass::rtl_opt_pass): New. (ipa_opt_pass_d): Convert to subclass of opt_pass. (ipa_opt_pass_d::ipa_opt_pass_d): New. (simple_ipa_opt_pass): Convert to subclass of opt_pass. (simple_ipa_opt_pass::simple_ipa_opt_pass): New. * config/i386/i386.c (rest_of_handle_insert_vzeroupper): Rework invocation of pass_mode_switching to reflect this moving from a global to a member of gcc::pass_manager. (ix86_option_override): Rework how pass_insert_vzeroupper is added to the pass_manager to reflect autogenerated changes. * config/i386/t-i386 (i386.o) Add deps on CONTEXT_H and PASS_MANAGER_H. gcc/testsuite/ * g++.dg/plugin/dumb_plugin.c (plugin_init): Rework how the pass is created and added to the pass_manager to reflect autogenerated changes. * g++.dg/plugin/selfassign.c (plugin_init): Likewise. * gcc.dg/plugin/one_time_plugin.c (plugin_init): Likewise. * gcc.dg/plugin/selfassign.c (plugin_init): Likewise. From-SVN: r201505
2013-01-10Update copyright years in gcc/Richard Sandiford1-3/+1
From-SVN: r195098
2013-01-04Update Copyright years for files modified in 2011 and/or 2012.Jakub Jelinek1-1/+1
From-SVN: r194903
2012-10-06invoke.texi (-fprofile-report): Document.Jan Hubicka1-0/+1
* doc/invoke.texi (-fprofile-report): Document. * common.opt (-fprofile-report): New option. * toplev.c (finalize): Call dump_profile_report. * toplev.h (profile_report): Declare. * passes.c (profile_record): New static var. (check_profile_consistency): New function. (dump_profile_record): New function. (execute_one_ipa_transform_pass): Call check_profile_consistency. (execute_one_pass): Likewise. From-SVN: r192161
2012-04-10toplev.h (tree_rest_of_compilation): Remove.Richard Guenther1-1/+0
2012-04-10 Richard Guenther <rguenther@suse.de> * toplev.h (tree_rest_of_compilation): Remove. * tree-optimize.c (tree_rest_of_compilation): Likewise. * cgraph.h (tree_rest_of_compilation): Declare. * tree-optimize.c (tree_rest_of_compilation): Move ... * cgraphunit.c (tree_rest_of_compilation): ... here. * cgraph.c (cgraph_add_new_function): Adjust. * Makefile.in (tree-optimize.o): Adjust. (cgraphunit.o): Likewise. From-SVN: r186274
2011-09-29Change random seeds to 64bit and drop re-crcingAndi Kleen1-1/+1
I had some trouble with random build failures in a large LTO project and it turned out to be random seed collisions in a highly parallel build (thanks to Honza for suggesting that) There were multiple problems: - The way to generate the random seed is not very random (milliseconds time plus pid) and prone to collisions on highly parallel builds - It's only 32bit - Several users take the existing ascii seed and re-CRC32 it again, which doesn't exactly improve it. This patch changes that to: - Always use 64bit seeds as numbers (no re-crcing) - Change all users to use HOST_WIDE_INT - When the user specifies a random seed it's still crc32ed, but only in this case. Passes bootstrap + testsuite on x86_64-linux. gcc/cp: 2011-09-26 Andi Kleen <ak@linux.intel.com> * repo.c (finish_repo): Use HOST_WIDE_INT_PRINT_HEX_PURE. gcc/: 2011-09-26 Andi Kleen <ak@linux.intel.com> * hwint.h (HOST_WIDE_INT_PRINT_HEX_PURE): Add. * lto-streamer.c (lto_get_section_name): Remove crc32_string. Handle numerical random seed. * lto-streamer.h (lto_file_decl_data): Change id to unsigned HOST_WIDE_INT. * toplev.c (random_seed): Add. (init_random_seed): Change for numerical random seed. (get_random_seed): Return as HOST_WIDE_INT. (set_random_seed): Crc32 existing string. * toplev.h (get_random_seed): Change to numercal return. * tree.c (get_file_function_name): Remove CRC. Handle numerical random seed. gcc/lto/: 2011-09-26 Andi Kleen <ak@linux.intel.com> * lto.c (lto_resolution_read): Remove id dumping. (lto_section_with_id): Turn id HOST_WIDE_ID. (create_subid_section_table): Dito. From-SVN: r179347
2010-12-01common.opt (main_input_filename, [...]): New Variable entries.Joseph Myers1-19/+0
* common.opt (main_input_filename, main_input_basename, main_input_baselength): New Variable entries. From toplev.c. * final.c (output_quoted_string): Move from toplev.c. * output.h (output_quoted_string): Move from toplev.h. * opts-global.c (read_cmdline_options): Use gcc_options pointer to access main_input_filename, main_input_baselength and main_input_basename. * targhooks.c: Include intl.h and opts.h. (option_affects_pch_p, default_get_pch_validity): Move from toplev.c. * targhooks.h (option_affects_pch_p, default_get_pch_validity): Move from toplev.h. * toplev.c (main_input_filename, main_input_basename, main_input_baselength): Move to common.opt. (output_quoted_string): Move to final.c. (warn_deprecated_use): Move to tree.c. (option_affects_pch_p, default_get_pch_validity, pch_option_mismatch, default_pch_valid_p): Move to targhooks.c. * toplev.h (skip_leading_substring): Move to tree-dump.c. (warn_deprecated_use): Move to tree.h. (output_quoted_string): Move to output.h. (main_input_filename, main_input_basename, main_input_baselength): Move to common.opt. (default_get_pch_validity, default_pch_valid_p): Move to targhooks.c. * tree-dump.c (skip_leading_substring): Move from toplev.h. * tree.c (warn_deprecated_use): Move from toplev.c. * tree.h (warn_deprecated_use): Move from toplev.h. * c-typeck.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c, config/cris/cris.c, config/crx/crx.c, config/fr30/fr30.c, config/frv/frv.c, config/h8300/h8300.c, config/ia64/ia64.c, config/iq2000/iq2000.c, config/lm32/lm32.c, config/m32c/m32c.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/mcore/mcore.c, config/mep/mep.c, config/microblaze/microblaze.c, config/mips/mips.c, config/mmix/mmix.c, config/mn10300/mn10300.c, config/moxie/moxie.c, config/pa/pa.c, config/pdp11/pdp11.c, config/picochip/picochip.c, config/s390/s390.c, config/score/score.c, config/sh/sh.c, config/sparc/sparc.c, config/spu/spu.c, config/stormy16/stormy16.c, config/v850/v850.c, config/vax/vax.c, config/xtensa/xtensa.c, gimple-low.c, graphite-sese-to-poly.c, plugin.c, tree-cfg.c, tree-inline.c, varasm.c, xcoffout.c: Don't include toplev.h. * Makefile.in (c-typeck.o, tree-inline.o, tree-cfg.o, gimple-low.o, graphite-sese-to-poly.o, targhooks.o, plugin.o, varasm.o, xcoffout.o): Update dependencies. * config/arm/t-arm (arm.o): Update dependencies. * config/spu/t-spu-elf (spu.o): Update dependencies. cp: * cp-objcp-common.c, lex.c, typeck.c: Don't include toplev.h. * Make-lang.in (cp/lex.o, cp/cp-objcp-common.o, cp/typeck2.o): Update dependencies. java: * jcf-parse.c: Don't include toplev.h. * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h. From-SVN: r167329
2010-11-30hwint.c: New.Joseph Myers1-70/+0
* hwint.c: New. Extracted from toplev.c. * hwint.h (clz_hwi, ctz_hwi, ffs_hwi, exact_log2, floor_log2): Move from toplev.h. * toplev.c (clz_hwi, ctz_hwi, ffs_hwi, exact_log2, floor_log2): Move to hwint.c. * toplev.h (clz_hwi, ctz_hwi, ffs_hwi, exact_log2, floor_log2): Move to hwint.h. * builtins.c, combine.c, config/i386/winnt.c, double-int.c, explow.c, expmed.c, fold-const.c, ggc-page.c, ggc-zone.c, ifcvt.c, ipa-struct-reorg.c, ira-color.c, matrix-reorg.c, omp-low.c, real.c, recog.c, reload.c, rtlanal.c, simplify-rtx.c, stor-layout.c, tree-dfa.c, tree-ssa-alias.c, tree-ssa-loop-niter.c, tree-vect-data-refs.c, tree-vect-loop-manip.c, tree-vect-loop.c, tree-vect-stmts.c, tree-vrp.c: Don't include toplev.h. * genattrtab.c, genconditions.c, genemit.c, genextract.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c: Don't include toplev.h in generated output. * Makefile.in (OBJS-common): Add hwint.o. Dependencies for above files changed to remove toplev.h. (hwint.o): New. (insn-attrtab.o, insn-emit.o, insn-extract.o, insn-output.o, insn-peep.o, insn-preds.o, insn-recog.o): Don't depend on toplev.h. * config/i386/t-cygming (winnt.o): Don't depend on toplev.h. * config/i386/t-interix (winnt.o): Don't depend on toplev.h. fortran: * trans-common.c: Don't include toplev.h. java: * boehm.c: Don't include toplev.h. * Make-lang.in (java/boehm.o): Don't depend on toplev.h. lto: * lto-object.c: Don't include toplev.h. * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h. From-SVN: r167301
2010-11-30diagnostic-core.h: Include bversion.h.Joseph Myers1-3/+0
* diagnostic-core.h: Include bversion.h. * toplev.h: Don't include input.h or bversion.h. (parse_optimize_options): Don't declare here. * alias.c, auto-inc-dec.c, c-aux-info.c, c-convert.c, c-parser.c, caller-save.c, cfg.c, cfganal.c, cfgbuild.c, cfgcleanup.c, combine-stack-adj.c, config/arm/pe.c, config/darwin-c.c, config/host-darwin.c, config/i386/host-cygwin.c, config/i386/host-mingw32.c, config/i386/msformat-c.c, config/i386/netware.c, config/i386/nwld.c, config/i386/winnt-cxx.c, config/i386/winnt-stubs.c, config/ia64/ia64-c.c, config/m32c/m32c-pragma.c, config/mep/mep-pragma.c, config/microblaze/microblaze-c.c, config/rs6000/host-darwin.c, config/rs6000/rs6000-c.c, config/score/score3.c, config/score/score7.c, config/sh/symbian-base.c, config/sh/symbian-c.c, config/sh/symbian-cxx.c, config/sol2-c.c, config/sol2.c, config/v850/v850-c.c, config/vxworks.c, convert.c, cppbuiltin.c, cselib.c, dbgcnt.c, ddg.c, dfp.c, dominance.c, emit-rtl.c, fixed-value.c, fwprop.c, ggc-common.c, gimple.c, gimplify.c, graphite-blocking.c, graphite-clast-to-gimple.c, graphite-dependences.c, graphite-flattening.c, graphite-interchange.c, graphite-poly.c, graphite-scop-detection.c, graphite.c, haifa-sched.c, implicit-zee.c, integrate.c, ipa-pure-const.c, ipa-reference.c, ira-build.c, ira-conflicts.c, ira-costs.c, ira-lives.c, jump.c, lists.c, loop-doloop.c, loop-iv.c, lto-cgraph.c, lto-compress.c, lto-opts.c, lto-section-in.c, lto-section-out.c, lto-streamer-out.c, lto-symtab.c, modulo-sched.c, optabs.c, params.c, postreload-gcse.c, postreload.c, predict.c, profile.c, regcprop.c, reginfo.c, regmove.c, reorg.c, resource.c, sched-deps.c, sched-ebb.c, sched-rgn.c, sdbout.c, sel-sched-dump.c, sel-sched-ir.c, sese.c, stmt.c, targhooks.c, tree-cfgcleanup.c, tree-mudflap.c, tree-nomudflap.c, tree-object-size.c, tree-outof-ssa.c, tree-phinodes.c, tree-profile.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-live.c, tree-ssa-loop-prefetch.c, tree-ssa-loop.c, tree-ssa-operands.c, tree-ssa-structalias.c, tree-ssa-uninit.c, tree-vect-patterns.c, value-prof.c, var-tracking.c, web.c: Don't include toplev.h. * Makefile.in (TOPLEV_H): Remove. All uses changed to use toplev.h. Dependencies for above files and c-family files changed to remove $(TOPLEV_H) or toplev.h. (C_TREE_H): Don't include $(TOPLEV_H). (DIAGNOSTIC_CORE_H): Use $(INPUT_H) instead of input.h. Add bversion.h. * config/arm/t-pe, config/arm/t-wince-pe, config/i386/t-cygming, config/ia64/t-ia64, config/mep/t-mep, config/score/t-score-elf, config/t-darwin, config/t-sol2, config/t-vxworks, config/v850/t-v850, config/v850/t-v850e: Dependencies for above files changed to remove $(TOPLEV_H) or toplev.h. c-family: * c-common.h (parse_optimize_options): Declare. * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c, c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h. cp: * cp-gimplify.c, cp-lang.c, cvt.c, cxx-pretty-print.c, error.c, except.c, expr.c, friend.c, init.c, mangle.c, name-lookup.c, optimize.c, parser.c, rtti.c, tree.c, typeck2.c: Don't include toplev.h. * Make-lang.in: Dependencies for above files changed to remove toplev.h. java: * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c, verify-glue.c: Don't include toplev.h. * Make-lang.in: Dependencies for above files changed to remove toplev.h. lto: * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of $(TOPLEV_H). From-SVN: r167293
2010-11-24flag-types.h (struct visibility_flags): Don't declare here.Joseph Myers1-8/+0
* 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-22common.opt (exit_after_options, [...]): New Variable entries.Joseph Myers1-4/+1
* 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-19common.opt (debug_struct_ordinary, [...]): New Variable entries.Joseph Myers1-0/+2
* 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-10common.opt (flag_excess_precision_cmdline, [...]): New Variable declarations.Joseph Myers1-5/+0
* 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-10-16opts.c (set_fast_math_flags, [...]): Make static.Joseph Myers1-7/+0
* opts.c (set_fast_math_flags, set_unsafe_math_optimizations_flags): Make static. * toplev.h (set_fast_math_flags, set_unsafe_math_optimizations_flags): Remove prototypes. From-SVN: r165540
2010-09-28re PR fortran/40569 (F2008: Support COMPILER_OPTIONS() / COMPILER_VERSION())Tobias Burnus1-0/+4
gcc/ 2010-09-28 Tobias Burnus <burnus@net-b.de> PR fortran/40569 PR fortran/40568 * toplev.h (save_decoded_options, save_decoded_options_count): New global variables. * toplev.c (save_decoded_options, save_decoded_options_count): export variables. gcc/fortran/ 2010-09-28 Tobias Burnus <burnus@net-b.de> PR fortran/40569 PR fortran/40568 * intrinsic.c (add_functions): Make compiler_version and compiler_options CLASS_INQUIRY. * gfortran.h (gfc_get_option_string): New prototype. * intrinsic.texi (COMPILER_VERSION, COMPILER_OPTIONS): Add documentation. (C_SIZEOF): Mark as inquiry function of ISO_C_BINDING. (ISO_FORTRAN_ENV): Refer to COMPILER_VERSION and COMPILER_OPTIONS. (ISO_C_BINDING): Refer to C_SIZEOF. * options.c (gfc_get_option_string): New function. * simplify.c (gfc_simplify_compiler_options): Use it. (gfc_simplify_compiler_version): Include compiler name. From-SVN: r164698
2010-08-05Replace exact_log2(x & -x) in favor of more direct computation.Richard Henderson1-8/+42
* toplev.h (ctz_hwi, clz_hwi, ffs_hwi): New. (floor_log2): Use clz_hwi. (exact_log2): Use ctz_hwi. * toplev.c (ctz_hwi, clz_hwi, ffs_hwi): New. * builtins.c (fold_builtin_bitop): Use them. * simplify-rtx.c (simplify_const_unary_operation): Likewise. * combine.c (get_pos_from_mask): Use ctz_hwi. * double-int.c (double_int_ctz): Likewise. * explow.c (force_reg): Likewise. * tree.h (SET_DECL_OFFSET_ALIGN): Use ffs_hwi. From-SVN: r162920
2010-07-26target.def (output_source_filename): New hook.Anatoly Sokolov1-1/+0
* target.def (output_source_filename): New hook. * doc/tm.texi.in (TARGET_ASM_OUTPUT_SOURCE_FILENAME): Document. * doc/tm.texi: Regenerate. * toplev.c (output_file_directive) Remove function. * toplev.h (output_file_directive) Remove. * output.h (default_asm_output_source_filename, output_file_directive): Declare. * varasm.h (default_asm_output_source_filename, output_file_directive): New functions. * config/mips/mips.h (ASM_OUTPUT_SOURCE_FILENAME): Remove macro. * config/mips/mips-protos.h (mips_output_filename): Remove. * config/mips/mips.c (mips_output_filename): Make Static. (TARGET_ASM_OUTPUT_SOURCE_FILENAME): Define. From-SVN: r162542
2010-07-08toplev.h: Do not include diagnostic-core.h.Manuel López-Ibáñez1-1/+0
2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org> * toplev.h: Do not include diagnostic-core.h. Include diagnostic-core.h in every file that includes toplev.h. * c-tree.h: Do not include toplev.h. * pretty-print.h: Update comment. * Makefile.in: Update dependencies. * alias.c: Include diagnostic-core.h in every file that includes toplev.h. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * combine.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/arm.c: Likewise. * config/arm/pe.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/cris/cris.c: Likewise. * config/crx/crx.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/h8300/h8300.c: Likewise. * config/host-darwin.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/netware.c: Likewise. * config/i386/nwld.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/i386/winnt-stubs.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c-pragma.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68hc11/m68hc11.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep-pragma.c: Likewise. * config/mep/mep.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/picochip/picochip.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390.c: Likewise. * config/score/score.c: Likewise. * config/score/score3.c: Likewise. * config/score/score7.c: Likewise. * config/sh/sh.c: Likewise. * config/sh/symbian-base.c: Likewise. * config/sh/symbian-c.c: Likewise. * config/sh/symbian-cxx.c: Likewise. * config/sol2-c.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/v850/v850-c.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. * convert.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbxout.c: Likewise. * ddg.c: Likewise. * dominance.c: Likewise. * emit-rtl.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * fwprop.c: Likewise. * gcse.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * gimple-low.c: Likewise. * gimplify.c: Likewise. * graph.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * implicit-zee.c: Likewise. * integrate.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-iv.c: Likewise. * lto-opts.c: Likewise. * lto-symtab.c: Likewise. * main.c: Likewise. * modulo-sched.c: Likewise. * optabs.c: Likewise. * params.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtlanal.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * simplify-rtx.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * targhooks.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-inline.c: Likewise. * tree-nomudflap.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-phinodes.c: Likewise. * tree-profile.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vrp.c: Likewise. * varasm.c: Likewise. * vec.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. c-family/ * c-common.h: Include diagnostic-core.h. Error if already included. * c-semantics.c: Do not define GCC_DIAG_STYLE here. cp/ * cp-tree.h: Do not include toplev.h. java/ * boehm.c: Include diagnostic-core.h in every file that includes toplev.h. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * jcf-parse.c: Likewise. * mangle.c: Likewise. * mangle_name.c: Likewise. * resource.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. ada/ * gcc-interface/utils.c: Include diagnostic-core.h in every file that includes toplev.h. lto/ * lto-coff.c: Include diagnostic-core.h in every file that includes toplev.h. * lto-elf.c: Likewise. * lto-lang.c: Likewise. * lto-macho.c: Likewise. From-SVN: r161943
2010-06-30toplev.h (_fatal_insn_not_found, [...]): Move declarations to rtl.h.Manuel López-Ibáñez1-12/+0
2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org> * toplev.h (_fatal_insn_not_found, _fatal_insn): Move declarations to rtl.h. (error_for_asm, warning_for_asm): Move declarations to rtl-error.h. * rtl.h (_fatal_insn_not_found, _fatal_insn): Move declarations here. * rtl-error.h: New. * regrename.c: Do not include toplev.h. Include rtl-error.h. * rtl-error.c: Likewise. * reload.c: Likewise. * recog.c: Likewise. * sel-sched.c: Likewise. * function.c: Likewise. * reg-stack.c: Likewise. * cfgrtl.c: Likewise. * reload1.c: Likewise. * final.c: Include rtl-error. * Makefile.in: Adjust dependencies. From-SVN: r161617
2010-06-28system.h: Poison GCC_EXCEPT_H for front-end files.Steven Bosscher1-0/+5
gcc/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * system.h: Poison GCC_EXCEPT_H for front-end files. * langhooks.h (struct lang_hooks): Add eh_protect_cleanup_actions langhook. * langhooks-def.h (LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS) New. Define to NULL by default. * except.h: Define GCC_EXCEPT_H. (doing_eh): Remove prototype. (init_eh, init_eh_for_function): Move prototypes to toplev.h. (lang_protect_cleanup_actions): Remove. * except.c (lang_protect_cleanup_actions): Remove. (doing_eh): Remove. (gen_eh_region): Don't check doing_eh here. * toplev.h (init_eh, init_eh_for_function_): Moved from except.h. * tree-eh.c (honor_protect_cleanup_actions): Use new langhook instead of lang_protect_cleanup_actions. * omp-low.c (maybe_catch_exception): Likewise. * Makefile.in: Update dependencies. gcc/c-family/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * c-cppbuiltin.c: Do not include except.h. gcc/objc/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * objc-act.c: Do not include except.h. gcc/cp/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * init.c: Do not include except.h. * decl.c: Likewise. * expr.c: Likewise. * cp-lang.c: Likewise. * pt.c: Likewise. * semantics.c: Likewise. * decl2.c: Likewise. * except.c: Likewise. (init_exception_processing): Do not set the removed lang_protect_cleanup_actions here. (cp_protect_cleanup_actions): Make non-static and remove prototype. (doing_eh): New, moved from except.c but removed the do_warning flag. (expand_start_catch_block): Update doing_eh call. (expand_end_catch_block): Likewise. (build_throw): Likewise. * cp-tree.h: Prototype cp_protect_cleanup_actions. * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to cp_protect_cleanup_actions. * Make-lang.in: Update dependencies. gcc/objcp/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * objcp-lang.c: Do not include except.h. * Make-lang.in: Update dependencies. gcc/java/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * lang.c: Do not include except.h * except.c: Likewise. (doing_eh): New, moved from except.c (in gcc/) but removed the do_warning flag. (maybe_start_try): Update doing_eh call. * Make-lang.in: Update dependencies. gcc/ada/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * gcc-interface/misc.c: Do not include except.h. * gcc-interface/Make-lang.in: Update dependencies. gcc/fortran/ChangeLog: 2010-06-28 Steven Bosscher <steven@gcc.gnu.org> * Make-lang.in: Update dependencies. From-SVN: r161484
2010-06-20re PR other/32998 (-frecord-gcc-switches issues)Joseph Myers1-1/+0
PR other/32998 * opth-gen.awk: Generate definitions of OPT_SPECIAL_unknown, OPT_SPECIAL_program_name and OPT_SPECIAL_input_file. * opts-common.c (find_opt): Return OPT_SPECIAL_unknown on failure. (decode_cmdline_option): Update for this return value. Set orig_option_with_args_text field. Set arg field for unknown options. Make static. (decode_cmdline_options_to_array): New. (prune_options): Update handling of find_opt return value. * opts.c (read_cmdline_option): Take decoded option. Return void. (read_cmdline_options): Take decoded options. (decode_options): Add parameters for decoded options. Use decode_cmdline_options_to_array. Use decoded options for -O scan. Use integral_argument for -O parameters. Update call to read_cmdline_options. (enable_warning_as_error): Update handling of find_opt return value. * opts.h: Update comment on unknown options. (struct cl_decoded_option): Update comments on opt_index and arg. Add orig_option_with_args_text. (decode_cmdline_option): Remove. (decode_cmdline_options_to_array): Declare. (decode_options): Update prototype. * toplev.c (save_argv): Remove. (save_decoded_options, save_decoded_options_count): New. (read_integral_parameter): Remove. (print_switch_values): Use decoded options. (toplev_main): Don't set save_argv. Update call to decode_options. * toplev.h (read_integral_parameter): Remove. * varasm.c (elf_record_gcc_switches): Don't handle holding back names. c-family: * c-common.c (parse_optimize_options): Update call to decode_options. fortran: * options.c (gfc_handle_option): Don't handle N_OPTS. testsuite: * gcc.dg/opts-2.c: New test. From-SVN: r161053
2010-06-07common.opt (fira-verbose): Use Var.Joseph Myers1-18/+0
* 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-05-27diagnostic-core.h: New.Joseph Myers1-44/+1
* diagnostic-core.h: New. Contents moved from diagnostic.h and toplev.h. * diagnostic.c: Don't include toplev.h. (progname): Define. Moved from toplev.c. (seen_error): New function. * diagnostic.h: Include diagnostic-core.h. (diagnostic_t, emit_diagnostic): Don't declare here. * toplev.c (progname): Move to toplev.c. (emit_debug_global_declarations, compile_file, finalize, do_compile, toplev_main): Use seen_error. * toplev.h: Include diagnostic-core.h. (trim_filename, GCC_DIAG_STYLE, ATTRIBUTE_GCC_DIAG, internal_error, warning, warning_at, error, error_n, error_at, fatal_error, pedwarn, permerror, sorry, inform, inform_n, verbatim, fnotice, progname): Move to diagnostic-core.h. * builtins.c: Include diagnostic-core.h instead of diagnostic.h. (expand_builtin_expect): Use seen_error. * c-decl.c: Include diagnostic-core.h instead of diagnostic.h. (c_make_fname_decl, c_write_global_declarations): Use seen_error. * c-format.c: Include diagnostic-core.h instead of diagnostic.h. * c-gimplify.c: Include diagnostic-core.h instead of diagnostic.h. * c-lang.c: Include diagnostic-core.h instead of diagnostic.h. * c-lex.c (c_lex_with_flags, interpret_float): Don't increment errorcount for errors. * c-opts.c (c_common_finish): Use seen_error. * cgraph.c: Include diagnostic-core.h instead of diagnostic.h. * cgraphunit.c (verify_cgraph_node, verify_cgraph, cgraph_output_pending_asms, cgraph_optimize): Use seen_error. * coverage.c: Include diagnostic-core.h instead of diagnostic.h. (get_coverage_counts): Use seen_error. * dwarf2out.c (dwarf2out_finish): Use seen_error. * gimplify.c (gimplify_var_or_parm_decl, gimple_push_cleanup, gimplify_body): Use seen_error. * ipa-inline.c (cgraph_early_inlining): Use seen_error. * ipa-pure-const.c (gate_pure_const): Use seen_error. * ipa-reference.c (gate_reference): Use seen_error. * jump.c: Include diagnostic-core.h instead of diagnostic.h. * lambda-code.c: Include diagnostic-core.h instead of diagnostic.h. * lto-cgraph.c: Include diagnostic-core.h instead of diagnostic.h. * lto-compress.c: Include diagnostic-core.h instead of diagnostic.h. * lto-section-in.c: Include diagnostic-core.h instead of diagnostic.h. * lto-streamer-out.c: Include diagnostic-core.h instead of diagnostic.h. * lto-streamer.c: Include diagnostic-core.h instead of diagnostic.h. (gate_lto_out): Use seen_error. * matrix-reorg.c: Include diagnostic-core.h instead of diagnostic.h. * omega.c: Include diagnostic-core.h instead of diagnostic.h. * omp-low.c: Include diagnostic-core.h instead of diagnostic.h. (gate_expand_omp, lower_omp_1): Use seen_error. * passes.c: Include diagnostic-core.h instead of diagnostic.h. (rest_of_decl_compilation, rest_of_type_compilation, gate_rest_of_compilation, ipa_write_summaries): Use seen_error. * tree-cfg.c (label_to_block_fn): Use seen_error. * tree-inline.c (optimize_inline_calls): Use seen_error. * tree-mudflap.c (mudflap_finish_file): Use seen_error. * tree-optimize.c (gate_all_optimizations, gate_all_early_local_passes, gate_all_early_optimizations): Use seen_error. * tree-ssa-structalias.c (gate_ipa_pta): Use seen_error. * varpool.c: Include diagnostic-core.h instead of diagnostic.h. (varpool_remove_unreferenced_decls, varpool_assemble_pending_decls): Use seen_error. * Makefile.in (DIAGNOSTIC_CORE_H): Define. (TOPLEV_H, DIAGNOSTIC_H): Update. (c-decl.o, c-lang.o, c-format.o, lto-compress.o, lto-cgraph.o, lto-streamer-out.o, lto-section-in.o, lto-streamer.o, c-gimplify.o, omp-low.o, omega.o, diagnostic.o, passes.o, builtins.o, jump.o, cgraph.o, varpool.o, matrix-reorg.o, coverage.o, lambda-code.o): Update dependencies. cp: * call.c: Include diagnostic-core.h instead of diagnostic.h. * cp-lang.c: Don't include diagnostic.h * name-lookup.c: Include diagnostic-core.h instead of diagnostic.h. (cp_emit_debug_info_for_using): Use seen_error. * optimize.c: Include diagnostic-core.h instead of diagnostic.h. * parser.c: Include diagnostic-core.h instead of diagnostic.h. * pt.c (iterative_hash_template_arg): Use seen_error. * repo.c: Include diagnostic-core.h instead of diagnostic.h. * typeck2.c: Include diagnostic-core.h instead of diagnostic.h. * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o, cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update dependencies. lto: * lto.c: Include diagnostic-core.h instead of diagnostic.h. (read_cgraph_and_symbols, lto_main): Use seen_error. * Make-lang.in (lto/lto.o): Update dependencies. objc: * objc-act.c: Include diagnostic-core.h instead of diagnostic.h. * Make-lang.in (objc/objc-act.o): Update dependencies. From-SVN: r159947
2010-05-27input.c: New file.Joseph Myers1-0/+3
* input.c: New file. * input.h (main_input_filename): Move declaration to toplev.h. * toplev.c (input_location, line_table): Move to input.c * toplev.h (main_input_filename): Move declaration from input.h. * tree.c (expand_location): Move to input.c. * Makefile.in (OBJS-common): Add input.o. (input.o): Add dependencies. From-SVN: r159914
2010-03-01toplev.h (inform_n, error_n): Declare.Shujing Zhao1-0/+4
gcc/ 2010-03-01 Marco Poletti <poletti.marco@gmail.com> * toplev.h (inform_n, error_n): Declare. * diagnostic.c (inform_n, error_n): New function. gcc/cp/ 2010-03-01 Marco Poletti <poletti.marco@gmail.com> * pt.c (redeclare_class_template): Use error_n and inform_n. gcc/po 2010-03-01 Shujing Zhao <pearly.zhao@oracle.com> * exgettext: Handle the functions that end with _n. From-SVN: r157134
2010-01-03Pass -dumpbase and -dumpdir to gcc for LTOH.J. Lu1-2/+4
gcc/ 2010-01-03 H.J. Lu <hongjiu.lu@intel.com> PR lto/41564 * common.opt: Add dumpdir. * gcc.c (cc1_options): Add "-dumpbase %B" only if -dumpbase isn't specified. (option_map): Add --dumpdir. * gcc.h (DEFAULT_WORD_SWITCH_TAKES_ARG): Add dumpdir. * lto-wrapper.c (run_gcc): Add -dumpbase and -dumpdir for -o. * opts.c (decode_options): Try dump_dir_name first if dump_base_name isn't an absolute path. (common_handle_option): Handle OPT_dumpdir. * toplev.c (dump_dir_name): New. (print_switch_values): Also ignore -dumpdir. * toplev.h (dump_dir_name): New. gcc/lto/ 2010-01-03 H.J. Lu <hongjiu.lu@intel.com> PR lto/41564 * lto.c (DUMPBASE_SUFFIX): New. (lto_execute_ltrans): Append a sequence number to -dumpbase for LTRANS. From-SVN: r155591
2009-11-25Remove trailing white spaces.H.J. Lu1-1/+1
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-10-14params.def (PARAM_IRA_LOOP_RESERVED_REGS): New.Vladimir Makarov1-0/+1
2009-09-26 Vladimir Makarov <vmakarov@redhat.com> * params.def (PARAM_IRA_LOOP_RESERVED_REGS): New. * params.h (IRA_LOOP_RESERVED_REGS): New * tree-pass.h (pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. * passes.c (pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. (pass_reginfo_init): Move before loop optimizations. * config/i386/i386.h (STACK_REG_COVER_CLASS): Define. * common.opt (fira-loop-pressure): New. * toplev.h (flag_ira_loop_pressure): New. * rtl.h (init_subregs_of_mode, finish_subregs_of_mode): New externals. * reginfo.c (init_subregs_of_mode, finish_subregs_of_mode): Make external and void type functions. (gate_subregs_of_mode_init, pass_subregs_of_mode_init, pass_subregs_of_mode_finish): Remove. * ira-costs.c (init_costs): Call init_subregs_of_mode. * regmove.c: Include ira.h. (regmove_optimize): Call ira_set_pseudo_classes after IRA based register pressure calculation in loops. * loop-invariant.c: Include REGS_H and ira.h. (struct loop_data): New members max_reg_pressure, regs_ref, and regs_live. (struct invariant): New member orig_regno. (curr_loop): New variable. (find_exits): Initialize regs_ref and regs_live. (create_new_invariant): Initialize orig_regno. (get_cover_class_and_nregs): New. (get_inv_cost): Make aregs_needed an array. Use regs_needed as an array. Add code for flag_ira_loop_pressure. (gain_for_invariant): Make new_regs an array. Add code for flag_ira_loop_pressure. (best_gain_for_invariant): Ditto. (set_move_mark): New parameter gain. Use it for debugging output. (find_invariants_to_move): Make regs_needed and new_regs an array. Add code for flag_ira_loop_pressure. (move_invariant_reg): Set up orig_regno. (move_invariants): Set up reg classes for pseudos for flag_ira_loop_pressure. (free_loop_data): Clear regs_ref and regs_live. (curr_regs_live, curr_reg_pressure, regs_set, n_regs_set, get_regno_cover_class, change_pressure, mark_regno_live, mark_regno_death, mark_reg_store, mark_reg_clobber, mark_reg_death, mark_ref_regs, calculate_loop_reg_pressure): New. (move_loop_invariants): Calculate pressure. Initialize curr_loop. * ira.c (ira): Call ira_set_pseudo_classes after IRA based register pressure calculation in loops if new regs were added. Call finish_subregs_of_mode. * opts.c (decode_options): Set up flag_ira_loop_pressure. * Makefile.in (loop-invariant.o): Add ira.h. (regmove.o): Ditto. * doc/invoke.texi (-fira-loop-pressure, ira-loop-reserved-regs): Describe. * doc/tm.texi (STACK_REG_COVER_CLASS): Describe. From-SVN: r152770
2009-06-16toplev.h (floor_log2): If GCC_VERSION >= 3004, declare as static inline, not ↵Ian Lance Taylor1-4/+8
extern inline. * toplev.h (floor_log2): If GCC_VERSION >= 3004, declare as static inline, not extern inline. (exact_log2): Likewise. * toplev.c (floor_log2): Only define if GCC_VERSION < 3004. Don't test CLZ_HWI. (exact_log2): Likewise, but don't test CTZ_HWI. From-SVN: r148540
2009-05-22Makefile.in (bversion.h, s-bversion): New targets.Ben Elliston1-1/+2
* Makefile.in (bversion.h, s-bversion): New targets. (TOPLEV_H): Add bversion.h. * toplev.h: Include "bversion.h". (ATTRIBUTE_GCC_DIAG): When building with checking disabled, use the __format__ attribute only if compiling with the same version of GCC as the sources (the "build version"). From-SVN: r147792
2009-05-08re PR c/36892 (Support __attribute__((deprecated("text string"))))H.J. Lu1-1/+1
gcc/ 2009-05-08 H.J. Lu <hongjiu.lu@intel.com> Andrew Morrow <acm@google.com> PR c/36892 * c-common.c (c_common_attribute_table): Permit deprecated attribute to take an optional argument. (handle_deprecated_attribute): If the optional argument to __attribute__((deprecated)) is not a string ignore the attribute and emit a warning. * c-decl.c (grokdeclarator): Updated warn_deprecated_use call. * c-typeck.c (build_component_ref): Likewise. (build_external_ref): Likewise. * toplev.c (warn_deprecated_use): Add an attribute argument. Emit the message associated with __attribute__((deprecated)). * toplev.h (warn_deprecated_use): Updated. * doc/extend.texi: Document new optional parameter to __attribute__((deprecated)) gcc/cp/ 2009-05-08 H.J. Lu <hongjiu.lu@intel.com> PR c/36892 * call.c (build_call_a): Updated warn_deprecated_use call. (build_over_call): Likewise. * decl.c (grokdeclarator): Likewise. (grokparms): Likewise. * semantics.c (finish_id_expression): Likewise. * typeck.c (build_class_member_access_expr): Likewise. (finish_class_member_access_expr): Likewise. gcc/testsuite/ 2009-05-08 H.J. Lu <hongjiu.lu@intel.com> PR c/36892 * g++.dg/warn/deprecated-6.C: New. * gcc.dg/deprecated-4.c: Likewise. * gcc.dg/deprecated-5.c: Likewise. * gcc.dg/deprecated-6.c: Likewise. From-SVN: r147293
2009-04-27dbgcnt.def (cprop1, [...]): RemoveSteven Bosscher1-0/+1
* dbgcnt.def (cprop1, cprop2, gcse, jump_bypass): Remove (cprop, hoist, pre, store_motion): New debug counters. * tree-pass.h (pass_tracer): Move to list of gimple passes, it is not an RTL pass anymore. (pass_profiling): Remove extern decl for pass removed in 2005. (pass_gcse, pass_jump_bypass): Remove. * final.c (rest_of_clean_state): Set flag_rerun_cse_after_global_opts to 0 for clean state. * toplev.h (flag_rerun_cse_after_global_opts): Add extern declaration. * cse.c (gate_handle_cse_after_global_opts, rest_of_handle_cse_after_global_opts): New functions. (pass_cse_after_global_opts): New pass, does local CSE. * timevar.def (TV_GCSE, TV_CPROP1, TV_CPROP2, TV_BYPASS): Remove. (TV_CPROP): New timevar. * gcse.c (flag_rerun_cse_after_global_opts): New global variable. (run_jump_opt_after_gcse, max_gcse_regno): Remove global vars. (gcse_main, recompute_all_luids): Remove. (compute_hash_table_work): Call max_reg_num instead of reading max_gcse_regno. (cprop_jump): Don't set run_jump_opt_after_gcse. (constprop_register): Always allow to alter jumps. (cprop_insn): Likewise. (do_local_cprop): Likewise. (local_cprop_pass): Likewise. Return non-zero if something changed. (cprop): Remove function, fold interesting bits into one_cprop_pass. (find_implicit_sets): Add note about missed optimization opportunity. (one_cprop_pass): Rewrite to be "the" CPROP pass, called from the pass_rtl_cprop execute function. Don't bother tracking the pass number, each pass gets its own dumpfile now anyway. Always allow to alter jumpsand bypass jumps. (bypass_block): Don't ignore regno >= max_gcse_regno, find_bypass_set will just find no suitable set. (pre_edge_insert): Fix dumping, this function is for PRE only. (one_pre_gcse_pass): Rewrite to be "the" PRE pass, called from the pass_rtl_pre execute function. (hoist_code): Return non-zero if something changed. Keep track of substitutions and insertions for statistics gathering similar to PRE. (one_code_hoisting_pass): Rewrite to be "the" code hoisting pass, called from the pass_rtl_hoist execute function. Show pass statistics. (compute_store_table): Use max_reg_num directly instead of using the formerly global max_gcse_regno. (build_store_vectors): Likewise. (replace_store_insn): Fix dumping. (store_motion): Rename to ... (one_store_motion_pass): ... this. Rewrite to be "the" STORE_MOTION pass, called from the pass_rtl_store_motion execute function. Keep track of substitutions and insertions for statistics gathering similar to PRE. (bypass_jumps): Remove, fold interesting bits into ... (one_cprop_pass): ... this. Rewrite to be "the" CPROP pass, called from the pass_rtl_cprop execute function. (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass): Remove. (gate_handle_gcse, rest_of_handle_gcse): Remove. (gate_rtl_cprop, execute_rtl_cprop, pass_rtl_cprop): New. (gate_rtl_pre, execute_rtl_pre, pass_rtl_pre): New. (gate_rtl_hoist, execute_rtl_hoist, pass_rtl_hoist): New. (gate_rtl_store_motion, execute_rtl_store_motion, pass_rtl_store_motion): New. * common.opt: Remove flag_cse_skip_blocks, adjust documentation to make it clear that -fcse-skip-blocks is a no-op for backward compat. * passes.c (init_optimization_passes): Remove pass_gcse and pass_jump_bypass. Schedule cprop, pre, hoist, cprop, store_motion, and cse_after_global_opts in place of pass_gcse. Schedule cprop instead of pass_jump_bypass. From-SVN: r146848
2009-04-17re PR other/31567 (cc1, cc1plus, etc. don't support @file mechanism)Rafael Avila de Espindola1-1/+1
PR 31567 * gcc.c (create_at_file): New. (compile_input_file_p): New. (do_spec_1): Use @args files for %i. Use create_at_file for %o. * main.c (main): Update call to toplev_main. * toplev.c (toplev_main): Change signature. Call expandargv. * toplev.h (toplev_main): Change signature. From-SVN: r146292
2009-02-20Update Copyright years for files modified in 2008 and/or 2009.Jakub Jelinek1-2/+2
From-SVN: r144324
2009-01-29tm.texi (TARGET_IRA_COVER_CLASSES): Modify description.Vladimir Makarov1-1/+0
2008-01-29 Vladimir Makarov <vmakarov@redhat.com> * doc/tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. * doc/passes.texi: Remove entries about regclass, local-alloc, and global. Modify entries about regmove and IRA. * ra-conflict.c: Remove the file. * reload.c (push_reload, find_dummy_reload): Remove flag_ira. * tree-pass.h (pass_local_alloc, pass_global_alloc): Remove. (pass_regclass_init): Rename to pass_reginfo_init. * cfgloopanal.c (estimate_reg_pressure_cost): Remove flag_ira. * toplev.h (flag_ira): Remove. * caller-save.c (setup_save_areas): Remove flag_ira. * ira-color.c (ira_reuse_stack_slot, ira_mark_new_stack_slot): Ditto. * global.c: Remove the file. * opts.c: (decode_options): Remove flag_ira. * hard-reg-set.h (losing_caller_save_reg_set): Remove. * regmove.c: Modify file description. (find_use_as_address, try_auto_increment): Define them only if AUTO_INC_DEC is defined. (replacement_quality, replace_in_call_usage, fixup_match_1, stable_and_no_regs_but_for_p): Remove. (reg_set_in_bb): Make it static. (regmove_optimize): Remove flag_ira and code which worked for !flag_ira. * local-alloc.c: Remove the file. * common.opt (fira): Remove. * ira.c: Include except.h. (eliminable_regset): Move from global.c. (mark_elimination): Ditto. Remove flag_ira. (reg_renumber, struct equivalence, reg_equiv, equiv_mem, equiv_mem_modified, validate_equiv_mem_from_store, validate_equiv_mem, equiv_init_varies_p, equiv_init_movable_p, contains_replace_regs, memref_referenced_p, memref_used_between_p, no_equiv, recorded_label_ref): Move from local-alloc.c. (update_equiv_regs): Ditto. Make it static. (print_insn_chain, print_insn_chains): Move it from global.c. pseudo_for_reload_consideration_p): Ditto. Remove flag_ira. (build_insn_chain): Ditto. Make it static. (ra_init_live_subregs): Move from ra-conflict.c. Make it static. Rename to init_live_subregs. (gate_ira): Remove flag_ira. * regclass.c: Rename reginfo.c. Change file description. (FORBIDDEN_INC_DEC_CLASSES): Remove. (reg_class_superclasses, forbidden_inc_dec_class, in_inc_dec): Remove. (init_reg_sets_1): Remove code for evaluation of reg_class_superclasses and losing_caller_save_reg_set. (init_regs): Remove init_reg_autoinc. (struct costs, costs, init_cost, ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): Remove. (regclass_init): Rename to reginfo_init. Don't initialize init_cost. (pass_regclass_init): Rename to pass_reginfo_init. Modify corresponding entries. (dump_regclass, record_operand_costs, scan_one_insn, init_reg_autoinc, regclass, record_reg_classes, copy_cost, record_address_regs, auto_inc_dec_reg_p): Remove. (gt-regclass.h): Rename to gt-reginfo.h. * rtl.h (dump_global_regs, retry_global_alloc, build_insn_chain, dump_local_alloc, update_equiv_regs): Remove. * Makefile.in (RA_H): Remove. (OBJS-common): Remove global.o, local-alloc.o, and ra-conflict.o. Rename regclass.o to reginfo.o. (regclass.o): Rename to reginfo.o. Rename gt-regclass.h to gt-reginfo.h. (global.o, local-alloc.o, ra-conflict.o): Remove entries. (GTFILES): Rename regclass.c to reginfo.c. * passes.c (init_optimization_passes): Remove pass_local_alloc and pass_global_alloc. Rename pass_regclass_init to pass_reginfo_init. * reload1.c (compute_use_by_pseudos, reload, count_pseudo, count_spilled_pseudo, find_reg, alter_reg, delete_output_reload): Remove flag_ira. (finish_spills): Ditto. Remove code for !flga_ira. From-SVN: r143757
2008-09-03diagnostic.c (error_at): New.Aldy Hernandez1-0/+1
* diagnostic.c (error_at): New. * toplev.h (error_at): New prototype. * c-typeck.c (build_array_ref): Call error_at instead of error. Pass location to pedwarn. cp/ * typeck.c (build_array_ref): Use new location argument. * class.c (build_vtbl_ref_1): Pass location to build_array_ref. * call.c (build_new_op): Same. * decl2.c (grok_array_decl): Same. * cp-tree.h (build_array_ref): Add location argument to prototype. From-SVN: r139924
2008-08-26[multiple changes]Vladimir Makarov1-0/+5
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-21diagnostic.c (pedwarn_at): Rename as pedwarn.Manuel López-Ibáñez1-3/+2
2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org> * diagnostic.c (pedwarn_at): Rename as pedwarn. (pedwarn): Delete. * toplev.h (pedwarn_at): Likewise. * builtins.c: Update all calls to pedwarn. * c-lex.c: Likewise. * toplev.c: Likewise. * c-tree.h: Likewise. * c-decl.c: Likewise. * c-errors.c: Likewise. * c-typeck.c: Likewise. * c-common.c: Likewise. * c-parser.c: Likewise. cp/ * typeck.c: Update all calls to pedwarn. * decl.c: Likewise. * call.c: Likewise. * error.c: Likewise. * pt.c: Likewise. * name-lookup.c: Likewise. * parser.c: Likewise. fortran/ * f95-lang.c: Update all calls to pedwarn. From-SVN: r139373
2008-08-20diagnostic.c (inform): Add an explicit location_t parameter.Manuel López-Ibáñez1-1/+1
2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org> * diagnostic.c (inform): Add an explicit location_t parameter. * toplev.h (inform): Update declaration. * builtins.c: Update all calls to inform. * c-common.c: Likewise. * c-decl.c: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-pragma.c: Likewise. * c-typeck.c: Likewise. * coverage.c: Likewise. * opts.c: Likewise. * toplev.c: Likewise. * tree-cfg.c: Likewise. * tree-ssa.c: Likewise. cp/ * parser.c: Update all calls to inform. * typeck.c: Likewise. * init.c: Likewise. * class.c: Likewise. * call.c: Likewise. * method.c: Likewise. * friend.c: Likewise. * typeck2.c: Likewise. * pt.c: Likewise. * name-lookup.c: Likewise. * lex.c: Likewise. From-SVN: r139293
2008-08-18diagnostics.c (permerror_at): Rename as permerror.Manuel López-Ibáñez1-3/+1
2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org> * diagnostics.c (permerror_at): Rename as permerror. (permerror): Delete. * toplev.h: Likewise. cp/ * typeck.c: Update all callers. * init.c: Likewise. * class.c: Likewise. * decl.c: Likewise. * call.c: Likewise. * except.c: Likewise. * cvt.c: Likewise. * typeck2.c: Likewise. * pt.c: Likewise. * semantics.c: Likewise. * name-lookup.c: Likewise. * lex.c: Likewise. * decl2.c: Likewise. * parser.c: Likewise. From-SVN: r139193
2008-08-13toplev.h (pedwarn_at): Fix declaration.Manuel López-Ibáñez1-0/+1
2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org> * toplev.h (pedwarn_at): Fix declaration. From-SVN: r139054
2008-08-13re PR c/15236 (pedantic switch modifies treatment of non-ISO compliant ↵Manuel López-Ibáñez1-0/+1
enumerations) 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR c/15236 * diagnostic.c (pedwarn_at): New. * toplev.h (pedwarn_at): Declare. * c-tree.h (build_enumerator): Update declaration. * c-decl.c (finish_enum): Update comment. (build_enumerator): Take a location parameter. Give a pedwarn but do not perform any conversion. * c-parser.c (c_parser_enum_specifier): Set correct location for enumerator. testsuite/ * gcc.dg/pr15236.c: New. * gcc.dg/torture/pr25183.c: Update. From-SVN: r139050
2008-08-08re PR other/36901 (pedwarn() + -pedantic-errors + -w (inhibit_warnings) ↵Manuel López-Ibáñez1-7/+5
should not emit errors) 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR 36901 * diagnostic.def (DK_PEDWARN, DK_PERMERROR): New. * diagnostic.c (pedantic_warning_kind, permissive_error_kind): Moved from diagnostic.h (diagnostic_report_diagnostic): Return bool. Handle DK_PEDWARN and DK_PERMERROR. (emit_diagnostic): New. (warning0, pedwarn0): Delete. (warning, warning_at, pedwarn, permerror): Return bool. * diagnostic.h (pedantic_warning_kind, permissive_error_kind): Moved to diagnostic.c. (struct diagnostic_context): Use correct type for classify_diagnostic. (diagnostic_report_diagnostic): Update declaration. (emit_diagnostic): Declare. * errors.c (warning): Return bool. * errors.h (warning): Update declaration. * toplev.h (warning0, pedwarn0): Delete. (warning, warning_at, pedwarn, permerror): Return bool. * c-errors.c (pedwarn_c99, pedwarn_c90): Use DK_PEDWARN. * c-decl.c (locate_old_decl): Delete 'diag' argument. Always use inform. Update all calls. (diagnose_mismatched_decls): Check return value of warning/pedwarn before giving informative note. (implicit_decl_warning): Likewise. * c-typeck.c (build_function_call): Likewise. * tree-sssa.c (warn_uninit): Likewise. * builtins.c (gimplify_va_arg_expr): Likewise. fortran/ * f95-lang.c (gfc_mark_addressable): Use "pedwarn (0," instead of 'pedwarn0'. cp/ * cp-tree.h (struct diagnostic_context, struct diagnostic_info): Delete forward declarations. Check that toplev.h has not been included before this file. Include toplev.h and diagnostic.h. * error.c (cp_cpp_error): Use DK_PEDWARN. (cxx_incomplete_type_diagnostic): Update declaration. (cxx_incomplete_type_error): Use DK_ERROR. * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t as argument. Use emit_diagnostic. (cxx_incomplete_type_error): Use DK_ERROR. (add_exception_specifier): Use diagnostic_t instead of custom codes. * typeck.c (complete_type_or_else): Update call to cxx_incomplete_type_diagnostic. * init.c (build_delete): Likewise. * call.c (diagnostic_fn_t): Remove unused typedef. (build_temp): Pass a pointer to diagnostic_t. (convert_like_real): Use emit_diagnostic. (joust): Check return value of warning before giving informative note. * friend.c (do_friend): Check return value of warning before giving informative note. * parser.c (cp_parser_template_id): Likewise. testsuite/ * gcc.dg/pr36901-1.c: New. * gcc.dg/pr36901-3.c: New. * gcc.dg/pr36901-2.c: New. * gcc.dg/pr36901-4.c: New. * gcc.dg/pr36901-system.h: New. * gcc.dg/pr36901.h: New. * gcc.target/powerpc/altivec-macros.c: Update. * gcc.target/i386/regparm.c: Update. * gcc.dg/funcdef-var-1.c: Update. * gcc.dg/parm-mismatch-1.c: Update. * gcc.dg/attr-noinline.c: Update. * gcc.dg/wtr-static-1.c: Update. * gcc.dg/redecl-11.c: Update. * gcc.dg/pr27953.c: Update. * gcc.dg/proto-1.c: Update. * gcc.dg/decl-3.c: Update. * gcc.dg/redecl-13.c: Update. * gcc.dg/pr15360-1.c: Update. * gcc.dg/redecl-15.c: Update. * gcc.dg/enum-compat-1.c: Update. * gcc.dg/dll-3.c: Update. * gcc.dg/array-5.c: Update. * gcc.dg/Wredundant-decls-2.c: Update. * gcc.dg/inline4.c: Update. * gcc.dg/redecl-2.c: Update. * gcc.dg/inline-14.c: Update. * gcc.dg/tls/diag-3.c: Update. * gcc.dg/funcdef-var-2.c: Update. * gcc.dg/20041213-1.c: Update. * gcc.dg/old-style-then-proto-1.c: Update. * gcc.dg/decl-2.c: Update. * gcc.dg/redecl-12.c: Update. * gcc.dg/decl-4.c: Update. * gcc.dg/Wshadow-1.c: Update. * gcc.dg/transparent-union-2.c: Update. * gcc.dg/visibility-7.c: Update. * gcc.dg/dll-2.c: Update. * gcc.dg/redecl-16.c: Update. * gcc.dg/inline1.c: Update. * gcc.dg/decl-8.c: Update. * gcc.dg/nested-redef-1.c: Update. * gcc.dg/inline3.c: Update. * gcc.dg/redecl-1.c: Update. * gcc.dg/inline5.c: Update. * gcc.dg/pr35899.c: Update. * gcc.dg/noncompile/label-lineno-1.c: Update. * gcc.dg/noncompile/label-1.c: Update. * gcc.dg/noncompile/20020220-1.c: Update. * gcc.dg/noncompile/redecl-1.c: Update. * gcc.dg/redecl-5.c: Update. * gcc.dg/qual-return-3.c: Update. * gcc.dg/label-decl-4.c: Update. From-SVN: r138893
2008-08-06re PR c++/26785 ("extra qualification" error gives line number of end of ↵Manuel López-Ibáñez1-0/+2
declaration) 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR 26785 * diagnostic.c (permerror_at): New. * toplev.h (permerror_at): Declare. cp/ * decl.c (grokdeclarator): Use explicit location with permerror_at. testsuite/ * g++.dg/warn/pr26785.C: New. From-SVN: r138816
2008-07-23re PR c/35058 (-Werror= works only with some warnings)Manuel López-Ibáñez1-1/+3
2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR 35058 * diagnostic.c (pedwarn): Add opt parameter. (pedwarn0): New. * c-tree.h (pedwarn_init): Add opt parameter. (pedwarn_c90): Likewise. (pedwarn_c99): Likewise. * c-errors.c (pedwarn_c99): Likewise. (pedwarn_c90): Likewise. * toplev.h (pedwarn): Update declaration. (pedwarn0): Declare. * c-lex.c: All calls to pedwarn changed. * builtins.c: All calls to pedwarn changed. * toplev.c: All calls to pedwarn changed. * c-decl.c: All calls to pedwarn changed. * c-typeck.c: All calls to pedwarn changed. * c-common.c: All calls to pedwarn changed. * c-parser.c: All calls to pedwarn changed. cp/ * typeck.c: All calls to pedwarn changed. * decl.c: All calls to pedwarn changed. * call.c: All calls to pedwarn changed. * error.c: All calls to pedwarn changed. * typeck2.c: All calls to pedwarn changed. * pt.c: All calls to pedwarn changed. * name-lookup.c: All calls to pedwarn changed. * parser.c: All calls to pedwarn changed. fortran/ * f95-lang.c (gfc_mark_addressable): All calls to pedwarn changed. testsuite/ * gcc.dg/Wdeclaration-after-statement-3.c: New. * gcc/testsuite/gcc.dg/Wpointer-arith.c: New. From-SVN: r138089
2008-07-23Add ability to set target options (ix86 only) and optimization options on a ↵Michael Meissner1-0/+2
function specific basis From-SVN: r138075
2008-07-21Makefile.in: Replace toplev.h with TOPLEV_H.Rafael Avila de Espindola1-0/+3
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-04-05tree-dump.c (dump_enable_all): Remove prototype; do not accept letter argument.Jan Hubicka1-1/+1
* tree-dump.c (dump_enable_all): Remove prototype; do not accept letter argument. (dump_files): Update. (enable_rtl_dump_file): Do not accept letter argument. * tree-pass.h (dump_file_info): Remove letter argument. * toplev.c (decode_d_option): Update -da handling. * toplev.h (enable_rtl_dump_file): Update prototype. * passes.c (register_one_dump_file): Do not accept IPA argument; work it out based on pass type. (register_dump_files_1): Likewise. (init_optimization_passes): Update register_one_dump_file calls. (execute_one_pass): Sanity check that IPA passes are called at IPA level and RTL passes at RTL level. (execute_pass_list): IPA pass can not be after or subpass of GIMPLE/RTL pass. (execute_ipa_pass_list): Handle IPA subpasses of IPA subpasses and disallov RTL subpasses of IPA subpasses. From-SVN: r133930
2008-03-31common.opt (fprofile-dir=, [...]): New optionsSeongbae Park1-0/+1
gcc/ChangeLog: 2008-03-31 Seongbae Park <seongbae.park@gmail.com> * common.opt (fprofile-dir=, fprofile-use=, fprofile-generate=): New options (fprofile-use): Add var flag_profile_use * coverage.c (coverage_begin_output): Do not open a gcno file for output only if -ftest-coverage is set. Do not add getpwd() to gcda file path. (build_gcov_info): Check the new flag flag_profile_datafile_relative_path. (coverage_init): Use profile_data_prefix. Read profile counter only if flag_profile_use is set. * opts.c (common_handle_option): New option fprofile-use=, fprofile-dir=, fprofile-generate=. * toplev.c (profile_data_prefix): New variable definition. * toplev.h (profile_data_prefix): New declaration. * doc/invoke.tex (Option Summary, Optimization Options): Add new options. gcc/testsuite/ChangeLog: 2008-03-31 Seongbae Park <seongbae.park@gmail.com> * g++.db/bprob/bprob.exp: Do not check gcno files. Use -fprofile-use for profile use. * gcc.misc-tests/bprob.exp: Ditto. * g++.dg/tree-pro/tree-prof.exp: Do not check gcno files. * gcc.dg/matrix/matrix.exp: Ditto. * gcc.dg/struct/struct-reorg.exp: Ditto. * gcc.dg/tree-prof/tree-prof.exp: Ditto. * gcc.dg/profile-dir-1.c: New test. * gcc.dg/profile-dir-2.c: New test. * gcc.dg/profile-dir-3.c: New test. ChangeLog: 2008-03-31 Seongbae Park <seongbae.park@gmail.com> * Makefile.tpl (.NOTPARALLEL): Serialize stageprofile libiberty. * Makefile.in (.NOTPARALLEL): Regenerate. From-SVN: r133774
2008-03-02re PR c++/24924 (front end and preprocessor pedantic_errors settings should ↵Manuel López-Ibáñez1-0/+1
agree) 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR 24924 * c-common.c (flag_permissive): Delete. (constant_expression_warnings): Check flags first. (constant_expression_error): New. * c-common.h (flag_permissive): Delete. (constant_expression_error): Declare. * flags.h (flag_permissive): Declare. Update description. * diagnostic.c (pedwarn): Update. (permerror): New. * diagnostic.h: (pedantic_error_kind): Rename as pedantic_warning_kind. (permissive_error_kind): New. * toplev.c (flag_permissive): Define. Update description. * toplev.h (permissive_error_kind): Declare. * c-errors.c (pedwarn_c99): Use pedantic_warning_kind. (pedwarn_c90): Use pedantic_warning_kind. * c-opts.c (c_common_post_options): flag_permissive does not affect flag_pedantic_errors. cp/ * class.c (finish_struct_anon): Use permerror instead of pedwarn. (check_field_decls): Likewise. (note_name_declared_in_class): Likewise. * call.c (build_new_op): Likewise. (convert_like_real): Likewise. (build_over_call): Likewise. * lex.c (unqualified_fn_lookup_error): Likewise. * parser.c (cp_parser_template_id): Likewise. * cvt.c (warn_ref_binding): Likewise. (convert_to_reference): Likewise. (ocp_convert): Likewise. (convert_to_void): Use error instead of pedwarn. * error.c (cp_cpp_error): Use pedantic_warning_kind. * decl.c (compute_array_index_type): Use constant_expression_error. testsuite/ * g++.dg/cpp/string-2.C: This is a warning now. * g++.dg/cpp/pedantic-errors.C: -pedantic-errors is not enabled by default, so add it. From-SVN: r132817