1. 15 May, 2010 1 commit
    • ipa-reference.c: Include toplev.h · f3380641
      	* ipa-reference.c: Include toplev.h
      	(is_proper_for_analysis): Only add to all_module_statics
      	if it is allocated.
      	(write_node_summary_p, stream_out_bitmap,
      	ipa_reference_write_optimization_summary,
      	ipa_reference_read_optimization_summary): New.
      	(struct ipa_opt_pass_d pass_ipa_reference): Add
      	optimization summary streaming.
      	* lto-cgraph.c (referenced_from_this_partition_p, 
      	reachable_from_this_partition_p): New functions.
      	* tree-ssa-alias.c (ref_maybe_used_by_call_p_1,
      	call_may_clobber_ref_p_1): Ask ipa-reference even for public vars.
      	* opts.c (decode_options): Enable ipa_reference.
      	* Makefile.in (ipa-reference.o): Add toplev.h dependency.
      	* lto-streamer.h (referenced_from_this_partition_p,
      	reachable_from_this_partition_p): Declare.
      
      	* gcc.dg/lto/ipareference_1.c: New file.
      	* gcc.dg/lto/ipareference_2.c: New file.
      
      From-SVN: r159435
      Jan Hubicka committed
  2. 06 May, 2010 1 commit
    • re PR c/40989 (-Werror= and #pragma diagnostics do not work with group flags) · 3734d960
      2010-05-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
      
      	PR 40989
      	* doc/invoke.texi (Wimplicit): Document as C only.
      	* opts.c (common_handle_option): Add argument kind.
      	(handle_option): Rename as read_cmdline_option. Factor out code to...
      	(handle_option): ... here. New.
      	(handle_options): Rename as read_cmdline_options.
      	(decode_options): Update call.
      	(set_option): Use option index instead of option pointer. Classify
      	diagnostics correctly.
      	(enable_warning_as_error): Call handle_option.
      	* opts.h (set_option): Update declaration.
      	(handle_option): Declare.
      	* langhooks.h (struct lang_hooks): Add argument kind to
      	handle_option.
      	* c.opt (Wimplicit,Wimplicit-int): Initialize to -1.
      	* c-opts.c (set_Wimplicit): Delete.
      	(c_family_lang_mask): New static constant.
      	(c_common_handle_option): Add argument kind. Use handle_option
      	instead of set_Wimplicit.
      	(c_common_post_options): warn_implicit and warn_implicit_int
      	are disabled by default.
      	* c-common.c (warn_implicit): Do not define here.
      	* c-common.h (warn_implicit): Do not declare here.
      	(c_common_handle_option): Update declaration.
      	* lto-opts.c (lto_reissue_options): Update call to set_option.
      java/
      	* lang.c (java_handle_option): Add argument kind.
      fortran/	
      	* options.c (gfc_handle_option): Add argument kind.
      	* gfortran.h (gfc_handle_option): Update declaration.
      ada/
      	* gcc-interface/misc.c (gnat_handle_option): Add argument kind.
      testsuite/
      	* gcc.dg/pr40989.c: New.
      
      From-SVN: r159102
      Manuel López-Ibáñez committed
  3. 04 May, 2010 1 commit
    • Sanitize the behavior of -Wcoverage-mismatch. · 650cfcab
      2010-05-04  Neil Vachharajani <nvachhar@google.com>
      
              * doc/invoke.texi (-Wcoverage-mismatch): Updated documentation as
              per new semantics.
              * opts.c (decode_options): Enable -Werror=coverage-mismatch.
              * coverage.c (get_coverage_counts): Always emit a warning.  Adjust
              conditions for printing notes.
              * common.opt (-Wcoverage-mismatch): Allow negative, default to
              true, update documentation.
              * Makefile.in (coverage.o): Add dependence on DIAGNOSTIC_H and intl.h.
              * testsuite/gcc.dg/tree-prof/wcoverage-mismatch.c: Adjusted.
      
      From-SVN: r159050
      Neil Vachharajani committed
  4. 27 Apr, 2010 1 commit
    • invoke.texi (-fipa-profile): Document. · e65bb9be
      	* doc/invoke.texi (-fipa-profile): Document.
      	* opts.c (decode_options): Enable ipa-profile at -O1.
      	* timevar.def (TV_IPA_PROFILE): Define.
      	* common.opt (fipa-profile): Add.
      	* cgraph.c (cgraph_clone_node): Set local flag and clear vtable method flag
      	for clones.
      	(cgraph_propagate_frequency): Handle only local ones.
      	* tree-pass.h (pass_ipa_profile): Declare.
      	* ipa-profile.c (gate_profile): Use flag_ipa_profile.
      	(pass_ipa_profile): Use TV_IPA_PROFILE.
      	* ipa.c (ipa_profile): New function.
      	(gate_ipa_profile): Likewise.
      	(pass_ipa_profile): New global variable.
      	* passes.c (pass_ipa_profile): New.
      
      From-SVN: r158788
      Jan Hubicka committed
  5. 23 Apr, 2010 1 commit
  6. 21 Apr, 2010 1 commit
  7. 19 Apr, 2010 1 commit
  8. 07 Apr, 2010 2 commits
    • diagnostic.h (diagnostic_override_option_index): New macro to set a diagnostic's option_index. · 87cf0651
      	* diagnostic.h (diagnostic_override_option_index): New macro to
      	set a diagnostic's option_index.
      	* c-tree.h (c_cpp_error): Add warning reason argument.
      	* opts.c (_warning_as_error_callback): New.
      	(register_warning_as_error_callback): Store callback for
      	warnings enabled via enable_warning_as_error.
      	(enable_warning_as_error): Call callback, minor code tidy.
      	* opts.h (register_warning_as_error_callback): Declare.
      	* c-opts.c (warning_as_error_callback): New, set cpp_opts flag in
      	response to -Werror=.
      	(c_common_init_options): Register warning_as_error_callback in opts.c.
      	* common.opt: Add -Wno-cpp option.
      	* c-common.c (struct reason_option_codes_t): Map cpp warning
      	reason codes to gcc option indexes.
      	* (c_option_controlling_cpp_error): New function, lookup the gcc
      	option index for a cpp warning reason code.
      	* (c_cpp_error): Add warning reason argument, call
      	c_option_controlling_cpp_error for diagnostic_override_option_index.
      	* doc/invoke.texi: Document -Wno-cpp.
      
      	* cpp.c (cb_cpp_error): Add warning reason argument, set a value
      	for diagnostic_override_option_index if CPP_W_WARNING_DIRECTIVE.
      
      	* directives.c (do_diagnostic): Add warning reason argument,
      	call appropriate error reporting function for code.
      	(directive_diagnostics): Call specific warning functions with
      	warning reason where appropriate.
      	(do_error, do_warning, do_pragma_dependency): Add warning reason
      	argument to do_diagnostic calls.
      	* macro.c (_cpp_warn_if_unused_macro, enter_macro_context,
      	_cpp_create_definition): Call specific warning functions with
              warning reason where appropriate.
      	* Makefile.in: Add new diagnostic functions to gettext translations.
      	* include/cpplib.h (struct cpp_callbacks): Add warning reason code
      	to error callback.
      	(CPP_DL_WARNING, CPP_DL_WARNING_SYSHDR, CPP_DL_PEDWARN, CPP_DL_ERROR,
      	CPP_DL_ICE, CPP_DL_NOTE, CPP_DL_FATAL): Replace macros with enums.
      	(CPP_W_NONE, CPP_W_DEPRECATED, CPP_W_COMMENTS,
      	CPP_W_MISSING_INCLUDE_DIRS, CPP_W_TRIGRAPHS, CPP_W_MULTICHAR,
      	CPP_W_TRADITIONAL, CPP_W_LONG_LONG, CPP_W_ENDIF_LABELS,
      	CPP_W_NUM_SIGN_CHANGE, CPP_W_VARIADIC_MACROS,
      	CPP_W_BUILTIN_MACRO_REDEFINED, CPP_W_DOLLARS, CPP_W_UNDEF,
      	CPP_W_UNUSED_MACROS, CPP_W_CXX_OPERATOR_NAMES, CPP_W_NORMALIZE,
      	CPP_W_INVALID_PCH, CPP_W_WARNING_DIRECTIVE): New enums for cpp
      	warning reason codes.
      	(cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
      	cpp_warning_with_line, cpp_pedwarning_with_line,
      	cpp_warning_with_line_syshdr): New specific error reporting functions.
      	* pch.c (cpp_valid_state): Call specific warning functions with
              warning reason where appropriate.
      	* errors.c (cpp_diagnostic, cpp_diagnostic_with_line): New central
      	diagnostic handlers.
      	(cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
      	cpp_warning_with_line, cpp_pedwarning_with_line,
      	cpp_warning_with_line_syshdr): New specific error reporting functions.
      	* expr.c (cpp_classify_number, eval_token, num_unary_op): Call
      	specific warning functions with warning reason where appropriate.
      	* lex.c (_cpp_process_line_notes, _cpp_skip_block_comment,
      	warn_about_normalization, lex_identifier_intern, lex_identifier,
      	_cpp_lex_direct): Ditto.
      	* charset.c (_cpp_valid_ucn, convert_hex, convert_escape,
      	narrow_str_to_charconst): Ditto.
      
      	* gcc.dg/cpp/warn-undef-2.c: New.
      	* gcc.dg/cpp/warn-traditional-2.c: New.
      	* gcc.dg/cpp/warn-comments-2.c: New.
      	* gcc.dg/cpp/warning-directive-1.c: New.
      	* gcc.dg/cpp/warn-long-long.c: New.
      	* gcc.dg/cpp/warn-traditional.c: New.
      	* gcc.dg/cpp/warn-variadic-2.c: New.
      	* gcc.dg/cpp/warn-undef.c: New.
      	* gcc.dg/cpp/warn-normalized-1.c: New.
      	* gcc.dg/cpp/warning-directive-2.c: New.
      	* gcc.dg/cpp/warn-long-long-2.c: New.
      	* gcc.dg/cpp/warn-variadic.c: New.
      	* gcc.dg/cpp/warn-normalized-2.c: New.
      	* gcc.dg/cpp/warning-directive-3.c: New.
      	* gcc.dg/cpp/warn-deprecated-2.c: New.
      	* gcc.dg/cpp/warn-trigraphs-1.c: New.
      	* gcc.dg/cpp/warn-multichar-2.c: New.
      	* gcc.dg/cpp/warn-normalized-3.c: New.
      	* gcc.dg/cpp/warning-directive-4.c: New.
      	* gcc.dg/cpp/warn-unused-macros.c: New.
      	* gcc.dg/cpp/warn-trigraphs-2.c: New.
      	* gcc.dg/cpp/warn-cxx-compat-2.c: New.
      	* gcc.dg/cpp/warn-cxx-compat.c: New.
      	* gcc.dg/cpp/warn-redefined.c: New.
      	* gcc.dg/cpp/warn-trigraphs-3.c: New.
      	* gcc.dg/cpp/warn-unused-macros-2.c: New.
      	* gcc.dg/cpp/warn-deprecated.c: New.
      	* gcc.dg/cpp/warn-trigraphs-4.c: New.
      	* gcc.dg/cpp/warn-redefined-2.c: New.
      	* gcc.dg/cpp/warn-comments.c: New.
      	* gcc.dg/cpp/warn-multichar.c: New.
      	* g++.dg/cpp/warning-directive-1.C: New.
      	* g++.dg/cpp/warning-directive-2.C: New.
      	* g++.dg/cpp/warning-directive-3.C: New.
      	* g++.dg/cpp/warning-directive-4.C: New.
      	* gfortran.dg/warning-directive-1.F90: New.
      	* gfortran.dg/warning-directive-3.F90: New.
      	* gfortran.dg/warning-directive-2.F90: New.
      	* gfortran.dg/warning-directive-4.F90: New.
      
      From-SVN: r158079
      Simon Baldwin committed
    • invoke.texi (-fargument-alias, [...]): Remove. · 0d3c82d6
      2010-04-07  Richard Guenther  <rguenther@suse.de>
      
      	* doc/invoke.texi (-fargument-alias, -fargument-noalias,
      	-fargument-noalias-global, -fargument-noalias-anything): Remove.
      	* common.opt: Likewise.
      	* tree-ssa-structalias.c (intra_create_variable_infos): Adjust
      	comment.
      	* alias.c (base_alias_check): Remove flag_argument_noalias
      	handling.
      	(nonoverlapping_memrefs_p): Likewise.
      	* emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise.
      	* opts.c (common_handle_option): Handle OPT_fargument_alias,
      	OPT_fargument_noalias, OPT_fargument_noalias_anything and
      	OPT_fargument_noalias_global for backward compatibility.
      
      	fortran/
      	* options.c (gfc_init_options): Do not set.
      
      From-SVN: r158060
      Richard Guenther committed
  9. 29 Mar, 2010 1 commit
  10. 09 Feb, 2010 1 commit
    • common.opt (fsched2-use-traces): Preserved for backward compatibility. · 57257f0d
      2010-02-09  Alexander Monakov  <amonakov@ispras.ru>
      
      gcc/ChangeLog:
      	* common.opt (fsched2-use-traces): Preserved for backward
      	compatibility.
      	* doc/invoke.texi: Remove the documentation about option
      	-fsched2-use-traces.
      	* sched-rgn.c (rest_of_handle_sched2): Remove usage of
      	flag_sched2_use_traces.
      	* opts.c (common_handle_option): Add OPT_fsched2_use_traces to
      	the backward compatibility flag section.
      
      gcc/testsuite/ChangeLog:
      	* gcc.dg/pr19340.c: Adjust.
      
      From-SVN: r156629
      Alexander Monakov committed
  11. 03 Feb, 2010 1 commit
  12. 05 Jan, 2010 1 commit
    • invoke.texi: Remove the documentation about option -Wunreachable-code. · bc3c12a2
      2010-01-05  Eric Fisher  <joefoxreal@gmail.com>
      
      	* doc/invoke.texi: Remove the documentation about option
      	-Wunreachable-code.
      	* common.opt (Wunreachable-code):  Preserved for backward
      	compatibility.
      	* tree-cfg.c: Remove the implementation of -Wunreachable-code.
      	* opts.c (common_handle_option): Add OPT_Wunreachable_code to
      	the backward compatibility flag section.
      
      	* gcc.dg/pr12603.c: Remove -Wunreachable-code from dg-options.
      	* gcc.dg/Wunreachable-1.c: Remove the testcase of
      	-Wunreachable-code.
      	* gcc.dg/Wunreachable-2.c: Likewise.
      	* gcc.dg/Wunreachable-3.c: Likewise.
      	* gcc.dg/Wunreachable-4.c: Likewise.
      	* gcc.dg/Wunreachable-5.c: Likewise.
      	* gcc.dg/Wunreachable-6.c: Likewise.
      	* gcc.dg/Wunreachable-7.c: Likewise.
      	* gcc.dg/Wunreachable-8.c: Likewise.
      	* gcc.dg/20041231-1.c: Likewise.
      
      From-SVN: r155645
      Eric Fisher committed
  13. 03 Jan, 2010 1 commit
    • Pass -dumpbase and -dumpdir to gcc for LTO · d7fb0a6d
      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
      H.J. Lu committed
  14. 15 Dec, 2009 1 commit
    • tree.c (free_lang_data_in_binfo): Do not free BINFO_OFFSET and BINFO_VPTR_FIELD. · 2a71eb48
      2009-12-15  Richard Guenther  <rguenther@suse.de>
      
      	* tree.c (free_lang_data_in_binfo): Do not free BINFO_OFFSET
      	and BINFO_VPTR_FIELD.
      	(free_lang_data_in_type): Do not free TYPE_STUB_DECL if we
      	generate debug information.
      	(free_lang_data_in_decl): Do not free DECL_SIZE_UNIT,
      	DECL_SIZE, DECL_FIELD_OFFSET and DECL_FCONTEXT.
      	(free_lang_data): Do not disable debuginfo.
      	* lto-streamer-out.c (write_symbol_vec): Deal with
      	non-constant DECL_SIZE.
      	(pack_ts_base_value_fields): Write types with false
      	TREE_ASM_WRITTEN.
      	(lto_output_ts_type_tree_pointers): Stream TYPE_STUB_DECL.
      	* lto-streamer-in.c (lto_input_ts_type_tree_pointers): Stream
      	TYPE_STUB_DECL.
      	* dwarf2out.c (add_pure_or_virtual_attribute): Check for
      	DECL_CONTEXT.
      	(gen_type_die_for_member): Test for TYPE_STUB_DECL.
      	* opts.c (decode_options): Do not disable var-tracking for lto.
      	* doc/invoke.texi (-flto): Document -flto vs. -g experimental
      	status.
      	(-fwhopr): Document experimental status.
      
      	lto/
      	* lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
      	(lto_post_options): Do not disable debuginfo.
      
      From-SVN: r155259
      Richard Guenther committed
  15. 27 Nov, 2009 1 commit
  16. 25 Nov, 2009 1 commit
    • Remove trailing white spaces. · b8698a0f
      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
      H.J. Lu committed
  17. 22 Nov, 2009 1 commit
  18. 04 Nov, 2009 1 commit
  19. 28 Oct, 2009 1 commit
  20. 22 Oct, 2009 1 commit
    • invoke.texi (fira-loop-pressure): Update default value. · 7e1e7d4c
      2009-10-21  Vladimir Makarov  <vmakarov@redhat.com>
      
      	* doc/invoke.texi (fira-loop-pressure): Update default value.
      	* opts.c (decode_options): Remove default value setting for
      	flag_ira_loop_pressure.
      	* config/ia64/ia64.c (ia64_override_options): Set
      	flag_ira_loop_pressure up for -O3.
      	* config/rs6000/rs6000.c (rs6000_override_options): Ditto.
      
      From-SVN: r153445
      Vladimir Makarov committed
  21. 14 Oct, 2009 1 commit
    • params.def (PARAM_IRA_LOOP_RESERVED_REGS): New. · 1833192f
      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
      Vladimir Makarov committed
  22. 13 Oct, 2009 1 commit
  23. 06 Oct, 2009 1 commit
  24. 03 Oct, 2009 1 commit
  25. 20 Sep, 2009 1 commit
  26. 17 Sep, 2009 1 commit
    • common.opt (fipa-sra): New switch. · 07ffa034
      2009-09-17  Martin Jambor  <mjambor@suse.cz>
      
      	* common.opt (fipa-sra): New switch.
      	* opts.c (decode_options): Turn flag_ipa_sra on for opt2.
      	* timevar.def (TV_IPA_SRA): New timevar.
      	* params.def (ipa-sra-ptr-growth-factor): New parameter.
      	* doc/invoke.texi: Document -fipa-sra and ipa-sra-ptr-growth-factor.
      	* tree-sra.c: Include cgraph.c.
      	(enum sra_mode): Added SRA_MODE_EARLY_IPA.
      	(struct access): Added fields stmt, grp_maybe_modified, grp_scalar_ptr
      	and grp_not_necessarilly_dereferenced.
      	(func_param_count): New variable.
      	(encountered_apply_args): New variable.
      	(bb_dereferences): New variable.
      	(final_bbs): New variable.
      	(no_accesses_representant): New variable.
      	(no_accesses_p): New function.
      	(dump_access): Dump the new fields.
      	(sra_initialize): Set encountered_apply_args to false.
      	(get_ssa_base_param): New function.
      	(mark_parm_dereference): New function.
      	(create_access): Caring for INIDRECT_REFs and different handling of
      	varialble length accesses in early IPA SRA.  Store the stmt - a new
      	parameter - to the new access.
      	(build_access_from_expr_1): New parameter stmt, passed to
      	create_access.  Handle INDIRECT_REFs.
      	(build_access_from_expr): Pass the current statement to
      	build_access_from_expr_1.
      	(disqualify_ops_if_throwing_stmt): Trigger only in intraprocedural
      	passes.
      	(build_accesses_from_assign): Pass the current statement to
      	build_access_from_expr_1.  Do not create assign links in IPA-SRA.
      	(scan_function): Call handle_ssa_defs on phi nodes.  Set bits in
      	final_bbs when necessary.  Check for calls to __builtin_apply_args.
      	Fixup EH info if anythng was changed.
      	(is_unused_scalar_param): New function.
      	(ptr_parm_has_direct_uses): New function.
      	(find_param_candidates): New function.
      	(mark_maybe_modified): New function.
      	(analyze_modified_params): New function.
      	(propagate_dereference_distances): New function.
      	(dump_dereferences_table): New function.
      	(analyze_caller_dereference_legality): New function.
      	(unmodified_by_ref_scalar_representative): New function.
      	(splice_param_accesses): New function.
      	(decide_one_param_reduction): New function.
      	(enum ipa_splicing_result): New type.
      	(splice_all_param_accesses): New function.
      	(get_param_index): New function.
      	(turn_representatives_into_adjustments): New function.
      	(analyze_all_param_acesses): New function.
      	(get_replaced_param_substitute): New function.
      	(get_adjustment_for_base): New function.
      	(replace_removed_params_ssa_names): New function.
      	(sra_ipa_reset_debug_stmts): New function.
      	(sra_ipa_modify_expr): New function.
      	(sra_ipa_modify_assign): New function.
      	(convert_callers): New function.
      	(modify_function): New function.
      	(ipa_sra_preliminary_function_checks): New function.
      	(ipa_early_sra): New function.
      	(ipa_early_sra_gate): New function.
      	(pass_early_ipa_sra): New variable.
      	* Makefile.in (tree-sra.o): Add cgraph.h to dependencies.
      	
      	Testsuite:
      
      	* gcc.dg/struct/wo_prof_escape_arg_to_local.c: Do not run IPA-SRA.
      	* gcc.dg/ipa/ipa-sra-1.c: New test.
      	* gcc.dg/ipa/ipa-sra-2.c: New test.
      	* gcc.dg/ipa/ipa-sra-3.c: New test.
      	* gcc.dg/ipa/ipa-sra-4.c: New test.
      	* gcc.dg/ipa/ipa-sra-5.c: New test.
      	* gcc.c-torture/execute/ipa-sra-1.c: New test.
      	* gcc.c-torture/execute/ipa-sra-2.c: New test.
      
      From-SVN: r151800
      Martin Jambor committed
  27. 12 Sep, 2009 1 commit
  28. 02 Sep, 2009 1 commit
    • invoke.texi (-fvar-tracking-assignments): New. · b5b8b0ac
      gcc/ChangeLog:
      * doc/invoke.texi (-fvar-tracking-assignments): New.
      (-fvar-tracking-assignments-toggle): New.
      (-fdump-final-insns=file): Mark filename as optional.
      (--param min-nondebug-insn-uid): New.
      (-gdwarf-@{version}): Mention version 4.
      * opts.c (common_handle_option): Accept it.
      * tree-vrp.c (find_assert_locations_1): Skip debug stmts.
      * regrename.c (regrename_optimize): Drop last.  Don't count debug
      insns as uses.  Don't reject change because of debug insn.
      (do_replace): Reject DEBUG_INSN as chain starter.  Take base_regno
      from the chain starter, and check for inexact matches in
      DEBUG_INSNS.
      (scan_rtx_reg): Accept inexact matches in DEBUG_INSNs.
      (build_def_use): Simplify and fix the marking of DEBUG_INSNs.
      * sched-ebb.c (schedule_ebbs): Skip boundary debug insns.
      * fwprop.c (forward_propagate_and_simplify): ...into debug insns.
      * doc/gimple.texi (is_gimple_debug): New.
      (gimple_debug_bind_p): New.
      (is_gimple_call, gimple_assign_cast_p): End sentence with period.
      * doc/install.texi (bootstrap-debug): More details.
      (bootstrap-debug-big, bootstrap-debug-lean): Document.
      (bootstrap-debug-lib): More details.
      (bootstrap-debug-ckovw): Update.
      (bootstrap-time): New.
      * tree-into-ssa.c (mark_def_sites): Skip debug stmts.
      (insert_phi_nodes_for): Insert debug stmts.
      (rewrite_stmt): Take iterator.  Insert debug stmts.
      (rewrite_enter_block): Adjust.
      (maybe_replace_use_in_debug_stmt): New.
      (rewrite_update_stmt): Use it.
      (mark_use_interesting): Return early for debug stmts.
      * tree-ssa-loop-im.c (rewrite_bittest): Propagate DEFs into debug
      stmts before replacing stmt.
      (move_computations_stmt): Likewise.
      * ira-conflicts.c (add_copies): Skip debug insns.
      * regstat.c (regstat_init_n_sets_and_refs): Discount debug insns.
      (regstat_bb_compute_ri): Skip debug insns.
      * tree-ssa-threadupdate.c (redirection_block_p): Skip debug stmts.
      * tree-ssa-loop-manip.c (find_uses_to_rename_stmt,
      check_loop_closed_ssa_stmt): Skip debug stmts.
      * tree-tailcall.c (find_tail_calls): Likewise.
      * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Likewise.
      * tree.h (MAY_HAVE_DEBUG_STMTS): New.
      (build_var_debug_value_stat): Declare.
      (build_var_debug_value): Define.
      (target_for_debug_bind): Declare.
      * reload.c (find_equiv_reg): Skip debug insns.
      * rtlanal.c (reg_used_between_p): Skip debug insns.
      (side_effects_p): Likewise.
      (canonicalize_condition): Likewise.
      * ddg.c (create_ddg_dep_from_intra_loop_link): Check that non-debug
      insns never depend on debug insns.
      (create_ddg_dep_no_link): Likewise.
      (add_cross_iteration_register_deps): Use ANTI_DEP for debug insns.
      Don't add inter-loop dependencies for debug insns.
      (build_intra_loop_deps): Likewise.
      (create_ddg): Count debug insns.
      * ddg.h (struct ddg::num_debug): New.
      (num_backargs): Pair up with previous int field.
      * diagnostic.c (diagnostic_report_diagnostic): Skip notes on
      -fcompare-debug-second.
      * final.c (get_attr_length_1): Skip debug insns.
      (rest_of_clean-state): Don't dump CFA_RESTORE_STATE.
      * gcc.c (invoke_as): Call compare-debug-dump-opt.
      (driver_self_specs): Map -fdump-final-insns to
      -fdump-final-insns=..
      (get_local_tick): New.
      (compare_debug_dump_opt_spec_function): Test for . argument and
      compute output name.  Compute temp output spec without flag name.
      Compute -frandom-seed.
      (OPT): Undef after use.
      * cfgloopanal.c (num_loop_insns): Skip debug insns.
      (average_num_loop_insns): Likewise.
      * params.h (MIN_NONDEBUG_INSN_UID): New.
      * gimple.def (GIMPLE_DEBUG): New.
      * ipa-reference.c (scan_stmt_for_static_refs): Skip debug stmts.
      * auto-inc-dec.c (merge_in_block): Skip debug insns.
      (merge_in_block): Fix whitespace.
      * toplev.c (flag_var_tracking): Update comment.
      (flag_var_tracking_assignments): New.
      (flag_var_tracking_assignments_toggle): New.
      (process_options): Don't open final insns dump file if we're not
      going to write to it.  Compute defaults for var_tracking.
      * df-scan.c (df_insn_rescan_debug_internal): New.
      (df_uses_record): Handle debug insns.
      * haifa-sched.c (ready): Initialize n_debug.
      (contributes_to_priority): Skip debug insns.
      (dep_list_size): New.
      (priority): Use it.
      (rank_for_schedule): Likewise.  Schedule debug insns as soon as
      they're ready.  Disregard previous debug insns to make decisions.
      (queue_insn): Never queue debug insns.
      (ready_add, ready_remove_first, ready_remove): Count debug insns.
      (schedule_insn): Don't reject debug insns because of issue rate.
      (get_ebb_head_tail, no_real_insns_p): Skip boundary debug insns.
      (queue_to_ready): Skip and discount debug insns.
      (choose_ready): Let debug insns through.
      (schedule_block): Check boundary debug insns.  Discount debug
      insns, schedule them early.  Adjust whitespace.
      (set_priorities): Check for boundary debug insns.
      (add_jump_dependencies): Use dep_list_size.
      (prev_non_location_insn): New.
      (check_cfg): Use it.
      * tree-ssa-loop-ivopts.c (find-interesting_users): Skip debug
      stmts.
      (remove_unused_ivs): Reset debug stmts.
      * modulo-sched.c (const_iteration_count): Skip debug insns.
      (res_MII): Discount debug insns.
      (loop_single_full_bb_p): Skip debug insns.
      (sms_schedule): Likewise.
      (sms_schedule_by_order): Likewise.
      (ps_has_conflicts): Likewise.
      * caller-save.c (refmarker_fn): New.
      (save_call_clobbered_regs): Replace regs with saved mem in
      debug insns.
      (mark_referenced_regs): Take pointer, mark and arg.  Adjust.
      Call refmarker_fn mark for hardregnos.
      (mark_reg_as_referenced): New.
      (replace_reg_with_saved_mem): New.
      * ipa-pure-const.c (check_stmt): Skip debug stmts.
      * cse.c (cse_insn): Canonicalize debug insns.  Skip them when
      searching back.
      (cse_extended_basic_block): Skip debug insns.
      (count_reg_usage): Likewise.
      (is_dead_reg): New, split out of...
      (set_live_p): ... here.
      (insn_live_p): Use it for debug insns.
      * tree-stdarg.c (check_all_va_list_escapes): Skip debug stmts.
      (execute_optimize_stdarg): Likewise.
      * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise.
      * tree-ssa-propagate.c (substitute_and_fold): Don't regard
      changes in debug stmts as changes.
      * sel-sched.c (moving_insn_creates_bookkeeping_block_p): New.
      (moveup_expr): Don't move across debug insns.  Don't move
      debug insn if it would create a bookkeeping block.
      (moveup_expr_cached): Don't use cache for debug insns that
      are heads of blocks.
      (compute_av_set_inside_bb): Skip debug insns.
      (sel_rank_for_schedule): Schedule debug insns first.  Remove
      dead code.
      (block_valid_for_bookkeeping_p); Support lax searches.
      (create_block_for_bookkeeping): Adjust block numbers when
      encountering debug-only blocks.
      (find_place_for_bookkeeping): Deal with debug-only blocks.
      (generate_bookkeeping_insn): Accept no place to insert.
      (remove_temp_moveop_nops): New argument full_tidying.
      (prepare_place_to_insert): Deal with debug insns.
      (advance_state_on_fence): Debug insns don't start cycles.
      (update_boundaries): Take fence as argument.  Deal with
      debug insns.
      (schedule_expr_on_boundary): No full_tidying on debug insns.
      (fill_insns): Deal with debug insns.
      (track_scheduled_insns_and_blocks): Don't count debug insns.
      (need_nop_to_preserve_insn_bb): New, split out of...
      (remove_insn_from_stream): ... this.
      (fur_orig_expr_not_found): Skip debug insns.
      * rtl.def (VALUE): Move up.
      (DEBUG_INSN): New.
      * tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug
      stmts.
      (nearest_common_dominator_of_uses): Take debug_stmts argument.
      Set it if debug stmts are found.
      (statement_sink_location): Skip debug stmts.  Propagate
      moving defs into debug stmts.
      * ifcvt.c (first_active_insn): Skip debug insns.
      (last_active_insns): Likewise.
      (cond_exec_process_insns): Likewise.
      (noce_process_if_block): Likewise.
      (check_cond_move_block): Likewise.
      (cond_move_convert_if_block): Likewise.
      (block_jumps_and_fallthru_p): Likewise.
      (dead_or_predicable): Likewise.
      * dwarf2out.c (debug_str_hash_forced): New.
      (find_AT_string): Add comment.
      (gen_label_for_indirect_string): New.
      (get_debug_string_label): New.
      (AT_string_form): Use it.
      (mem_loc_descriptor): Handle non-TLS symbols.  Handle MINUS , DIV,
      MOD, AND, IOR, XOR, NOT, ABS, NEG, and CONST_STRING.  Accept but
      discard COMPARE, IF_THEN_ELSE, ROTATE, ROTATERT, TRUNCATE and
      several operations that cannot be represented with DWARF opcodes.
      (loc_descriptor): Ignore SIGN_EXTEND and ZERO_EXTEND.  Require
      dwarf_version 4 for DW_OP_implicit_value and DW_OP_stack_value.
      (dwarf2out_var_location): Take during-call mark into account.
      (output_indirect_string): Update comment.  Output if there are
      label and references.
      (prune_indirect_string): New.
      (prune_unused_types): Call it if debug_str_hash_forced.
      More in dwarf2out.c, from Jakub Jelinek <jakub@redhat.com>:
      (dw_long_long_const): Remove.
      (struct dw_val_struct): Change val_long_long type to rtx.
      (print_die, attr_checksum, same_dw_val_p, loc_descriptor): Adjust for
      val_long_long change to CONST_DOUBLE rtx from a long hi/lo pair.
      (output_die): Likewise.  Use HOST_BITS_PER_WIDE_INT size of each
      component instead of HOST_BITS_PER_LONG.
      (output_loc_operands): Likewise.   For const8* assert
      HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64.
      (output_loc_operands_raw): For const8* assert HOST_BITS_PER_WIDE_INT
      rather than HOST_BITS_PER_LONG is >= 64.
      (add_AT_long_long): Remove val_hi and val_lo arguments, add
      val_const_double.
      (size_of_die): Use HOST_BITS_PER_WIDE_INT size multiplier instead of
      HOST_BITS_PER_LONG for dw_val_class_long_long.
      (add_const_value_attribute): Adjust add_AT_long_long caller.  Don't
      handle TLS SYMBOL_REFs.  If CONST wraps a constant, tail recurse.
      (dwarf_stack_op_name): Handle DW_OP_implicit_value and
      DW_OP_stack_value.
      (size_of_loc_descr, output_loc_operands, output_loc_operands_raw):
      Handle DW_OP_implicit_value.
      (extract_int): Move prototype earlier.
      (mem_loc_descriptor): For SUBREG punt if inner
      mode size is wider than DWARF2_ADDR_SIZE.  Handle SIGN_EXTEND
      and ZERO_EXTEND by DW_OP_shl and DW_OP_shr{a,}.  Handle
      EQ, NE, GT, GE, LT, LE, GTU, GEU, LTU, LEU, SMIN, SMAX, UMIN,
      UMAX, SIGN_EXTRACT, ZERO_EXTRACT.
      (loc_descriptor): Compare mode size with DWARF2_ADDR_SIZE
      instead of Pmode size.
      (loc_descriptor): Add MODE argument.  Handle CONST_INT, CONST_DOUBLE,
      CONST_VECTOR, CONST, LABEL_REF and SYMBOL_REF if mode != VOIDmode,
      attempt to handle other expressions.  Don't handle TLS SYMBOL_REFs.
      (concat_loc_descriptor, concatn_loc_descriptor,
      loc_descriptor_from_tree_1): Adjust loc_descriptor callers.
      (add_location_or_const_value_attribute): Likewise.  For single
      location loc_lists attempt to use add_const_value_attribute
      for constant decls.  Add DW_AT_const_value even if
      NOTE_VAR_LOCATION is VAR_LOCATION with CONSTANT_P or CONST_STRING
      in its expression.
      * cfgbuild.c (inside_basic_block_p): Handle debug insns.
      (control_flow_insn_p): Likewise.
      * tree-parloops.c (eliminate_local_variables_stmt): Handle debug
      stmt.
      (separate_decls_in_region_debug_bind): New.
      (separate_decls_in_region): Process debug bind stmts afterwards.
      * recog.c (verify_changes): Handle debug insns.
      (extract_insn): Likewise.
      (peephole2_optimize): Skip debug insns.
      * dse.c (scan_insn): Skip debug insns.
      * sel-sched-ir.c (return_nop_to_pool): Take full_tidying argument.
      Pass it on.
      (setup_id_for_insn): Handle debug insns.
      (maybe_tidy_empty_bb): Adjust whitespace.
      (tidy_control_flow): Skip debug insns.
      (sel_remove_insn): Adjust for debug insns.
      (sel_estimate_number_of_insns): Skip debug insns.
      (create_insn_rtx_from_pattern): Handle debug insns.
      (create_copy_of_insn_rtx): Likewise.
      * sel-sched-.h (sel_bb_end): Declare.
      (sel_bb_empty_or_nop_p): New.
      (get_all_loop_exits): Use it.
      (_eligible_successor_edge_p): Likewise.
      (return_nop_to_pool): Adjust.
      * tree-eh.c (tre_empty_eh_handler_p): Skip debug stmts.
      * ira-lives.c (process_bb_node_lives): Skip debug insns.
      * gimple-pretty-print.c (dump_gimple_debug): New.
      (dump_gimple_stmt): Use it.
      (dump_bb_header): Skip gimple debug stmts.
      * regmove.c (optimize_reg_copy_1): Discount debug insns.
      (fixup_match_2): Likewise.
      (regmove_backward_pass): Likewise.  Simplify combined
      replacement.  Handle debug insns.
      * function.c (instantiate_virtual_regs): Handle debug insns.
      * function.h (struct emit_status): Add x_cur_debug_insn_uid.
      * print-rtl.h: Include cselib.h.
      (print_rtx): Print VALUEs.  Split out and recurse for
      VAR_LOCATIONs.
      * df.h (df_inns_rescan_debug_internal): Declare.
      * gcse.c (alloc_hash_table): Estimate n_insns.
      (cprop_insn): Don't regard debug insns as changes.
      (bypass_conditional_jumps): Skip debug insns.
      (one_pre_gcse_pass): Adjust.
      (one_code_hoisting_pass): Likewise.
      (compute_ld_motion_mems): Skip debug insns.
      (one_cprop_pass): Adjust.
      * tree-if-conv.c (tree_if_convert_stmt): Reset debug stmts.
      (if_convertible_stmt_p): Handle debug stmts.
      * init-regs.c (initialize_uninitialized_regs): Skip debug insns.
      * tree-vect-loop.c (vect_is_simple_reduction): Skip debug stmts.
      * ira-build.c (create_bb_allocnos): Skip debug insns.
      * tree-flow-inline.h (has_zero_uses): Discount debug stmts.
      (has_single_use): Likewise.
      (single_imm_use): Likewise.
      (num_imm_uses): Likewise.
      * tree-ssa-phiopt.c (empty_block_p): Skip debug stmts.
      * tree-ssa-coalesce.c (build_ssa_conflict_graph): Skip debug stmts.
      (create_outofssa_var_map): Likewise.
      * lower-subreg.c (adjust_decomposed_uses): New.
      (resolve_debug): New.
      (decompose_multiword_subregs): Use it.
      * tree-dfa.c (find_referenced_vars): Skip debug stmts.
      * emit-rtl.c: Include params.h.
      (cur_debug_insn_uid): Define.
      (set_new_first_and_last_insn): Set cur_debug_insn_uid too.
      (copy_rtx_if_shared_1): Handle debug insns.
      (reset_used_flags): Likewise.
      (set_used_flags): LIkewise.
      (get_max_insn_count): New.
      (next_nondebug_insn): New.
      (prev_nondebug_insn): New.
      (make_debug_insn_raw): New.
      (emit_insn_before_noloc): Handle debug insns.
      (emit_jump_insn_before_noloc): Likewise.
      (emit_call_insn_before_noloc): Likewise.
      (emit_debug_insn_before_noloc): New.
      (emit_insn_after_noloc): Handle debug insns.
      (emit_jump_insn_after_noloc): Likewise.
      (emit_call_insn_after_noloc): Likewise.
      (emit_debug_insn_after_noloc): Likewise.
      (emit_insn_after): Take loc from earlier non-debug insn.
      (emit_jump_insn_after): Likewise.
      (emit_call_insn_after): Likewise.
      (emit_debug_insn_after_setloc): New.
      (emit_debug_insn_after): New.
      (emit_insn_before): Take loc from later non-debug insn.
      (emit_jump_insn_before): Likewise.
      (emit_call_insn_before): Likewise.
      (emit_debug_insn_before_setloc): New.
      (emit_debug_insn_before): New.
      (emit_insn): Handle debug insns.
      (emit_debug_insn): New.
      (emit_jump_insn): Handle debug insns.
      (emit_call_insn): Likewise.
      (emit): Likewise.
      (init_emit): Take min-nondebug-insn-uid into account.
      Initialize cur_debug_insn_uid.
      (emit_copy_of_insn_after): Handle debug insns.
      * cfgexpand.c (gimple_assign_rhs_to_tree): Do not overwrite
      location of single rhs in place.
      (maybe_dump_rtl_for_gimple_stmt): Dump lineno.
      (floor_sdiv_adjust): New.
      (cell_sdiv_adjust): New.
      (cell_udiv_adjust): New.
      (round_sdiv_adjust): New.
      (round_udiv_adjust): New.
      (wrap_constant): Moved from cselib.
      (unwrap_constant): New.
      (expand_debug_expr): New.
      (expand_debug_locations): New.
      (expand_gimple_basic_block): Drop hiding redeclaration.  Expand
      debug bind stmts.
      (gimple_expand_cfg): Expand debug locations.
      * cselib.c: Include tree-pass.h.
      (struct expand_value_data): New.
      (cselib_record_sets_hook): New.
      (PRESERVED_VALUE_P, LONG_TERM_PRESERVED_VALUE_P): New.
      (cselib_clear_table): Move, and implemnet in terms of...
      (cselib_reset_table_with_next_value): ... this.
      (cselib_get_next_unknown_value): New.
      (discard_useless_locs): Don't discard preserved values.
      (cselib_preserve_value): New.
      (cselib_preserved_value_p): New.
      (cselib_preserve_definitely): New.
      (cselib_clear_preserve): New.
      (cselib_preserve_only_values): New.
      (new_cselib_val): Take rtx argument.  Dump it in details.
      (cselib_lookup_mem): Adjust.
      (expand_loc): Take regs_active in struct.  Adjust.  Silence
      dumps unless details are requested.
      (cselib_expand_value_rtx_cb): New.
      (cselib_expand_value_rtx): Rename and reimplment in terms of...
      (cselib_expand_value_rtx_1): ... this.  Adjust.  Silence dumps
      without details.  Copy more subregs.  Try to resolve values
      using a callback.  Wrap constants.
      (cselib_subst_to_values): Adjust.
      (cselib_log_lookup): New.
      (cselib_lookup): Call it.
      (cselib_invalidate_regno): Don't count preserved values as
      useless.
      (cselib_invalidate_mem): Likewise.
      (cselib_record_set): Likewise.
      (struct set): Renamed to cselib_set, moved to cselib.h.
      (cselib_record_sets): Adjust.  Call hook.
      (cselib_process_insn): Reset table when it would be cleared.
      (dump_cselib_val): New.
      (dump_cselib_table): New.
      * tree-cfgcleanup.c (tree_forwarded_block_p): Skip debug stmts.
      (remove_forwarder_block): Support moving debug stmts.
      * cselib.h (cselib_record_sets_hook): Declare.
      (cselib_expand_callback): New type.
      (cselib_expand_value_rtx_cb): Declare.
      (cselib_reset_table_with_next_value): Declare.
      (cselib_get_next_unknown_value): Declare.
      (cselib_preserve_value): Declare.
      (cselib_preserved_value_p): Declare.
      (cselib_preserve_only_values): Declare.
      (dump_cselib_table): Declare.
      * cfgcleanup.c (flow_find_cross_jump): Skip debug insns.
      (try_crossjump_to_edge): Likewise.
      (delete_unreachable_blocks): Remove dominant GIMPLE blocks after
      dominated blocks when debug stmts are present.
      * simplify-rtx.c (delegitimize_mem_from_attrs): New.
      * tree-ssa-live.c (remove_unused_locals): Skip debug stmts.
      (set_var_live_on_entry): Likewise.
      * loop-invariant.c (find_invariants_bb): Skip debug insns.
      * cfglayout.c (curr_location, last_location): Make static.
      (set_curr_insn_source_location): Don't avoid bouncing.
      (get_curr_insn_source_location): New.
      (get_curr_insn_block): New.
      (duplicate_insn_chain): Handle debug insns.
      * tree-ssa-forwprop.c (forward_propagate_addr_expr): Propagate
      into debug stmts.
      * common.opt (fcompare-debug): Move to sort order.
      (fdump-unnumbered-links): Likewise.
      (fvar-tracking-assignments): New.
      (fvar-tracking-assignments-toggle): New.
      * tree-ssa-dce.c (mark_stmt_necessary): Don't mark blocks
      because of debug stmts.
      (mark_stmt_if_obviously_necessary): Mark debug stmts.
      (eliminate_unnecessary_stmts): Walk dominated blocks before
      dominators.
      * tree-ssa-ter.c (find_replaceable_in_bb): Skip debug stmts.
      * ira.c (memref_used_between_p): Skip debug insns.
      (update_equiv_regs): Likewise.
      * sched-deps.c (sd_lists_size): Accept empty list.
      (sd_init_insn): Mark debug insns.
      (sd_finish_insn): Unmark them.
      (sd_add_dep): Reject non-debug deps on debug insns.
      (fixup_sched_groups): Give debug insns group treatment.
      Skip debug insns.
      (sched_analyze_reg): Don't mark debug insns for sched before call.
      (sched_analyze_2): Handle debug insns.
      (sched_analyze_insn): Compute next non-debug insn.  Handle debug
      insns.
      (deps_analyze_insn): Handle debug insns.
      (deps_start_bb): Skip debug insns.
      (init_deps): Initialize last_debug_insn.
      * tree-ssa.c (target_for_debug_bind): New.
      (find_released_ssa_name): New.
      (propagate_var_def_into_debug_stmts): New.
      (propagate_defs_into_debug_stmts): New.
      (verify_ssa): Skip debug bind stmts without values.
      (warn_uninialized_vars): Skip debug stmts.
      * target-def.h (TARGET_DELEGITIMIZE_ADDRESS): Set default.
      * rtl.c (rtx_equal_p_cb): Handle VALUEs.
      (rtx_equal_p): Likewise.
      * ira-costs.c (scan_one_insn): Skip debug insns.
      (process_bb_node_for_hard_reg_moves): Likewise.
      * rtl.h (DEBUG_INSN_P): New.
      (NONDEBUG_INSN_P): New.
      (MAY_HAVE_DEBUG_INSNS): New.
      (INSN_P): Accept debug insns.
      (RTX_FRAME_RELATED_P): Likewise.
      (INSN_DELETED_P): Likewise
      (PAT_VAR_LOCATION_DECL): New.
      (PAT_VAR_LOCATION_LOC): New.
      (PAT_VAR_OCATION_STATUS): New.
      (NOTE_VAR_LOCATION_DECL): Reimplement.
      (NOTE_VAR_LOCATION_LOC): Likewise.
      (NOTE_VAR_LOCATION_STATUS): Likewise.
      (INSN_VAR_LOCATION): New.
      (INSN_VAR_LOCATION_DECL): New.
      (INSN_VAR_LOCATION_LOC): New.
      (INSN_VAR_LOCATION_STATUS): New.
      (gen_rtx_UNKNOWN_VAR_LOC): New.
      (VAR_LOC_UNKNOWN_P): New.
      (NOTE_DURING_CALL_P): New.
      (SCHED_GROUP_P): Accept debug insns.
      (emit_debug_insn_before): Declare.
      (emit_debug_insn_before_noloc): Declare.
      (emit_debug_insn_beore_setloc): Declare.
      (emit_debug_insn_after): Declare.
      (emit_debug_insn_after_noloc): Declare.
      (emit_debug_insn_after_setloc): Declare.
      (emit_debug_insn): Declare.
      (make_debug_insn_raw): Declare.
      (prev_nondebug_insn): Declare.
      (next_nondebug_insn): Declare.
      (delegitimize_mem_from_attrs): Declare.
      (get_max_insn_count): Declare.
      (wrap_constant): Declare.
      (unwrap_constant): Declare.
      (get_curr_insn_source_location): Declare.
      (get_curr_insn_block): Declare.
      * tree-inline.c (insert_debug_decl_map): New.
      (processing_debug_stmt): New.
      (remap_decl): Don't create new mappings in debug stmts.
      (remap_gimple_op_r): Don't add references in debug stmts.
      (copy_tree_body_r): Likewise.
      (remap_gimple_stmt): Handle debug bind stmts.
      (copy_bb): Skip debug stmts.
      (copy_edges_for_bb): Likewise.
      (copy_debug_stmt): New.
      (copy_debug_stmts): New.
      (copy_body): Copy debug stmts at the end.
      (insert_init_debug_bind): New.
      (insert_init_stmt): Take id.  Skip and emit debug stmts.
      (setup_one_parameter): Remap variable earlier, register debug
      mapping.
      (estimate_num_insns): Skip debug stmts.
      (expand_call_inline): Preserve debug_map.
      (optimize_inline_calls): Check for no debug_stmts left-overs.
      (unsave_expr_now): Preserve debug_map.
      (copy_gimple_seq_and_replace_locals): Likewise.
      (tree_function_versioning): Check for no debug_stmts left-overs.
      Init and destroy debug_map as needed.  Split edges unconditionally.
      (build_duplicate_type): Init and destroy debug_map as needed.
      * tree-inline.h: Include gimple.h instead of pointer-set.h.
      (struct copy_body_data): Add debug_stmts and debug_map.
      * sched-int.h (struct ready_list): Add n_debug.
      (struct deps): Add last_debug_insn.
      (DEBUG_INSN_SCHED_P): New.
      (BOUNDARY_DEBUG_INSN_P): New.
      (SCHEDULE_DEBUG_INSN_P): New.
      (sd_iterator_cond): Accept empty list.
      * combine.c (create_log_links): Skip debug insns.
      (combine_instructions): Likewise.
      (cleanup_auto_inc_dec): New.  From Jakub Jelinek: Make sure the
      return value is always unshared.
      (struct rtx_subst_pair): New.
      (auto_adjust_pair): New.
      (propagate_for_debug_subst): New.
      (propagate_for_debug): New.
      (try_combine): Skip debug insns.  Propagate removed defs into
      debug insns.
      (next_nonnote_nondebug_insn): New.
      (distribute_notes): Use it.  Skip debug insns.
      (distribute_links): Skip debug insns.
      * tree-outof-ssa.c (set_location_for_edge): Likewise.
      * resource.c (mark_target_live_regs): Likewise.
      * var-tracking.c: Include cselib.h and target.h.
      (enum micro_operation_type): Add MO_VAL_USE, MO_VAL_LOC, and
      MO_VAL_SET.
      (micro_operation_type_name): New.
      (enum emit_note_where): Add EMIT_NOTE_AFTER_CALL_INSN.
      (struct micro_operation_def): Update comments.
      (decl_or_value): New type.  Use instead of decls.
      (struct emit_note_data_def): Add vars.
      (struct attrs_def): Use decl_or_value.
      (struct variable_tracking_info_def): Add permp, flooded.
      (struct location_chain_def): Update comment.
      (struct variable_part_def): Use decl_or_value.
      (struct variable_def): Make var_part a variable length array.
      (valvar_pool): New.
      (scratch_regs): New.
      (cselib_hook_called): New.
      (dv_is_decl_p): New.
      (dv_is_value_p): New.
      (dv_as_decl): New.
      (dv_as_value): New.
      (dv_as_opaque): New.
      (dv_onepart_p): New.
      (dv_pool): New.
      (IS_DECL_CODE): New.
      (check_value_is_not_decl): New.
      (dv_from_decl): New.
      (dv_from_value): New.
      (dv_htab_hash): New.
      (variable_htab_hash): Use it.
      (variable_htab_eq): Support values.
      (variable_htab_free): Free from the right pool.
      (attrs_list_member, attrs_list_insert): Use decl_or_value.
      (attrs_list_union): Adjust.
      (attrs_list_mpdv_union): New.
      (tie_break_pointers): New.
      (canon_value_cmp): New.
      (unshare_variable): Return possibly-modified slot.
      (vars_copy_1): Adjust.
      (var_reg_decl_set): Adjust.  Split out of...
      (var_reg_set): ... this.
      (get_init_value): Adjust.
      (var_reg_delete_and_set): Adjust.
      (var_reg_delete): Adjust.
      (var_regno_delete): Adjust.
      (var_mem_decl_set): Split out of...
      (var_mem_set): ... this.
      (var_mem_delete_and_set): Adjust.
      (var_mem_delete): Adjust.
      (val_store): New.
      (val_reset): New.
      (val_resolve): New.
      (variable_union): Adjust.  Speed up merge of 1-part vars.
      (variable_canonicalize): Use unshared slot.
      (VALUED_RECURSED_INTO): New.
      (find_loc_in_1pdv): New.
      (struct dfset_merge): New.
      (insert_into_intersection): New.
      (intersect_loc_chains): New.
      (loc_cmp): New.
      (canonicalize_loc_order_check): New.
      (canonicalize_values_mark): New.
      (canonicalize_values_star): New.
      (variable_merge_over_cur): New.
      (variable_merge_over_src): New.
      (dataflow_set_merge): New.
      (dataflow_set_equiv_regs): New.
      (remove_duplicate_values): New.
      (struct dfset_post_merge): New.
      (variable_post_merge_new_vals): New.
      (variable_post_merge_perm_vals): New.
      (dataflow_post_merge_adjust): New.
      (find_mem_expr_in_1pdv): New.
      (dataflow_set_preserve_mem_locs): New.
      (dataflow_set_remove_mem_locs): New.
      (dataflow_set_clear_at_call): New.
      (onepart_variable_different_p): New.
      (variable_different_p): Use it.
      (dataflow_set_different_1): Adjust.  Make detailed dump
      more verbose.
      (track_expr_p): Add need_rtl parameter.  Don't generate rtl
      if not needed.
      (track_loc_p): Pass it true.
      (struct count_use_info): New.
      (find_use_val): New.
      (replace_expr_with_values): New.
      (log_op_type): New.
      (use_type): New, partially split out of...
      (count_uses): ... this.  Count new micro-ops.
      (count_uses_1): Adjust.
      (count_stores): Adjust.
      (count_with_sets): New.
      (VAL_NEEDS_RESOLUTION): New.
      (VAL_HOLDS_TRACK_EXPR): New.
      (VAL_EXPR_IS_COPIED): New.
      (VAL_EXPR_IS_CLOBBERED): New.
      (add_uses): Adjust.  Generate new micro-ops.
      (add_uses_1): Adjust.
      (add_stores): Generate new micro-ops.
      (add_with_sets): New.
      (find_src_status): Adjust.
      (find_src_set_src): Adjust.
      (compute_bb_dataflow): Use dataflow_set_clear_at_call.
      Handle new micro-ops.  Canonicalize value equivalances.
      (vt_find_locations): Compute total size of hash tables for
      dumping.  Perform merge for var-tracking-assignments.  Don't
      disregard single-block loops.
      (dump_attrs_list): Handle decl_or_value.
      (dump_variable): Take variable.  Deal with decl_or_value.
      (dump_variable_slot): New.
      (dump_vars): Use it.
      (dump_dataflow_sets): Adjust.
      (set_slot_part): New, extended to support one-part variables
      after splitting out of...
      (set_variable_part): ... this.
      (clobber_slot_part): New, split out of...
      (clobber_variable_part): ... this.
      (delete_slot_part): New, split out of...
      (delete_variable_part): .... this.
      (check_wrap_constant): New.
      (vt_expand_loc_callback): New.
      (vt_expand_loc): New.
      (emit_note_insn_var_location): Adjust.  Handle values.  Handle
      EMIT_NOTE_AFTER_CALL_INSN.
      (emit_notes_for_differences_1): Adjust.  Handle values.
      (emit_notes_for_differences_2): Likewise.
      (emit_notes_for_differences): Adjust.
      (emit_notes_in_bb): Take pointer to set.  Emit AFTER_CALL_INSN
      notes.  Adjust.  Handle new micro-ops.
      (vt_add_function_parameters): Adjust.  Create and bind values.
      (vt_initialize): Adjust.  Initialize scratch_regs and
      valvar_pool, flooded and perm..  Initialize and use cselib.  Log
      operations.  Move some code to count_with_sets and add_with_sets.
      (delete_debug_insns): New.
      (vt_debug_insns_local): New.
      (vt_finalize): Release permp, valvar_pool, scratch_regs.  Finish
      cselib.
      (var_tracking_main): If var-tracking-assignments is enabled
      but var-tracking isn't, delete debug insns and leave.  Likewise
      if we exceed limits or fail the stack adjustments tests, and
      after all var-tracking processing.
      More in var-tracking, from Jakub Jelinek <jakub@redhat.com>:
      (dataflow_set): Add traversed_vars.
      (value_chain, const_value_chain): New typedefs.
      (value_chain_pool, value_chains): New variables.
      (value_chain_htab_hash, value_chain_htab_eq, add_value_chain,
      add_value_chains, add_cselib_value_chains, remove_value_chain,
      remove_value_chains, remove_cselib_value_chains): New functions.
      (shared_hash_find_slot_unshare_1, shared_hash_find_slot_1,
      shared_hash_find_slot_noinsert_1, shared_hash_find_1): New
      static inlines.
      (shared_hash_find_slot_unshare, shared_hash_find_slot,
      shared_hash_find_slot_noinsert, shared_hash_find): Update.
      (dst_can_be_shared): New variable.
      (unshare_variable): Unshare set->vars if shared, use shared_hash_*.
      Clear dst_can_be_shared.  If set->traversed_vars is non-NULL and
      different from set->vars, look up slot again instead of using the
      passed in slot.
      (dataflow_set_init): Initialize traversed_vars.
      (variable_union): Use shared_hash_*.  Use initially NO_INSERT
      lookup if set->vars is shared.  Don't keep slot cleared before
      calling unshare_variable.  Unshare set->vars if needed.  Adjust
      unshare_variable callers.  Clear dst_can_be_shared if needed.
      Even ->refcount == 1 vars must be unshared if set->vars is shared
      and var needs to be modified.
      (dataflow_set_union): Set traversed_vars during canonicalization.
      (VALUE_CHANGED, DECL_CHANGED): Define.
      (set_dv_changed, dv_changed_p): New static inlines.
      (track_expr_p): Clear DECL_CHANGED.
      (dump_dataflow_sets): Set it.
      (variable_was_changed): Call set_dv_changed.
      (emit_note_insn_var_location): Likewise.
      (changed_variables_stack): New variable.
      (check_changed_vars_1, check_changed_vars_2): New functions.
      (emit_notes_for_changes): Do nothing if changed_variables is
      empty.  Traverse changed_variables with check_changed_vars_1,
      call check_changed_vars_2 on each changed_variables_stack entry.
      (emit_notes_in_bb): Add SET argument.  Just clear it at the
      beginning, use it instead of local &set, don't destroy it at the
      end.
      (vt_emit_notes): Call dataflow_set_clear early on all
      VTI(bb)->out sets, never use them, instead use emit_notes_in_bb
      computed set, dataflow_set_clear also VTI(bb)->in when we are
      done with the basic block.  Initialize changed_variables_stack,
      free it afterwards.  If ENABLE_CHECKING verify that after noting
      differences to an empty set value_chains hash table is empty.
      (vt_initialize): Initialize value_chains and value_chain_pool.
      (vt_finalize): Delete value_chains htab, free value_chain_pool.
      (variable_tracking_main): Call dump_dataflow_sets before calling
      vt_emit_notes, not after it.
      * tree-flow.h (propagate_defs_into_debug_stmts): Declare.
      (propagate_var_def_into_debug_stmts): Declare.
      * df-problems.c (df_lr_bb_local_compute): Skip debug insns.
      (df_set_note): Reject debug insns.
      (df_whole_mw_reg_dead_p): Take added_notes_p argument.  Don't
      add notes to debug insns.
      (df_note_bb_compute): Adjust.  Likewise.
      (df_simulate_uses): Skip debug insns.
      (df_simulate_initialize_backwards): Likewise.
      * reg-stack.c (subst_stack_regs_in_debug_insn): New.
      (subst_stack_regs_pat): Reject debug insns.
      (convert_regs_1): Handle debug insns.
      * Makefile.in (TREE_INLINE_H): Take pointer-set.h from GIMPLE_H.
      (print-rtl.o): Depend on cselib.h.
      (cselib.o): Depend on TREE_PASS_H.
      (var-tracking.o): Depend on cselib.h and TARGET_H.
      * sched-rgn.c (rgn_estimate_number_of_insns): Discount
      debug insns.
      (init_ready_list): Skip boundary debug insns.
      (add_branch_dependences): Skip debug insns.
      (free_block_dependencies): Check for blocks with only debug
      insns.
      (compute_priorities): Likewise.
      * gimple.c (gss_for_code): Handle GIMPLE_DEBUG.
      (gimple_build_with_ops_stat): Take subcode as unsigned.  Adjust
      all callers.
      (gimple_build_debug_bind_stat): New.
      (empty_body_p): Skip debug stmts.
      (gimple_has_side_effects): Likewise.
      (gimple_rhs_has_side_effects): Likewise.
      * gimple.h (enum gimple_debug_subcode, GIMPLE_DEBUG_BIND): New.
      (gimple_build_debug_bind_stat): Declare.
      (gimple_build_debug_bind): Define.
      (is_gimple_debug): New.
      (gimple_debug_bind_p): New.
      (gimple_debug_bind_get_var): New.
      (gimple_debug_bind_get_value): New.
      (gimple_debug_bind_get_value_ptr): New.
      (gimple_debug_bind_set_var): New.
      (gimple_debug_bind_set_value): New.
      (GIMPLE_DEBUG_BIND_NOVALUE): New internal temporary macro.
      (gimple_debug_bind_reset_value): New.
      (gimple_debug_bind_has_value_p): New.
      (gsi_next_nondebug): New.
      (gsi_prev_nondebug): New.
      (gsi_start_nondebug_bb): New.
      (gsi_last_nondebug_bb): New.
      * sched-vis.c (print_pattern): Handle VAR_LOCATION.
      (print_insn): Handle DEBUG_INSN.
      * tree-cfg.c (remove_bb): Walk stmts backwards.  Let loc
      of first insn prevail.
      (first_stmt): Skip debug stmts.
      (first_non_label_stmt): Likewise.
      (last_stmt): Likewise.
      (has_zero_uses_1): New.
      (single_imm_use_1): New.
      (verify_gimple_debug): New.
      (verify_types_in_gimple_stmt): Handle debug stmts.
      (verify_stmt): Likewise.
      (debug_loop_num): Skip debug stmts.
      (remove_edge_and_dominated_blocks): Remove dominators last.
      * tree-ssa-reasssoc.c (rewrite_expr_tree): Propagate into
      debug stmts.
      (linearize_expr): Likewise.
      * config/i386/i386.c (ix86_delegitimize_address): Call
      default implementation.
      * config/ia64/ia64.c (ia64_safe_itanium_class): Handle debug
      insns.
      (group_barrier_needed): Skip debug insns.
      (emit_insn_group_barriers): Likewise.
      (emit_all_insn_group_barriers): Likewise.
      (ia64_variable_issue): Handle debug insns.
      (ia64_dfa_new_cycle): Likewise.
      (final_emit_insn_group_barriers): Skip debug insns.
      (ia64_dwarf2out_def_steady_cfa): Take frame argument.  Don't
      def cfa without frame.
      (process_set): Likewise.
      (process_for_unwind_directive): Pass frame on.
      * config/rs6000/rs6000.c (TARGET_DELEGITIMIZE_ADDRESS): Define.
      (rs6000_delegitimize_address): New.
      (rs6000_debug_adjust_cost): Handle debug insns.
      (is_microcoded_insn): Likewise.
      (is_cracked_insn): Likewise.
      (is_nonpipeline_insn): Likewise.
      (insn_must_be_first_in_group): Likewise.
      (insn_must_be_last_in_group): Likewise.
      (force_new_group): Likewise.
      * cfgrtl.c (rtl_split_block): Emit INSN_DELETED note if block
      contains only debug insns.
      (rtl_merge_blocks): Skip debug insns.
      (purge_dead_edges): Likewise.
      (rtl_block_ends_with_call_p): Skip debug insns.
      * dce.c (deletable_insn_p): Handle VAR_LOCATION.
      (mark_reg_dependencies): Skip debug insns.
      * params.def (PARAM_MIN_NONDEBUG_INSN_UID): New.
      * tree-ssanames.c (release_ssa_name): Propagate def into
      debug stmts.
      * tree-ssa-threadedge.c
      (record_temporary_equivalences_from_stmts): Skip debug stmts.
      * regcprop.c (replace_oldest_value_addr): Skip debug insns.
      (replace_oldest_value_mem): Use ALL_REGS for debug insns.
      (copyprop_hardreg_forward_1): Handle debug insns.
      * reload1.c (reload): Skip debug insns.  Replace unassigned
      pseudos in debug insns with their equivalences.
      (eliminate_regs_in_insn): Skip debug insns.
      (emit_input_reload_insns): Skip debug insns at first, adjust
      them later.
      * tree-ssa-operands.c (add_virtual_operand): Reject debug stmts.
      (get_indirect_ref_operands): Pass opf_no_vops on.
      (get_expr_operands): Likewise.  Skip debug stmts.
      (parse_ssa_operands): Scan debug insns with opf_no_vops.
      gcc/testsuite/ChangeLog:
      * gcc.dg/guality/guality.c: New.
      * gcc.dg/guality/guality.h: New.
      * gcc.dg/guality/guality.exp: New.
      * gcc.dg/guality/example.c: New.
      * lib/gcc-dg.exp (cleanup-dump): Remove .gk files.
      (cleanup-saved-temps): Likewise, .gkd files too.
      gcc/cp/ChangeLog:
      * cp-tree.h (TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS): New.
      * cp-lang.c (cxx_dwarf_name): Pass it.
      * error.c (count_non_default_template_args): Take flags as
      argument.  Adjust all callers.  Skip counting of default
      arguments if the new flag is given.
      ChangeLog:
      * Makefile.tpl (BUILD_CONFIG): Default to bootstrap-debug.
      * Makefile.in: Rebuilt.
      contrib/ChangeLog:
      * compare-debug: Look for .gkd files and compare them.
      config/ChangeLog:
      * bootstrap-debug.mk: Add comments.
      * bootstrap-debug-big.mk: New.
      * bootstrap-debug-lean.mk: New.
      * bootstrap-debug-ckovw.mk: Add comments.
      * bootstrap-debug-lib.mk: Drop CFLAGS for stages.  Use -g0
      for TFLAGS in stage1.  Drop -fvar-tracking-assignments-toggle.
      
      From-SVN: r151312
      Alexandre Oliva committed
  29. 07 Aug, 2009 1 commit
    • dwarf2out.c (output_fde): When doing hot/cold partitioning... · 17f6e37d
      	* dwarf2out.c (output_fde): When doing hot/cold partitioning, use
      	fde->dw_fde_begin as begin label instead of hot/cold label.
      	Use LLSDAC label instead of LLSDA for second section lsda.
      	(dwarf2out_do_cfi_startproc): Add SECOND argument.  Use LLSDAC
      	label instead of LLSDA if it is true.
      	(dwarf2out_begin_prologue, dwarf2out_switch_text_section): Adjust
      	callers.
      	* except.c (add_call_site, dw2_size_of_call_site_table): Add
      	SECTION argument.  Use it as index into crtl->eh.call_site_record
      	array.
      	(dw2_output_call_site_table): Likewise.  Add CS_FORMAT argument,
      	use it to determine how to print table entries instead of using
      	#ifdef HAVE_AS_LEB128.  For SECTION > 0 use hot resp. cold
      	label instead of normal begin label as base.
      	(sjlj_assign_call_site_values): Adjust add_call_site caller.
      	(convert_to_eh_region_ranges): When doing hot/cold partitioning,
      	ensure no EH range spans between sections and that landing pads
      	are always in the corresponding section.
      	(sjlj_size_of_call_site_table, sjlj_output_call_site_table): Adjust
      	for crtl->eh.call_site_record being an array rather than scalar.
      	(output_one_function_exception_table): New function, copied
      	from output_function_exception_table.  Adjust
      	dw2_size_of_call_site_table, dw2_output_call_site_table
      	callers.  For SECOND section use *C suffixed labels.
      	(output_function_exception_table): Call
      	output_one_function_exception_table and, when doing hot/cold
      	partitioning, also another time for the second section.
      	* opts.c: Include except.h.
      	(decode_options): Allow -freorder-blocks-and-partition with
      	exceptions, unless SJLJ or TARGET_UNWIND_INFO.
      	* Makefile.in (opts.o): Depend on $(EXCEPT_H).
      	* function.h (struct rtl_eh): Change call_site_record from
      	scalar into array of 2 elements.
      
      	* g++.dg/tree-prof/partition1.C: New test.
      
      From-SVN: r150553
      Jakub Jelinek committed
  30. 17 Jul, 2009 1 commit
    • re PR c/40401 (ICE: verify_gimple failed) · a406865a
      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
      Richard Guenther committed
  31. 18 Jun, 2009 1 commit
  32. 12 Jun, 2009 1 commit
    • common.opt (gdwarf-): Accept a version number. · 53b2323e
      	* common.opt (gdwarf-): Accept a version number.
      	* doc/invoke.texi (gdwarf-): Update docs.
      	* opth-gen.awk: Special case -gdwarf+ to OPT_gdwarfplus.
      	* opts.c (common_handle_option) [OPT_gdwarf_]: Verify dwarf
      	version level, and record it.
      
      	* dwarf2.h (DW_CIE_VERSION): Remove.
      	* dwarf2out.c (DWARF_VERSION): Remove.
      	(add_fde_cfi): Skip DW_CFA_set_loc addition for dwarf3.
      	(output_call_frame_info): Use CIE version 3 for dwarf3,
      	or if the return register column is out of range for version 1.
      	(dwarf_stack_op_name): Add all dwarf3 values.
      	(DEBUG_PUBTYPES_SECTION): New.
      	(size_of_die) [dw_val_class_die_ref]: Handle DW_FORM_ref_addr
      	encoding change for dwarf3.
      	(output_die) [dw_val_class_die_ref]: Likewise.
      	(output_compilation_unit_header): Emit correct version for dwarf3.
      	(output_line_info): Likewise.
      	(output_pubnames): Update for DWARF_VERSION removal.
      	(output_aranges): Likewise.
      	(gen_subprogram_die): Emit DW_OP_call_frame_cfa if emitting dwarf3.
      	(dwarf2out_init): Don't ifdef DEBUG_PUBTYPES_SECTION.
      	(dwarf2out_finish): Likewise.
      
      ada/
      	* gcc-interface/misc.c (gnat_handle_option): Rename
      	OPT_gdwarf_ to OPT_gdwarfplus.
      
      From-SVN: r148408
      Richard Henderson committed
  33. 14 May, 2009 1 commit
  34. 08 May, 2009 1 commit
    • re PR rtl-optimization/33928 (30% performance slowdown in floating-point code caused by r118475) · 00952e97
      2009-05-08  Paolo Bonzini  <bonzini@gnu.org>
      
      	PR rtl-optimization/33928
      	PR 26854
      	* fwprop.c (use_def_ref, get_def_for_use, bitmap_only_bit_bitween,
      	process_uses, build_single_def_use_links): New.
      	(update_df): Update use_def_ref.
      	(forward_propagate_into): Use get_def_for_use instead of use-def
      	chains.
      	(fwprop_init): Call build_single_def_use_links and let it initialize
      	dataflow.
      	(fwprop_done): Free use_def_ref.
      	(fwprop_addr): Eliminate duplicate call to df_set_flags.
      	* df-problems.c (df_rd_simulate_artificial_defs_at_top, 
      	df_rd_simulate_one_insn): New.
      	(df_rd_bb_local_compute_process_def): Update head comment.
      	(df_chain_create_bb): Use the new RD simulation functions.
      	* df.h (df_rd_simulate_artificial_defs_at_top, 
      	df_rd_simulate_one_insn): New.
      	* opts.c (decode_options): Enable fwprop at -O1.
      	* doc/invoke.texi (-fforward-propagate): Document this.
      
      From-SVN: r147282
      Paolo Bonzini committed
  35. 07 May, 2009 1 commit
  36. 03 May, 2009 1 commit
    • flags.h (extra_warnings): Delete. · 62a67c94
      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
      Manuel López-Ibáñez committed
  37. 26 Apr, 2009 1 commit
  38. 24 Apr, 2009 1 commit
    • combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. · 32e8bb8e
      gcc/:
      	* combine.c (record_value_for_reg): Change 0 to VOIDmode, twice.
      	(record_dead_and_set_regs): Likewise.
      	* df.h (struct df_mw_hardreg): Change flags field to int.
      	(struct df_base_ref): Likewise.
      	(struct df): Change changeable_flags field to int.
      	* df-scan.c (df_defs_record): Change clobber_flags to int.
      	* dwarf2.h (enum dwarf_tag): Make lo_user and hi_user values enum
      	constants rather than #define macros.
      	(enum dwarf_attribute, enum dwarf_location_atom): Likewise.
      	(enum dwarf_type, enum dwarf_endianity_encoding): Likewise.
      	(enum dwarf_calling_convention): Likewise.
      	(enum dwarf_line_number_x_ops): Likewise.
      	(enum dwarf_call_frame_info): Likewise.
      	(enum dwarf_source_language): Likewise.
      	* dwarf2out.c (int_loc_descriptor): Add cast to enum type.
      	(add_calling_convention_attribute): Likewise.
      	* fold-const.c (fold_undefer_overflow_warnings): Add cast to enum
      	type.
      	(combine_comparisons): Change compcode to int.  Add cast to enum
      	type.
      	* genrecog.c (maybe_both_true_2): Change c to int.
      	(write_switch): Likewise.  Add cast to enum type.
      	* gimplify.c (gimplify_omp_for): Handle return values from
      	gimplify_expr using MIN rather than bitwise or.
      	(gimplify_expr): Add cast to enum type.
      	* ipa-prop.c (update_jump_functions_after_inlining): Change
      	IPA_BOTTOM to IPA_JF_UNKNOWN.
      	* ira.c (setup_class_subset_and_memory_move_costs): Change mode to
      	int.  Add casts to enum type.
      	(setup_cover_and_important_classes): Change cl to int.  Add casts
      	to enum type.
      	(setup_class_translate): Change cl and mode to int.
      	(ira_init_once): Change mode to int.
      	(free_register_move_costs): Likewise.
      	(setup_prohibited_mode_move_regs): Add casts to enum type.
      	* langhooks.c (add_builtin_function_common): Rework assertion that
      	value fits bitfield.
      	* mcf.c (add_fixup_edge): Change type parameter to edge_type.
      	* omega.c (omega_do_elimination): Avoid math on enum types.
      	* optabs.c (expand_vec_shift_expr): Remove casts to int.
      	* opts.c (set_debug_level): Change 2 to enum constant.  Use new
      	int local to handle integral_argment value.
      	* regmove.c (try_auto_increment): Change PUT_MODE to
      	PUT_REG_NOTE_KIND.
      	* reload.c (push_secondary_reload): Add casts to enum type.
      	(secondary_reload_class, find_valid_class): Likewise.
      	* reload1.c (emit_input_reload_insns): Likewise.
      	* rtl.h (NOTE_VAR_LOCATION_STATUS): Likewise.
      	* sel-sched.c (init_hard_regs_data): Change cur_mode to int.
      	* sel-sched-ir.c (hash_with_unspec_callback): Change 0 to enum
      	constant.
      	* tree.c (build_common_builtin_nodes): Add casts to enum type.
      	* tree-complex.c (complex_lattice_t): Typedef to int rather than
      	enum type.
      	(expand_complex_libcall): Add casts to enum type.
      	* tree-into-ssa.c (get_ssa_name_ann): Change 0 to enum constant.
      	* tree-vect-loop.c (vect_model_reduction_cost): Compare reduc_code
      	with ERROR_MARK, not NUM_TREE_CODES.
      	(vect_create_epilog_for_reduction): Likewise.
      	(vectorizable_reduction): Don't initialize epiloc_reduc_code.
      	When not using it, set it to ERROR_MARK rather than
      	NUM_TREE_CODES.
      	* tree-vect-patterns.c (vect_pattern_recog_1): Change vec_mode to
      	enum machine_mode.
      	* tree-vect-stmts.c (new_stmt_vec_info): Change 0 to
      	vect_unused_in_loop.  Change 0 to loop_vect.
      	* tree-vectorizer.c (vect_set_verbosity_level): Add casts to enum
      	type.
      	* var-tracking.c (get_init_value): Change return type to enum
      	var_init_status.
      	* vec.h (DEF_VEC_FUNC_P) [iterate]: Cast 0 to type T.
      	* config/arm/arm.c (fp_model_for_fpu): Change to array to enum
      	arm_fp_model.
      	(arm_override_options): Add casts to enum type.
      	(arm_emit_tls_decoration): Likewise.
      	* config/i386/i386.c (ix86_function_specific_restore): Add casts
      	to enum type.
      	* config/i386/i386-c.c (ix86_pragma_target_parse): Likewise.
      	* config/ia64/ia64.c (ia64_expand_compare): Change magic to int.
      	* config/rs6000/rs6000.c (rs6000_override_options): Add casts to
      	enum type.
      	* config/s390/s390.c (code_for_builtin_64): Change to array of
      	enum insn_code.
      	(code_for_builtin_31): Likewise.
      	(s390_expand_builtin): Change code_for_builtin to enum insn_code
      	const *.
      	* config/sparc/sparc.c (sparc_override_options): Change value
      	field in struct code_model to enum cmodel.  In initializer change
      	0 to NULL and add cast to enum type.
      
      	* c-typeck.c (build_modify_expr): Add lhs_origtype parameter.
      	Change all callers.  Issue a -Wc++-compat warning using
      	lhs_origtype if necessary.
      	(convert_for_assignment): Issue -Wc++-compat warnings about
      	invalid conversions to enum type on assignment.
      	* c-common.h (build_modify_expr): Update declaration.
      
      gcc/cp/:
      	* call.c (build_temp): Change 0 to enum constant.
      	* cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
      	type.
      	* cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
      	* decl2.c (constrain_visibility): Likewise.
      	* parser.c (cp_lexer_get_preprocessor_token): Likewise.
      	(cp_parser_flags): Typedef to int rather than enum type.
      	(cp_parser_expression_stack_entry): Change prec field to enum
      	cp_parser_prec.
      
      	* typeck.c (build_modify_expr): Add lhs_origtype parameter.
      	Change all callers.
      
      gcc/fortran/:
      	* gfortran.h (enum gfc_symbol_type): New named enum type, broken
      	out of struct gfc_symbol.
      	(struct gfc_symbol): Use enum gfc_symbol_type.
      	(enum gfc_array_ref_dimen_type): New named enum type, broken out
      	of struct gfc_array_ref).
      	(struct gfc_array_ref): Use enum gfc_array_ref_dimen_type.
      	(mod_pointee_as): Update declaration.
      	* decl.c (add_global_entry): Change type to enum gfc_symbol_type.
      	(gfc_mod_pointee_as): Change return type to "match".
      	* module.c (mio_array_ref): Add cast to enum type.
      	(mio_symbol): Likewise.
      	* resolve.c (resolve_global_procedure): Change type to enum
      	gfc_symbol_type.
      	* trans-io.c (gfc_build_st_parameter): Change type to unsigned
      	int.
      
      gcc/java/:
      	* jcf-parse.c (handle_constant): Add cast to enum type.
      
      gcc/objc/:
      	* objc-act.c (get_super_receiver): Update calls to
      	build_modify_expr to pass new argument.
      
      gcc/testsuite/:
      	* gcc.dg/Wcxx-compat-4.c: New testcase.
      
      From-SVN: r146735
      Ian Lance Taylor committed
  39. 20 Apr, 2009 1 commit
    • Fix enum conversions which are invalid in C++: · bbbbb16a
      gcc/:
      	Fix enum conversions which are invalid in C++:
      	* auto-inc-dec.c (attempt_change): Change 0 to SET in function
      	call.
      	* calls.c (store_one_arg): Change 0 to EXPAND_NORMAL in function
      	call.
      	* cse.c (hash_rtx_cb): Change 0 to VOIDmode in function call.
      	* dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type.
      	* dbxout.c (dbxout_symbol): Change 0 to VOIDmode in function
      	call.
      	(dbxout_parms): Likewise.
      	* df-core.c (df_set_flags): Change changeable_flags parameter to
      	int.
      	(df_clear_flags): Likewise.
      	* df-problems.c (df_rd_bb_local_compute_process_def): Change
      	top_flag parameter to int.
      	(df_chain_create_bb_process_use): Likewise.
      	(df_chain_add_problem): Change chain_flags parameter to unsigned
      	int.  Remove cast.
      	* df-scan.c (df_ref_create): Change ref_flags parameter to int.
      	(df_ref_create_structure, df_def_record_1): Likewise.
      	(df_defs_record, df_uses_record, df_get_call_refs): Likewise.
      	(df_notes_rescan): Change 0 to VOIDmode in function call.
      	(df_get_call_refs, df_insn_refs_collect): Likewise.
      	(df_bb_regs_collect): Likewise.
      	(df_entry_block_defs_collect): Likewise.
      	(df_exit_block_uses_collect): Likewise.
      	* df.h: Update declarations.
      	* double-int.c (double_int_divmod): Add cast to enum type.
      	* dse.c (replace_inc_dec): Reverse parameters to gen_int_mode.
      	* dwarf2out.c (new_reg_loc_descr): Add casts to enum type.
      	(based_loc_descr): Likewise.
      	(loc_descriptor_from_tree_1): Change first_op and second_op to
      	enum dwarf_location_atom.  Add cast to enum type.
      	* expmed.c (init_expmed): Change 0 to SET in function call.
      	* expr.c (init_expr_target): Change 0 to VOIDmode in function
      	call.
      	(expand_expr_real_1): Change 0 to EXPAND_NORMAL in function call.
      	(do_store_flag): Likewise.
      	* fixed-value.h (struct fixed_value): Change mode to enum
      	machine_mode.
      	* function.c (assign_parms): Change 0 to VOIDmode in function
      	call.
      	* genautomata.c (insert_automaton_decl): Change 1 to INSERT in
      	function call.
      	(insert_insn_decl, insert_decl, insert_state): Likewise.
      	(automata_list_finish): Likewise.
      	* genrecog.c (process_define_predicate): Add cast to enum type.
      	* gensupport.c (init_predicate_table): Add cast to enum type.
      	* gimple.c (gimple_build_return): Change 0 to ERROR_MARK in
      	function call.
      	(gimple_build_call_1, gimple_build_label): Likewise.
      	(gimple_build_goto, gimple_build_asm_1): Likewise.
      	(gimple_build_switch_1, gimple_build_cdt): Likewise.
      	* gimple.h (GIMPLE_CHECK): Change 0 to ERROR_MARK in function
      	call.
      	(enum fallback): Rename from enum fallback_t.
      	(fallback_t): Typedef as int.
      	* gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to
      	GSI_SAME_STMT in function call.
      	* ira.c (setup_class_subset_and_memory_move_costs): Add casts to
      	enum type.
      	(setup_reg_class_relations): Likewise.
      	(setup_reg_class_nregs): Change cl to int.  Add casts to enum
      	type.
      	(setup_prohibited_class_mode_regs): Add cast to enum type.
      	(setup_prohibited_mode_move_regs): Likewise.
      	* ira-costs.c (record_reg_classes): Change rclass to enum
      	reg_class.
      	(record_address_regs): Change i to enum reg_class.
      	* lists.c (alloc_EXPR_LIST): Add cast to enum type.
      	* machmode.h (GET_MODE_CLASS): Cast value to enum mode_class.
      	(GET_MODE_WIDER_MODE): Cast value to enum machine_mode.
      	(GET_MODE_2XWIDER_MODE): Likewise.
      	(GET_CLASS_NARROWEST_MODE): Likewise.
      	* omp-low.c (expand_omp_for): Add cast to enum type.
      	* optabs.c (debug_optab_libfuncs): Add casts to enum type.
      	* opts.c (enable_warning_as_error): Change kind to diagostic_t.
      	* postreload.c (reload_cse_simplify_operands): Change rclass local
      	to enum reg_class.
      	* predict.c (combine_predictions_for_insn): Change best_predictor
      	and predictor to enum br_predictor.
      	(combine_predictions_for_bb): Likewise.
      	(build_predict_expr): Change assignment to PREDICT_EXPR_OUTCOME to
      	use SET_PREDICT_EXPR_OUTCOME.
      	* real.c (real_arithmetic): Change icode to code in function
      	call.
      	* reginfo.c (init_move_cost): Add casts to enum type.
      	(init_reg_sets_1, init_fake_stack_mems): Likewise.
      	* regmove.c (regclass_compatible_p): Change class0 and class1 to
      	enum reg_class.
      	* reload.c (find_valid_class): Add casts to enum type.
      	(push_reload): Change 0 to NO_REGS in function call.
      	(find_reloads): Change this_alternative to array of enum
      	reg_class.  Remove some now-unnecessary casts.
      	(make_memloc): Change 0 to VOIDmode in function call.
      	* reload1.c (reload): Change 0 to VOIDmode in function call.
      	(eliminate_regs_1, elimination_effects): Likewise.
      	(eliminate_regs_in_insn): Likewise.
      	(emit_input_reload_insns): Add cast to enum type.
      	(delete_output_reload): Change 0 to VOIDmode in function call.
      	* reorg.c (insn_sets_resource_p): Convert include_delayed_effects
      	to enum type in function call.
      	* tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type.
      	(SET_PREDICT_EXPR_OUTCOME): Define.
      	* tree-dump.c (get_dump_file_info): Change phase parameter to
      	int.
      	(get_dump_file_name, dump_begin, dump_enabled_p): Likewise.
      	(dump_initialized_p, dump_flag_name, dump_end): Likewise.
      	(dump_function): Likewise.
      	* tree-dump.h: Update declarations.
      	* tree-pass.h: Update declarations.
      	* varasm.c (assemble_integer): Change mclass to enum mode_class.
      	* config/arm/arm.c (thumb_legitimize_reload_address): Add cast to
      	enum type.
      	(arm_rtx_costs_1): Correct parenthesization.
      	(arm_rtx_costs): Add casts to enum type.
      	(adjacent_mem_locations): Reverse arguments to const_ok_for_op.
      	(vfp_emit_fstmd): Use add_rg_note.
      	(emit_multi_reg_push, emit_sfm): Likewise.
      	(thumb_set_frame_pointer): Likewise.
      	(arm_expand_prologue): Likewise.
      	(arm_regno_class): Change return type to enum reg_class.
      	(thumb1_expand_prologue): Use add_reg_note.
      	* config/arm/arm-protos.h (arm_regno_class): Update declaration.
      	* config/arm/arm.h (INITIALIZE_TRAMPOLINE): Change 0 to LCT_NORMAL
      	in function call.
      	* config/arm/gentune.sh: Add cast to enum type.
      	* config/arm/arm-tune.md: Rebuild.
      	* config/i386/i386.c (ix86_expand_prologue): Use add_reg_note.
      	(ix86_split_fp_branch, predict_jump): Likewise.
      	(ix86_expand_multi_arg_builtin): Change sub_code from enum
      	insn_code to enum rtx_code.
      	(ix86_builtin_vectorized_function): Add cast to enum type.
      	* config/i386/i386.md (truncdfsf2): Change slot to enum
      	ix86_stack_slot.
      	(truncxf<mode>2, isinf<mode>2): Likewise.
      	* config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to
      	enum type.
      	* config/ia64/ia64.c (ia64_split_tmode_move): Use add_reg_note.
      	(spill_restore_mem, do_spill, ia64_expand_prologue): Likewise.
      	(insert_bundle_state): Change 1 to INSERT in function call.
      	(ia64_add_bundle_selector_before): Likewise.
      	* config/ia64/ia64.md (cpu attr): Add cast to enum type.
      	(save_stack_nonlocal): Change 0 to LCT_NORMAL in function call.
      	(restore_stack_nonlocal): Likewise.
      	* config/mips/mips.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in
      	function call.
      	* config/mips/mips.c (mips_binary_cost): Change 0 to SET in
      	function call.
      	(mips_rtx_costs): Likewise.
      	(mips_override_options): Add casts to enum type.
      	* config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL
      	in function call.
      	* config/pa/pa.c (legitimize_pic_address): Use add_reg_note.
      	(store_reg, set_reg_plus_d): Likewise.
      	(hppa_expand_prologue, hppa_profile_hook): Likewise.
      	* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add
      	cast to enum type.
      	(altivec_expand_vec_set_builtin): Change 0 to EXPAND_NORMAL in
      	function call.
      	(emit_unlikely_jump): Use add_reg_note.
      	(rs6000_emit_allocate_stack): Likewise.
      	(rs6000_frame_related, rs6000_emit_prologue): Likewise.
      	(output_toc): Change 1 to INSERT in function call.
      	(output_profile_hook): Change 0 to LCT_NORMAL in function call.
      	(rs6000_initialize_trampoline): Likewise.
      	(rs6000_init_dwarf_reg_sizes_extra): Change 0 to EXPAND_NORMAL in
      	function call.
      	* config/s390/s390.c (s390_rtx_costs): Add cast to enum type.
      	(s390_expand_movmem): Change 0 to OPTAB_DIRECT in function call.
      	(s390_expand_setmem, s390_expand_cmpmem): Likewise.
      	(save_gprs): Use add_reg_note.
      	(s390_emit_prologue): Likewise.
      	(s390_expand_builtin): Change 0 to EXPAND_NORMAL in function
      	call.
      	* config/sparc/sparc.c (sparc_expand_prologue): Use add_reg_note.
      	(sparc_fold_builtin): Add cast to enum type.
      	* config/spu/spu.c (spu_emit_branch_or_set): Change ior_code to
      	enum insn_code.
      	(spu_expand_prologue): Use add_reg_note.
      	(expand_builtin_args): Change 0 to EXPAND_NORMAL in function
      	call.
      
      	* c-parser.c (c_parser_attributes): Change VEC back to tree list.
      	(c_parser_postfix_expression_after_primary): Get VEC for list of
      	arguments.  Get original types of arguments.  Call
      	build_function_call_vec.
      	(cached_expr_list_1, cached_expr_list_2): New static variables.
      	(c_parser_expr_list): Change return type to VEC *.  Add
      	p_orig_types parameter.  Change all callers.
      	(c_parser_release_expr): New static function.
      	(c_parser_vec_to_tree_list): New static function.
      	* c-typeck.c (build_function_call): Rewrite to build a VEC and
      	call build_function_call_vec.
      	(build_function_call_vec): New function, based on old
      	build_function_call.
      	(convert_arguments): Remove nargs and argarray parameters.  Change
      	values to a VEC.  Add origtypes parameter.
      	(build_modify_expr): Add rhs_origtype parameter.  Change all
      	callers.
      	(convert_for_assignment): Add origtype parameter.  Change all
      	callers.  If warn_cxx_compat, check for conversion to an enum
      	type when calling a function.
      	(store_init_value): Add origtype parameter.  Change all callers.
      	(digest_init): Likewise.
      	(struct init_node): Add origtype field.
      	(add_pending_init): Add origtype parameter.  Change all callers.
      	(output_init_element): Likewise.
      	(output_pending_init_elements): Pass origtype from init_node to
      	output_init_element.
      	(process_init_elemnt): Pass origtype from c_expr to
      	output_init_element.
      	(c_finish_return): Add origtype parameter.  Change all callers.
      	* c-common.c (sync_resolve_size): Change params to VEC *.  Change
      	caller.
      	(sync_resolve_params): Likewise.
      	(sync_resolve_return): Change params to first_param.  Change
      	caller.
      	(resolve_overloaded_builtins): Change params to VEC *.  Change
      	callers.   Save first parameter around call to
      	build_function_call_vec.
      	* c-decl.c (finish_decl): Add origtype parameter.  Change all
      	callers.  Call build_function_call_vec rather than
      	build_function_call for cleanup.
      	* c-tree.h: Update declarations.
      	* c-common.h: Update declarations.
      	* stub-objc.c (objc_rewrite_function_call): Change parameter from
      	params to first_param.
      	* target.h (struct gcc_target): Change resolve_overloaded_builtin
      	params parameter from tree to void *.
      	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
      	Change arglist parameter to have type void *, and to be a pointer
      	to a VEC.
      	* config/rs6000/rs6000-protos.h
      	(altivec_resolve_overloaded_builtin): Update declaration.
      	* config/spu/spu-c.c (spu_resolved_overloaded_builtin): Change
      	fnargs parameter to have type void *, and to be a pointer to a
      	VEC.  Call build_function_call_vec instead of
      	build_function_call.
      	* config/spu/spu-protos.h (spu_expand_builtin): Update
      	declaration.
      
      gcc/cp/:
      	* typeck.c (build_function_call_vec): New function.
      	(cp_build_function_call): Only pass first parameter to
      	objc_rewrite_function_call.
      	(build_modify_expr): Add rhs_origtype parameter.  Change all
      	callers.
      	* decl.c (finish_decl): Add origtype parameter.  Change all
      	callers.
      	* semantics.c (finish_call_expr): Pass VEC to
      	resolve_overloaded_builtin.
      
      gcc/objc:
      	* objc-act.c (objc_rewrite_function_call): Change parameter from
      	params to first_param.  Change all callers.
      
      gcc/testsuite:
      	* gcc.dg/Wcxx-compat-3.c: New testcase.
      
      From-SVN: r146451
      Ian Lance Taylor committed