Commit Graph

2482 Commits

Author SHA1 Message Date
Ian Lance Taylor ed2eaa9f6e configure.ac: Change default of poststage1_ldflags to be empty if poststage1_libs is set.
./:	* configure.ac: Change default of poststage1_ldflags to be empty if
	poststage1_libs is set.  When poststage1_libs is empty, and
	ENABLE_BUILD_WITH_CXX is set, add -static-libgcc.
	* configure: Rebuild.
gcc/:
	* Makefile.in (HOST_LIBS): Move higher in file.
	(LINKER, LINKER_FLAGS): If ENABLE_BUILD_WITH_CXX, but $(HOST_LIBS)
	is not empty, set to $(CC) and $(CFLAGS).

From-SVN: r154422
2009-11-22 04:25:56 +00:00
Jan Hubicka 0bc1b77f32 lto-cgraph.c: Include gcov-io.h
* lto-cgraph.c: Include gcov-io.h
	(output_profile_summary): New function.
	(output_cgraph): Use it.
	(input_profile_summary): New function.
	(input_cgraph): Use it.
	* coverage.c (build_ctr_info_value): Use varpool; initalize
	DECL_ASSEMBLER_NAME.
	(create_coverage): Likewise.
	* tree-profile.c (tree_init_ic_make_global_vars): Likewise.
	(tree_init_edge_profiler): Likewise.
	* Makefile.in (lto-cgraph.o): Add dependency on gcov-io.h.

From-SVN: r154100
2009-11-11 19:08:44 +00:00
Basile Starynkevitch 7ac8318c2d plugins.texi (Plugin callbacks): added PLUGIN_PRAGMAS.
2009-11-06  Basile Starynkevitch  <basile@starynkevitch.net>

	* doc/plugins.texi (Plugin callbacks): added PLUGIN_PRAGMAS.
	* c-pragma.c: Include "plugin.h".
	(init_pragma): Invoke PLUGIN_PRAGMAS.
	* gcc-plugin.h: Added PLUGIN_PRAGMAS.
	* plugin.c (plugin_event_name): Added PLUGIN_PRAGMAS & the missing
	PLUGIN_ATTRIBUTES.
	(register_callback): Added PLUGIN_PRAGMAS. Fixed typo in message
	error for unknown callback event.
	(invoke_plugin_callbacks): Added PLUGIN_PRAGMAS.
	* Makefile.in (c-pragma.o): Added dependency upon plugin.h.
	(PLUGIN_HEADERS): added plugin.h.

2009-11-06  Basile Starynkevitch  <basile@starynkevitch.net>

	* g++.dg/plugin/pragma_plugin-test-1.C: new testcase for
	PLUGIN_PRAGMAS.
	* g++.dg/plugin/pragma_plugin.c: new test plugin for
	PLUGIN_PRAGMAS.
	* g++.dg/plugin/plugin.exp (plugin_test_list): Add pragma_plugin.c and
	pragma_plugin-test-1.C.

From-SVN: r153975
2009-11-06 19:20:39 +00:00
Ben Elliston d4ebfa65c9 tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document.
2009-10-26  Ben Elliston  <bje@au.ibm.com>
	    Michael Meissner  <meissner@linux.vnet.ibm.com>
	    Ulrich Weigand  <uweigand@de.ibm.com>

	* doc/tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document.
	(TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise.
	(TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise.

	* target.h (struct target_def): Add pointer_mode, address_mode,
	and valid_pointer_mode to addr_space substructure.
	* target-def.h (TARGET_ADDR_SPACE_POINTER_MODE): Define.
	(TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise.
	(TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise.
	(TARGET_ADDR_SPACE_HOOKS): Add them.
	* targhooks.c (target_default_pointer_address_modes_p): New function.
	* target.h (target_default_pointer_address_modes_p): Add prototype.
	* targhooks.c (default_addr_space_pointer_mode): New function.
	(default_addr_space_address_mode): Likewise.
	(default_addr_space_valid_pointer_mode): Likewise.
	* targhooks.h (default_addr_space_pointer_mode): Add prototype.
	(default_addr_space_address_mode): Likewise.
	(default_addr_space_valid_pointer_mode): Likewise.
	* output.h (default_valid_pointer_mode): Move to ...
	* targhooks.h (default_valid_pointer_mode): ... here.
	* varasm.c (default_valid_pointer_mode): Move to ...
	* targhooks.c (default_valid_pointer_mode): ... here.

	* varasm.c (output_constant): Use targetm.addr_space.valid_pointer_mode
	instead of targetm.valid_pointer_mode.

	* fold-const.c (fit_double_type): Use int_or_pointer_precision.
	* tree.c (integer_pow2p): Likewise.
	(tree_log2): Likewise.
	(tree_floor_log2): Likewise.
	(signed_or_unsigned_type_for): Support pointer type of different size.
	(int_or_pointer_precision): New function.
	* tree.h (int_or_pointer_precision): Add prototype.
	* stor-layout.c (layout_type): Set TYPE_PRECISION for offset types.
	* varasm.c (initializer_constant_valid_p): Use TYPE_PRECISION of
	incoming pointer type instead of POINTER_SIZE.

	* tree.c (build_pointer_type): Use appropriate pointer mode
	instead of ptr_mode.
	(build_reference_type): Likewise.
	* expr.c (store_expr): Likewise.
	(expand_expr_addr_expr): Likewise.
	* tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
	* cfgexpand.c (expand_debug_expr): Likewise.
	
	* auto-inc-dec.c: Include "target.h".
	(try_merge): Use appropriate address mode instead of Pmode.
	(find_inc): Likewise.
	* combine.c (find_split_point): Likewise.
	* cselib.c (cselib_record_sets): Likewise.
	* dse.c (replace_inc_dec): Likewise.
	(canon_address): Likewise.
	* var-tracking.c (replace_expr_with_values): Likewise.
	(count_uses): Likewise.
	(add_uses): Likewise.
	(add_stores): Likewise.
	* emit-rtl.c: Include "target.h".
	(adjust_address_1): Use appropriate address mode instead of Pmode.
	(offset_address): Likewise.
	* explow.c (break_out_memory_refs): Likewise.
	(memory_address_addr_space): Likewise.
	(promote_mode): Likewise.
	* expr.c (move_by_pieces): Likewise.
	(emit_block_move_via_loop): Likewise.
	(store_by_pieces): Likewise.
	(store_by_pieces_1): Likewise.
	(expand_assignment): Likewise.
	(store_constructor): Likewise.
	(expand_expr_addr_expr): Likewise.
	(expand_expr_real_1): Likewise.
	* cfgexpand.c (expand_debug_expr): Likewise.
	* ifcvt.c (noce_try_cmove_arith): Likewise.
	* regcprop.c (kill_autoinc_value): Likewise.
	* regmove.c (try_auto_increment): Likewise.
	* reload.c (find_reloads): Likewise.
	(find_reloads_address): Likewise.
	(find_reloads_address_1): Likewise.
	* sched-deps.c: Include "target.h".
	(sched_analyze_1): Use appropriate address mode instead of Pmode.
	(sched_analyze_2): Likewise.
	* sel-sched-dump.c: Include "target.h".
	(debug_mem_addr_value): Use appropriate address mode instead of Pmode.
	* stor-layout.c (layout_type): Likewise.
	* tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise.
	(multiplier_allowed_in_address_p): Likewise.
	(get_address_cost): Likewise.
	* varasm.c (make_decl_rtl): Likewise.
	
	* expr.c (expand_assignment): Always convert offsets to appropriate
	address mode.
	(store_expr): Likewise.
	(store_constructor): Likewise.
	(expand_expr_real_1): Likewise.

	* reload.h (form_sum): Add MODE argument.
	* reload.c (form_sum): Add MODE argument, use it instead of Pmode.
	Update recursive calls.
	(subst_indexed_address): Update calls to form_sum.
	
	* tree-flow.h (addr_for_mem_ref): Add ADDRSPACE argument.
	* tree-ssa-address.c: Include "target.h".
	(templates): Replace by ...
	(mem_addr_template_list): ... this new vector.
	(TEMPL_IDX): Handle address space numbers.
	(gen_addr_rtx): Add address mode argument, use it instead of Pmode.
	(addr_for_mem_ref): Add ADDRSPACE argument.  Use per-address-space
	instead of global cache.  Update call to gen_addr_rtx.
	(valid_mem_ref_p): Update call to addr_for_mem_ref.
	* expr.c (expand_expr_real_1): Update call to addr_for_mem_ref.
	
	* rtl.h (convert_memory_address_addr_space): Add prototype.
	(convert_memory_address): Define as macro.
	* explow.c (convert_memory_address): Rename to ...
	(convert_memory_address_addr_space): ... this.  Add ADDRSPACE argument.
	Use appropriate pointer and address modes instead of ptr_mode / Pmode.
	Update recursive calls.
	(memory_address_addr_space): Call convert_memory_address_addr_space.
	* expmed.c (make_tree): Likewise.
	* expr.c (expand_assignment): Likewise.
	(expand_expr_addr_expr_1): Likewise.  Also, add ADDRSPACE argument.
	(expand_expr_addr_expr): Likewise.  Also, update call.

	* alias.c (find_base_value): Guard pointer size optimizations.
	(find_base_term): Likewise.
	* rtlanal.c (nonzero_bits1): Likewise.
	(num_sign_bit_copies1): Likewise.
	* simplify-rtx.c (simplify_unary_operation_1): Likewise.

	* Makefile.in (tree-ssa-address.o): Add $(TARGET_H) dependency.
	(emit-rtl.o): Likewise.
	(auto-inc-dec.o): Likewise.
	(sched-deps.o): Likewise.

Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com>
Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com>

From-SVN: r153573
2009-10-26 21:57:10 +00:00
Diego Novillo 062eee1eb0 Makefile.in (PLUGIN_HEADERS): Add output.h and IPA_UTILS_H.
* Makefile.in (PLUGIN_HEADERS): Add output.h and
	IPA_UTILS_H.

From-SVN: r153472
2009-10-22 15:34:26 -04:00
Jan Hubicka fb3f88cc0d ipa-cp.c (ipcp_write_summary, [...]): New functions.
* ipa-cp.c (ipcp_write_summary, ipcp_read_summary): New functions.
	(pass_ipa_cp): Register them.
	(ipcp_init_stage): Analyze all functions for whopr/lto.
	(ipcp_propagate_stage): Skip external calls.
	(ipcp_iterate_stage): Call ipa_update_after_lto_read if needed.
	* ipa-reference.c (write_node_summary_p): Fix thinko about availability.
	* cgraphunit.c (ipa_passes): When in lto, ne er produce new summaries;
	when in ltrans, skip executing of ipa passes since everything should've
	been done.
	* ipa-inline.c (cgraph_decide_inlining): Remove FIXMEs.
	(inline_generate_summary): Likewise.
	(inline_read_summary): New function.
	(inline_write_summary): New function.
	(pass_ipa_inline): Register new hooks.
	* ipa-prop.c: Inlcude lto-streamer.h
	(ipa_edge_args_vector): Update declaration.
	(ipa_count_arguments, ipa_compute_jump_functions,
	ipa_free_edge_args_substructures): Move ipa_edge_args_vector into ggc.
	(ipa_write_jump_function, ipa_read_jump_function, ipa_write_node_info,
	ipa_read_node_info): New static functions.
	(ipa_prop_write_jump_functions, ipa_prop_read_jump_functions): Update.
	(duplicate_array): Use xmalloc.
	(duplicate_ggc_array): New.
	(ipa_edge_duplication_hook): Use it.
	(ipa_update_after_lto_read): New function.
	* ipa-prop.h (ipa_prop_write_jump_functions,
	ipa_prop_read_jump_functions): Declare.
	(ipa_pass_through_data, ipa_ancestor_jf_data, ipa_member_ptr_cst,
	jump_func_value, ipa_member_ptr_cst, ipa_edge_args): Add GTY markers.
	(ipa_edge_args_vector): Move into GGC.
	(ipa_check_create_edge_args): Update.
	(ipa_update_after_lto_read): New.
	* passes.c (ipa_write_summaries_1): When in wpa, do not write summaries.
	(ipa_read_summaries): When in ltrans, so not read summaries.
	* lto-streamer.c (lto_get_section_name): Add LTO_section_jump_functions.
	* lto-streamer.h (LTO_section_jump_functions): New section.
	(produce_asm): Declare.
	* lto-cgraph.c (output_cgraph): Output edges in reverse order.
	* lto-streamer-out.c (produce_asm): Export.
	* lto-streamer-in.c: Include tree-pass.h
	(input_function): Free dominance info when done.
	(lto_read_body): Push ipa_inline in ltrans stage.
	* gengtype.c (open_base_files): Add ipa-prop.h into includes.
	* Makefile.in (GTFILES): Add ipa-prop.h

	* lto.c (lto_fixup_jump_functions): New function.
	(lto_fixup_decls): Use it.

From-SVN: r153449
2009-10-22 10:02:29 +00:00
Vladimir Makarov 1833192f30 params.def (PARAM_IRA_LOOP_RESERVED_REGS): New.
2009-09-26  Vladimir Makarov  <vmakarov@redhat.com>

	* params.def (PARAM_IRA_LOOP_RESERVED_REGS): New.
	* params.h (IRA_LOOP_RESERVED_REGS): New
	* tree-pass.h (pass_subregs_of_mode_init,
	pass_subregs_of_mode_finish): Remove.
	* passes.c (pass_subregs_of_mode_init,
	pass_subregs_of_mode_finish): Remove.
	(pass_reginfo_init): Move before loop optimizations.
	* config/i386/i386.h (STACK_REG_COVER_CLASS): Define.
	* common.opt (fira-loop-pressure): New.
	* toplev.h (flag_ira_loop_pressure): New.
	* rtl.h (init_subregs_of_mode, finish_subregs_of_mode): New
	externals.
	* reginfo.c (init_subregs_of_mode, finish_subregs_of_mode):
	Make external and void type functions.
	(gate_subregs_of_mode_init, pass_subregs_of_mode_init,
	pass_subregs_of_mode_finish): Remove.
	* ira-costs.c (init_costs): Call init_subregs_of_mode.
	* regmove.c: Include ira.h.
	(regmove_optimize): Call ira_set_pseudo_classes after IRA based
	register pressure calculation in loops.
	* loop-invariant.c: Include REGS_H and ira.h.
	(struct loop_data): New members max_reg_pressure, regs_ref, and
	regs_live.
	(struct invariant): New member orig_regno.
	(curr_loop): New variable.
	(find_exits): Initialize regs_ref and regs_live.
	(create_new_invariant): Initialize orig_regno.
	(get_cover_class_and_nregs): New.
	(get_inv_cost): Make aregs_needed an array.  Use regs_needed as an
	array.  Add code for flag_ira_loop_pressure.
	(gain_for_invariant): Make new_regs an array.  Add code for
	flag_ira_loop_pressure.
	(best_gain_for_invariant): Ditto.
	(set_move_mark): New parameter gain.  Use it for debugging output.
	(find_invariants_to_move): Make regs_needed and new_regs an array.
	Add code for flag_ira_loop_pressure.
	(move_invariant_reg): Set up orig_regno.
	(move_invariants): Set up reg classes for pseudos for
	flag_ira_loop_pressure.
	(free_loop_data): Clear regs_ref and regs_live.
	(curr_regs_live, curr_reg_pressure, regs_set, n_regs_set,
	get_regno_cover_class, change_pressure, mark_regno_live,
	mark_regno_death, mark_reg_store, mark_reg_clobber,
	mark_reg_death, mark_ref_regs, calculate_loop_reg_pressure): New.
	(move_loop_invariants): Calculate pressure.  Initialize curr_loop.
	* ira.c (ira): Call ira_set_pseudo_classes after IRA based
	register pressure calculation in loops if new regs were added.
	Call finish_subregs_of_mode.
	* opts.c (decode_options): Set up flag_ira_loop_pressure.
	* Makefile.in (loop-invariant.o): Add ira.h.
	(regmove.o): Ditto.
	* doc/invoke.texi (-fira-loop-pressure, ira-loop-reserved-regs):
	Describe.
	* doc/tm.texi (STACK_REG_COVER_CLASS): Describe.

From-SVN: r152770
2009-10-14 16:24:11 +00:00
Jakub Jelinek 96c169e156 re PR preprocessor/41543 (BUILTINS_LOCATION wrong with -fpreprocessed)
PR preprocessor/41543
	* input.h (BUILTINS_LOCATION): Change to 1 from 2.
	Assert BUILTINS_LOCATION < RESERVED_LOCATION_COUNT.
	* tree.c: Include intl.h.
	(expand_location): Handle BUILTINS_LOCATION.
	* Makefile.in (tree.o): Depend on intl.h.

	* include/line-map.h (RESERVED_LOCATION_COUNT): Define.
	* line-map.c (linemap_init): Initialize highest_location and
	highest_line to RESERVED_LOCATION_COUNT-1 instead of 0.

	* gcc.dg/debug/dwarf2/pr41543.c: New test.

From-SVN: r152761
2009-10-14 12:04:22 +02:00
Jerry Quinn 66af41878b Makefile.in (lto-wrapper): Use COMPILER and ALL_COMPILERFLAGS.
2009-10-06  Jerry Quinn  <jlquinn@optonline.net>

	* Makefile.in (lto-wrapper): Use COMPILER and ALL_COMPILERFLAGS.
	(lto-compress.o): Likewise.

From-SVN: r152512
2009-10-07 03:18:42 +00:00
Diego Novillo d7f09764d7 Merge lto branch into trunk.
From-SVN: r152434
2009-10-03 17:10:11 -04:00
Ralf Wildenhues 2bc9806603 Fix dependency of out_object_file on gt header for out_file.
gcc/:
	* Makefile.in ($(out_object_file)): Depend on
	gt-$(basename $(notdir $(out_file))).h.

From-SVN: r152249
2009-09-28 20:22:56 +00:00
Ralf Wildenhues 464778c074 Fix dependencies in gcc/Makefile.in.
gcc/:
	* Makefile.in (TOPLEV_H): Use $(INPUT_H) not input.h.
	(FLAGS_H): Add options.h $(REAL_H).
	(SEL_SCHED_IR_H): Add $(BITMAP_H) vecprim.h $(CFGLOOP_H).
	(TREE_VECTORIZER_H): New.
	(EBITMAP_H): Renamed from EBIMAP_H.
	(c-decl.o, c-objc-common.o, c-pretty-print.o, attribs.o, c-omp.o)
	(gtype-desc.o, ggc-common.o, ggc-page.o, ggc-zone.o, langhooks.o)
	(tree.o, tree-ssa-structalias.o, tree-ssa-ter.o, tree-ssanames.o)
	(tree-phinodes.o, tree-ssa-loop.o, tree-ssa-math-opts.o)
	(gimple-low.o, omp-low.o, sese.o, graphite-blocking.o)
	(graphite-clast-to-gimple.o, graphite-dependences.o)
	(graphite-interchange.o, graphite-poly.o, graphite-scop-detection.o)
	(graphite-sese-to-poly.o, tree-vect-loop.o, tree-vect-loop-manip.o)
	(tree-vect-patterns.o, tree-vect-slp.o, tree-vect-stmts.o)
	(tree-vect-data-refs.o, tree-vectorizer.o, gimple.o, tree-mudflap.o)
	(targhooks.o, stmt.o, emit-rtl.o, ipa.o, matrix-reorg.o, ipa-inline.o)
	(gcse.o, tree-ssa-ccp.o, df-byte-scan.o, vec.o, caller-save.o)
	(ira-build.o, ira-costs.o, ira-color.o, ira-emit.o, ira.o)
	(haifa-sched.o, sched-rgn.o, sel-sched.o, sel-sched-dump.o)
	(sel-sched-ir.o, final.o, $(out_object_file)): Dependencies
	updated and fixed as per above changes and per
	check_makefile_deps.sh output.

From-SVN: r152216
2009-09-27 07:10:10 +00:00
Justin Seyster 6209e51c90 Makefile.in (PLUGIN_HEADERS): Include real.h.
2009-09-23 Justin Seyster <jrseys@gmail.com>

	* Makefile.in (PLUGIN_HEADERS): Include real.h.

From-SVN: r152117
2009-09-24 08:24:00 -04:00
Ralf Wildenhues 1d93c86061 Fix long-standing in-tree build include-fixed bug.
gcc/:
	PR bootstrap/35619
	* Makefile.in (stmp-fixinc): Ensure `include-fixed' is created
	in the directory this rule is called from, rather than the
	toplevel 'gcc' directory, to fix in-tree build.

From-SVN: r151880
2009-09-19 08:29:58 +00:00
Jan Hubicka e7f373fa69 dwarf2out.c: Include tree-pass.h and gimple.h.
* dwarf2out.c: Include tree-pass.h and gimple.h.
	(loc_list_plus_const): New function.
	(loc_descriptor_from_tree_1): Rename to ...
	(loc_descriptor_from_tree): ... remove original.
	(loc_list_from_tree): New function.
	(add_AT_location_description): Accept location list.
	(tls_mem_loc_descriptor): Update call of loc_descriptor_from_tree.
	(concatn_mem_loc_descriptor): Remove.
	(mem_loc_descriptor): Handle CONCAT/CONCATN and VAR_LOCATION by
	returning NULL.
	(secname_for_decl): Move up.
	(hidden_reference_p): New function; break out from ...
	(loc_by_refernece): ... here; move up.
	(dw_loc_list): New function.
	(single_element_loc_list): New function.
	(single_element_loc_list_p): New function.
	(add_loc_descr_to_each): New function.
	(add_loc_list): New function.
	(loc_descr_from_tree): Make wraper of loc_list_from_tree.
	(loc_list_from_tree): Reroganized from loc_descr_from_tree;
	add diagnostics why expansion failed.
	(add_location_or_const_value_attribute): Support location lists.
	(add_bound_info): Likewise.
	(descr_info_loc): Update call of loc_descriptor_from_tree.
	(gen_variable_die): Work on location lists.
	* final.c (pass_final): Add dump file.
	* Makefile.in (dwarf2out.o): Add new dependencies.

From-SVN: r151807
2009-09-17 17:27:00 +00:00
Martin Jambor 07ffa034dd common.opt (fipa-sra): New switch.
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
2009-09-17 13:35:38 +02:00
Richard Henderson 1d65f45cfa Squash commit of EH in gimple
From-SVN: r151696
2009-09-14 12:18:58 -07:00
Richard Guenther f9417da1a2 langhooks-def.h (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
2009-09-13  Richard Guenther  <rguenther@suse.de>
	Rafael Avila de Espindola  <espindola@google.com>

	* langhooks-def.h (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
	(LANG_HOOKS_EH_PERSONALITY): Likewise.
	(LANG_HOOKS_INITIALIZER): Adjust.
	(lhd_pass_through_t): Declare.
	* langhooks.h (struct lang_hooks): Add eh_runtime_type and
	eh_personality.
	* langhooks.c (lhd_pass_through_t): New function.

        * dwarf2out.c (output_call_frame_info, dwarf2out_do_cfi_startproc,
	dwarf2out_begin_prologue): Use personality from current_function_decl.
        * expr.h (get_personality_function): Declare.
	* expr.c (get_personality_function): New function.
	(build_personality_function): Likewise.
        * libfuncs.h (libfunc_index): Remove LTI_eh_personality.
        (eh_personality_libfunc): Remove.
        * optabs.c (build_libfunc_function): New function split out from ...
	(init_one_libfunc): ... here.
        * tree.h (DECL_FUNCTION_PERSONALITY): New.
        (tree_function_decl): Add personality.
	(lhd_gcc_personality): Declare.
	(build_personality_function): Likewise.
	* tree.c (gcc_eh_personality_decl): New.
	(lhd_gcc_personality): New function.
	* except.h (lang_eh_runtime_type): Remove.
	(enum eh_personality_kind): New.
	(build_personality_function): Declare.
	(function_needs_eh_personality): Declare.
        * except.c (lang_eh_runtime_type): Remove.
	(function_needs_eh_personality): New function.
	(add_type_for_runtime): Call lang_hooks.type_for_runtime instead.
        (sjlj_emit_function_enter, output_function_exception_table):
        Use personality from current_function_decl.
	* tree-eh.c (lower_eh_constructs): Set DECL_FUNCTION_PERSONALITY.
	* tree-inline.c (tree_can_inline_p): Do not inline across different
	EH personalities.
	(expand_call_inline): Likewise.  Adjust the callers EH personality.
	(tree_function_versioning): Copy DECL_FUNCTION_PERSONALITY.
	* cgraph.c (cgraph_add_new_function): Set DECL_FUNCTION_PERSONALITY.
	* Makefile.in (cgraph.o): Add $(EXCEPT_H) dependency.
	(c-parser.o): Likewise

	* c-tree.h (c_eh_initialized_p): Remove.
	(c_maybe_initialize_eh): Likewise.
	* c-decl.c (finish_decl): Don't call c_maybe_initialize_eh.
	(finish_decl): Don't call c_maybe_initialize_eh.
	(c_eh_initialized_p): Remove.
	(c_maybe_initialize_eh): Likewise.
        * c-parser.c (c_parser_omp_construct): Likewise.
	(c_parse_file): Initialize exception handling.

	objc/
	* objc-act.c (objc_eh_runtime_type): Export.
	(objc_init_exceptions): Remove.  Move warning code ...
	(objc_begin_try_stmt): ... here
	(objc_build_throw_stmt): ... and here.
	(objc_eh_personality_decl): New.
	(objc_eh_personality): New function.
	* objc-act.h (objc_eh_runtime_type): Declare.
	(objc_eh_personality): Likewise.
	* objc-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
	(LANG_HOOKS_EH_PERSONALITY): Likewise.

	cp/
	* except.c (init_exception_processing): Do not set
	lang_eh_runtime_type.
	(choose_personality_routine): Do not set eh_personality_decl,
	set pragma_java_exceptions.
	* cp-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
	(LANG_HOOKS_EH_PERSONALITY): Likewise.
	(cp_eh_personality_decl): New.
	(cp_eh_personality): Likewise.
	* Make-lang.in (cp-lang.o): Add $(EXPR_H) and $(EXCEPT_H)
	dependencies.

	java/
	* decl.c (do_nothing): Remove.
	(java_init_decl_processing): Do not set lang_eh_runtime_type.
	* Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
	* lang.c (java_eh_personality): New.
	(java_eh_personality_decl): Likewise.
	(LANG_HOOKS_EH_PERSONALITY): Define.

	ada/
	* gcc-interface/misc.c (gnat_init_gcc_eh): Do not set
	lang_eh_runtime_type.
	(LANG_HOOKS_EH_PERSONALITY): Define.
	(gnat_eh_personality_decl): New.
	(gnat_eh_personality): Likewise.
	* Make-lang.in (misc.o): Add gt-ada-misc.h dependency.
	* config-lang.in (gtfiles): Add misc.c.

	fortran/
	* f95-lang.c (gfc_maybe_initialize_eh): Do not init
	eh_personality_libfunc.

Co-Authored-By: Rafael Avila de Espindola <espindola@google.com>

From-SVN: r151676
2009-09-13 19:40:33 +00:00
Kai Tietz 7c2a2dbf50 [multiple changes]
2009-09-08  Paolo Bonzini  <bonzini@gnu.org>

	* stdint.m4: Rewrite by using autoconf 2.64 features.

2009-09-08  Kai Tietz  <kai.tietz@onevision.com>

	* configure.ac (GCC_STDINT_TYPES): Initialize intptr_t,
	uintptr_t, HAVE_INTTYPES_H, HAVE_STDINT_H, HAVE_UINTPTR_T,
	and HAVE_INTPTR_T.
	* configure: Regenerated.
	* config.in: Regenerated
	* system.h (stdint.h): Add include.
	(inttypes.h): Likewise.
	* Makefile.in (aclocal): Add config/stdint.m4.
	* aclocal.m4: Regenerated.

From-SVN: r151514
2009-09-08 17:21:07 +02:00
Kai Tietz eead42e0c5 Revert revision 151379 for linux bootstrap failure for gstdint.h
From-SVN: r151382
2009-09-03 17:49:00 +02:00
Kai Tietz be2c0fc941 config.in (HAVE_STDINT_H): New.
2009-09-03  Kai Tietz  <kai.tietz@onevision.com>

	* config.in (HAVE_STDINT_H): New.
	* configure.ac (GCC_HEADER_STDINT): Generated gstdint.h.
	* configure: Regenerated.
	* system.h (gstdint.h): Add include.
	* Makefile.in (aclocal): Add config/stdint.m4.
	* aclocal.m4: Regenerated.

From-SVN: r151379
2009-09-03 16:18:38 +02:00
Diego Novillo 4537ec0c86 [multiple changes]
2009-09-01  Diego Novillo  <dnovillo@google.com>

	* c-lang.c (lang_hooks): Remove const qualifier.

java/ChangeLog

	* lang.c (lang_hooks): Remove const qualifier.

objc/ChangeLog

	* objc-lang.c (lang_hooks): Remove const qualifier.

objcp/ChangeLog

	* objcp-lang.c (lang_hooks): Remove const qualifier.

ada/ChangeLog

	* gcc-interface/misc.c (lang_hooks): Remove const qualifier.

fortran/ChangeLog

	* f95-lang.c (lang_hooks): Remove const qualifier.

cp/ChangeLog

	* cp-lang.c (lang_hooks): Remove const qualifier.

2009-09-01  Diego Novillo  <dnovillo@google.com>

	* cgraph.c (cgraph_node_for_decl): New.
	* cgraph.h (cgraph_node_for_decl): Declare.
	* tree.c (host_integerp): Return 0 if T is NULL.


2009-09-01  Diego Novillo  <dnovillo@google.com>

	* tree.h (struct alias_pair): Move from varasm.c.
	(alias_pairs): Likewise.
	(TYPE_MAXVAL): Define.
	(TYPE_MINVAL): Define.
	(iterative_hash_host_wide_int): Declare.
	(remove_unreachable_alias_pairs): Declare.
	* tree-pass.h (pass_ipa_free_lang_data): Declare.
	* diagnostic.c (default_diagnostic_starter): Make extern.
	(default_diagnostic_finalizer): Make extern.
	* diagnostic.h (default_diagnostic_starter): Declare.
	(default_diagnostic_finalizer): Declare.
	(default_tree_printer): Declare.
	* toplev.c (default_tree_printer): Make extern.


2009-09-01  Richard Guenther  <rguenther@suse.de>
	    Diego Novillo  <dnovillo@google.com>

	* cgraph.c (cgraph_add_new_function): Remove gimplification.
	* cgraphunit.c (cgraph_expand_function): Do not emit
	associated thunks from here.
	(cgraph_emit_thunks): New.
	(cgraph_optimize): Call it.
	Return if any IPA pass finds an error.
	* varasm.c (finish_aliases_1): Ignore errorneous aliases used
	by thunks.


2009-09-01  Simon Baldwin  <simonb@google.com>
	    Rafael Espindola  <espindola@google.com>
	    Richard Guenther  <rguenther@suse.de>
	    Doug Kwan  <dougkwan@google.com>
	    Diego Novillo  <dnovillo@google.com>

	* tree.c: Include tree-pass.h, langhooks-def.h,
	diagnostic.h, cgraph.h, timevar.h, except.h and debug.h.
	(free_lang_data_in_type): New.
	(need_assembler_name_p): New.
	(free_lang_data_in_block): New.
	(free_lang_data_in_decl): New.
	(struct free_lang_data_d): New.
	(add_tree_to_fld_list): New.
	(find_decls_types_r): New.
	(get_eh_types_for_runtime): New.
	(find_decls_types_in_eh_region): New.
	(find_decls_types_in_node): New.
	(find_decls_types_in_var): New.
	(free_lang_data_in_cgraph): New.
	(free_lang_data): New.
	(gate_free_lang_data): New.
	(pass_ipa_free_lang_data): New.

2009-09-01  Diego Novillo  <dnovillo@google.com>

	* timevar.def (TV_IPA_FREE_LANG_DATA): Define.
	* langhooks.h (struct lang_hooks): Add field free_lang_data.
	(lang_hooks): Remove const qualifier.
	* ipa.c (cgraph_remove_unreachable_nodes): Call
	remove_unreachable_alias_pairs.
	* except.c (add_type_for_runtime): Check if TYPE has
	already been converted.
	(lookup_type_for_runtime): Likewise.
	(check_handled): Handle converted types.
	* varasm.c (remove_unreachable_alias_pairs): New.
	* gimple.c: Include demangle.h.
	(gimple_decl_printable_name): New.
	(gimple_fold_obj_type_ref): New.
	* gimple.h (gimple_decl_printable_name): Declare.
	(gimple_fold_obj_type_ref): Declare.
	* passes.c (init_optimization_passes): Add pass
	pass_ipa_free_lang_data.
	* langhooks-def.h (LANG_HOOKS_FREE_LANG_DATA): Define.
	(LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_FREE_LANG_DATA.

testsuite/ChangeLog

2009-09-01  Diego Novillo  <dnovillo@google.com>

	* gcc.dg/gomp/combined-1.c: Adjust expected pattern.
	* g++.dg/tree-prof/inline_mismatch_args.C: Likewise.
	* g++.dg/warn/unit-1.C: Likewise.
	* g++.dg/ipa/iinline-1.C: Likewise.
	* g++.dg/template/cond2.C: Adjust expected line location for the
	error.
	* g++.dg/template/pr35240.C: Likewise.


cp/ChangeLog

2009-09-01  Doug Kwan  <dougkwan@google.com>

	* tree.c (cp_fix_function_decl_p): New.
	(cp_free_lang_data): New.

2009-09-01  Diego Novillo  <dnovillo@google.com>

	* Make-lang.in (decl2.o): Add dependency on $(POINTER_SET_H).
	* decl2.c: Include pointer-set.h.
	(collect_candidates_for_java_method_aliases): New.
	(cp_write_global_declarations): Call it.
	Add local variable CANDIDATES.  If set, call
	build_java_method_aliases.
	(build_java_method_aliases): Add argument CANDIDATES.
	Use it to determine if FNDECL should get a hidden alias.
	* cp-objcp-common.h (LANG_HOOKS_FREE_LANG_DATA): Define.
	* cp-tree.h (cp_free_lang_data): Declare.

2009-09-03  Richard Guenther  <rguenther@suse.de>

	* method.c (use_thunk): Use cgraph_finalize_function to hand
	off thunks to the cgraph.
	* semantics.c (emit_associated_thunks): Do not emit thunks
	for really extern functions.

From-SVN: r151360
2009-09-03 00:07:12 -04:00
Michael Matz 28ed065ef9 expr.h (emit_storent_insn, [...]): Declare.
* expr.h (emit_storent_insn, expand_expr_real_1,
	expand_expr_real_2): Declare.
	* expr.c (emit_storent_insn, expand_expr_real_1,
	expand_expr_real_2): Export.
	(store_expr): Setting and evaluating dont_return_target is
	useless.
	(expand_expr_real_1, <case GOTO_EXPR, RETURN_EXPR, SWITCH_EXPR,
	LABEL_EXPR and ASM_EXPR>): Move to gcc_unreachable.
	* except.c (expand_resx_expr): Rename to ...
	(expand_resx_stmt): ... this.  Rewrite to take gimple statement.
	* except.h (expand_resx_stmt): Declare.
	* stmt.c: Add include gimple.h
	(expand_asm_expr): Rename to ...
	(expand_asm_stmt): ... this. Rewrite to take gimple statement.
	(expand_case): Rewrite to take gimple statement.
	* tree.h (expand_asm_stmt): Declare.
	(expand_case): Change prototype.
	* Makefile.in (stmt.o): Depend on gimple.h.
	* builtins.c (expand_builtin_synchronize): Build gimple asm
	statement, not an ASM_EXPR.
	* cfgexpand.c (gimple_cond_pred_to_tree, set_expr_location_r,
	gimple_to_tree, release_stmt_tree): Remove.
	(expand_gimple_cond): Don't call gimple_cond_pred_to_tree or
	ggc_free, but hold comparison code and operands separately.
	Call jumpif_1 and jumpifnot_1 instead of jumpif and jumpifnot.
	(expand_call_stmt, expand_gimple_stmt_1,
	expand_gimple_stmt): New helpers.
	(expand_gimple_tailcall): Don't call gimple_to_tree, expand_expr_stmt,
	release_stmt_tree.  Call expand_gimple_stmt instead.
	(expand_gimple_basic_block): Ditto.

	* calls.c (emit_call_1): Don't look at EH regions here, make
	fntree parameter useless.
	(expand_call): New local rettype for TREE_TYPE(exp), use it
	throughout.  Remove local p, use addr instead.
	Don't look at EH regions here.

From-SVN: r151350
2009-09-02 21:13:34 +00:00
Vladimir Makarov ce18efcb54 invoke.texi (-fsched-pressure): Document it.
2009-09-02  Vladimir Makarov  <vmakarov@redhat.com>

	* doc/invoke.texi (-fsched-pressure): Document it.
	(-fsched-reg-pressure-heuristic): Remove it.
	
	* reload.c (ira.h): Include.
	(find_reloads): Add choosing reload on number of small spilled
	classes.
	
	* haifa-sched.c (ira.h): Include.
	(sched_pressure_p, sched_regno_cover_class, curr_reg_pressure,
	saved_reg_pressure, curr_reg_live, saved_reg_live,
	region_ref_regs): New variables.
	(sched_init_region_reg_pressure_info, mark_regno_birth_or_death,
	initiate_reg_pressure_info, setup_ref_regs,
	initiate_bb_reg_pressure_info, save_reg_pressure,
	restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New
	functions.
	(setup_insn_reg_pressure_info): New function.
	(rank_for_schedule): Add pressure checking and insn issue time.
	Remove comparison of insn reg weights.
	(ready_sort): Set insn reg pressure info.
	(update_register_pressure, setup_insn_max_reg_pressure,
	update_reg_and_insn_max_reg_pressure,
	sched_setup_bb_reg_pressure_info): New functions.
	(schedule_insn): Add code for printing and updating reg pressure
	info.
	(find_set_reg_weight, find_insn_reg_weight): Remove.
	(ok_for_early_queue_removal): Do nothing if pressure_only_p.
	(debug_ready_list): Print reg pressure info.
	(schedule_block): Ditto.  Check insn issue time.
	(sched_init): Set up sched_pressure_p.  Allocate and set up some
	reg pressure related info.
	(sched_finish): Free some reg pressure related info.
	(fix_tick_ready): Make insn always ready if pressure_p.
	(init_h_i_d): Don't call find_insn_reg_weight.
	(haifa_finish_h_i_d): Free insn reg pressure info.
	
	* ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs,
	ira_memory_move_cost, ira_class_hard_regs,
	ira_class_hard_regs_num, ira_no_alloc_regs,
	ira_available_class_regs, ira_reg_class_cover_size,
	ira_reg_class_cover, ira_class_translate): Move to ira.h.

	* ira-lives.c (single_reg_class): Check mode to find how many
	registers are necessary for operand.
	(ira_implicitly_set_insn_hard_regs): New.

	* common.opt (fsched-pressure): New options.
	(fsched-reg-pressure-heuristic): Remove.

	* ira.c (setup_eliminable_regset): Rename to
	ira_setup_eliminable_regset.  Make it external.
	(expand_reg_info): Pass cover class to setup_reg_classes.
	(ira): Call resize_reg_info instead of allocate_reg_info.

	* sched-deps.c: Include ira.h.
	(implicit_reg_pending_clobbers, implicit_reg_pending_uses): New.
	(create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses,
	reg_pressure_info, insn_use_p, mark_insn_pseudo_birth,
	mark_insn_hard_regno_birth, mark_insn_reg_birth,
	mark_pseudo_death, mark_hard_regno_death, mark_reg_death,
	mark_insn_reg_store, mark_insn_reg_clobber,
	setup_insn_reg_pressure_info): New.
	(sched_analyze_1): Update implicit_reg_pending_uses.
	(sched_analyze_insn): Find implicit sets, uses, clobbers of regs.
	Use them to create dependencies.  Set insn reg uses and pressure
	info.  Process reg_pending_uses in one place.
	(free_deps): Free implicit sets.
	(remove_from_deps): Remove implicit sets if necessary.  Check
	implicit sets when clearing reg_last_in_use.
	(init_deps_global): Clear implicit_reg_pending_clobbers and
	implicit_reg_pending_uses.
	
	* ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs,
	ira_memory_move_cost, ira_class_hard_regs,
	ira_class_hard_regs_num, ira_no_alloc_regs,
	ira_available_class_regs, ira_reg_class_cover_size,
	ira_reg_class_cover, ira_class_translate): Move from ira-int.h.
	(ira_setup_eliminable_regset, ira_set_pseudo_classes,
	ira_implicitly_set_insn_hard_regs): New prototypes.
	
	* ira-costs.c (pseudo_classes_defined_p, allocno_p,
	cost_elements_num): New variables.
	(allocno_costs, total_costs): Rename to costs and
	total_allocno_costs.
	(COSTS_OF_ALLOCNO): Rename to COSTS.
	(allocno_pref): Rename to pref.
	(allocno_pref_buffer): Rename to pref_buffer.
	(common_classes): Rename to regno_cover_class.
	(COST_INDEX): New.
	(record_reg_classes): Set allocno attributes only if allocno_p.
	(record_address_regs): Ditto.  Use COST_INDEX instead of
	ALLOCNO_NUM.
	(scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM
	and COSTS_OF_ALLOCNO.
	(print_costs): Rename to print_allocno_costs.
	(print_pseudo_costs): New.
	(process_bb_node_for_costs): Split into 2 functions with new
	function process_bb_for_costs.  Pass BB to process_bb_for_costs.
	(find_allocno_class_costs): Rename to find_costs_and_classes.  Add
	new parameter dump_file.  Use cost_elements_num instead of
	ira_allocnos_num.  Make one iteration if preferred classes were
	already calculated for scheduler.  Make 2 versions of code
	depending on allocno_p.
	(setup_allocno_cover_class_and_costs): Check allocno_p.  Use
	regno_cover_class and COSTS instead of common_classes and
	COSTS_OF_ALLOCNO.
	(init_costs, finish_costs): New.
	(ira_costs): Set up allocno_p and cost_elements_num.  Call
	init_costs and finish_costs.
	(ira_set_pseudo_classes): New.

	* rtl.h (allocate_reg_info): Remove.
	(resize_reg_info): Change return type.
	(reg_cover_class): New.
	(setup_reg_classes): Add new parameter.
	
	* sched-int.h (struct deps_reg): New member implicit_sets.
	(sched_pressure_p, sched_regno_cover_class): New external
	definitions.
	(INCREASE_BITS): New macro.
	(struct reg_pressure_data, struct reg_use_data): New.
	(struct _haifa_insn_data): Remove reg_weight.  Add members
	reg_pressure, reg_use_list, reg_set_list, and
	reg_pressure_excess_cost_change.
	(struct deps): New member implicit_sets.
	(pressure_p): New variable.
	(COVER_CLASS_BITS, INCREASE_BITS): New macros.
	(struct reg_pressure_data, struct reg_use_data): New.
	(INSN_REG_WEIGHT): Remove.
	(INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST,
	INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New
	macros.
	(sched_init_region_reg_pressure_info,
	sched_setup_bb_reg_pressure_info): New prototypes.
	
        * reginfo.c (struct reg_pref): New member coverclass.
	(reg_cover_class): New function.
	(reginfo_init, pass_reginfo_init): Move after free_reg_info.
	(reg_info_size): New variable.
	(allocate_reg_info): Make static.  Setup reg_info_size.
	(resize_reg_info): Use reg_info_size.  Return flag of resizing.
	(setup_reg_classes): Add a new parameter.  Setup cover class too.

	* Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the
	dependencies.

	* sched-rgn.c (deps_join): Set up implicit_sets.
	(schedule_region): Set up region and basic blocks pressure
	relative info.
	
	* passes.c (init_optimization_passes): Move
	pass_subregs_of_mode_init before pass_sched.

From-SVN: r151348
2009-09-02 18:54:25 +00:00
Alexandre Oliva b5b8b0ac64 invoke.texi (-fvar-tracking-assignments): New.
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
2009-09-02 02:42:21 +00:00
Matt Rice 6d383c5e70 Makefile.in (PLUGIN_HEADERS): Include incpath.h and tree-ssa-sccvn.h.
2009-08-20  Matt Rice  <ratmice@gmail.com>
	    Diego Novillo  <dnovillo@google.com>

	* Makefile.in (PLUGIN_HEADERS): Include incpath.h and
	tree-ssa-sccvn.h.


Co-Authored-By: Diego Novillo <dnovillo@google.com>

From-SVN: r150967
2009-08-20 12:22:43 -04:00
Richard Guenther 29cc57cf00 c-objc-common.h (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Do not define.
2009-08-20  Richard Guenther  <rguenther@suse.de>

	* c-objc-common.h (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Do not
	define.
	* c-tree.h (c_dup_lang_specific_decl): Remove.
	(struct lang_decl, struct lang_type): Move definitions ...
	* c-lang.h: ... here.  New file.
	* c-decl.c: Include c-lang.h.
	(c_dup_lang_specific_decl): Remove.
	* c-typeck.c: Include c-lang.h.
	* Makefile.in (c-decl.o): Add c-lang.h dependency.
	(c-typeck.o): Likewise.
	* c-config-lang.in (gtfiles): Add c-lang.h.
	* gengtype.c (get_output_file_with_visibility): Handle c-lang.h
	like c-tree.h.

	objc/
	* objc-act.c: Include c-lang.h
	* Make-lang.in (objc/objc-act.o): Add c-lang.h dependency.

From-SVN: r150966
2009-08-20 16:11:37 +00:00
Sebastian Pop 8e88f9fddf Recompute profile after Graphite.
2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>

	* Makefile.in (graphite.o): Depends on PREDICT_H.
	* graphite.c: Include predict.h.
	(graphite_finalize): Call tree_estimate_probability.
	* predict.c (predict_loops): Do not call scev_initialize and
	scev_finalize.
	(tree_estimate_probability_bb): New.
	(tree_estimate_probability): Do not initialize loops: move that
	code to the driver.  Call tree_estimate_probability_bb.
	(tree_estimate_probability_driver): New.
	(pass_profile): Use tree_estimate_probability_driver.
	* predict.h (tree_estimate_probability): Declared.

From-SVN: r150684
2009-08-12 14:19:33 +00:00
Jakub Jelinek 17f6e37dc1 dwarf2out.c (output_fde): When doing hot/cold partitioning...
* 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
2009-08-07 08:23:42 +02:00
Martin Jambor 3f84bf08c4 ipa-prop.c (count_formal_params_1): New function.
2009-08-07  Martin Jambor  <mjambor@suse.cz>

	* ipa-prop.c (count_formal_params_1): New function.
	(ipa_get_vector_of_formal_parms): New function.
	(get_vector_of_formal_parm_types): New function.
	(ipa_modify_formal_parameters): New function.
	(ipa_modify_call_arguments): New function.
	(index_in_adjustments_multiple_times_p): New function.
	(ipa_combine_adjustments): New function.
	(ipa_dump_param_adjustments): New function.

	* ipa-prop.h (struct ipa_parm_adjustment): New type.
	(ipa_get_vector_of_formal_parms): Declare.
	(ipa_modify_formal_parameters): Declare.
	(ipa_modify_call_arguments): Declare.
	(ipa_combine_adjustments): Declare.
	(ipa_dump_param_adjustments): Declare.
	(build_ref_for_offset): Declare.

	* Makefile.in (tree-sra.o): Add ipa-prop.h to dependencies.

	* tree-sra.c: Include ipa-prop.c.
	(build_ref_for_offset): Make public.

From-SVN: r150551
2009-08-07 02:51:34 +02:00
Richard Guenther e52201b680 tree-ssa.c (useless_type_conversion_p_1): Make function and array type comparisons frontend independent.
2009-08-06  Richard Guenther  <rguenther@suse.de>

	* tree-ssa.c (useless_type_conversion_p_1): Make function and
	array type comparisons frontend independent.
	* Makefile.in (tree-ssa.o): Add $(TARGET_H) dependency.
	* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Always fill
	out array reference lower bound and element size operands.
	(ao_ref_init_from_vn_reference): Properly compute the offset
	for ARRAY_RANGE_REF.
	(vn_reference_fold_indirect): Fill out array reference lower
	bound and element size operands.
	* tree-ssa-pre.c (phi_translate_1): Fail if we have to translate
	a non gimple valued reference operand which can happen for
	array reference lower bound or element size.
	(create_component_ref_by_pieces_1): Properly generate the
	element size operand for array references.

From-SVN: r150519
2009-08-06 11:31:20 +00:00
Sebastian Pop 204b560f29 New implementation of Graphite.
2009-07-30  Sebastian Pop  <sebastian.pop@amd.com>

	* Makefile.in (OBJS-common): Added dependence on graphite-blocking.o,
	graphite-clast-to-gimple.o, graphite-dependences.o,
	graphite-interchange.o, graphite-poly.o, graphite-ppl.o,
	graphite-scop-detection.o, graphite-sese-to-poly.o, and sese.o.
	(graphite-blocking.o,
	graphite-clast-to-gimple.o, graphite-dependences.o,
	graphite-interchange.o, graphite-poly.o, graphite-ppl.o,
	graphite-scop-detection.o, graphite-sese-to-poly.o, and sese.o): New.
	* cfgloop.c (alloc_loop): Set loop->can_be_parallel to false.
	* cfgloop.h (struct loop): Add can_be_parallel field.
	* common.opt (fgraphite-identity): Moved up.
	(fgraphite-force-parallel): New flag.
	* graphite.c: Rewrite.
	* graphite.h: Rewrite.
	* passes.c (init_optimization_passes): Schedule a pass of DCE and LIM
	after Graphite.
	* toplev.c (graphite_out_file): New file descriptor.
	(graphite_in_file): New.
	(process_options): flag_graphite_force_parallel cannot be used without
	Graphite.
	* tree-ssa-loop.c: Include toplev.h.
	(gate_graphite_transforms): Enable flag_graphite for
	flag_graphite_force_parallel.

From-SVN: r150301
2009-07-31 02:44:28 +00:00
Ralf Wildenhues 6efbd53f25 Makefile.in (AUTOCONF, [...]): New variables.
fixincludes/
	* Makefile.in (AUTOCONF, AUTOHEADER, ACLOCAL, ACLOCAL_AMFLAGS):
	New variables.
	($(srcdir)/configure, $(srcdir)/config.h.in, $(srcdir)/aclocal.m4):
	Use them.

gcc/
	* Makefile.in (AUTOCONF, ACLOCAL, ACLOCAL_AMFLAGS, aclocal_deps):
	New variables.
	($(srcdir)/configure, $(srcdir)/aclocal.m4): New rules.
	(AUTOHEADER): New variable.
	($(srcdir)/cstamp-h.in): Use it.

gnattools/
	* Makefile.in (AUTOCONF, configure_deps): New variables.
	($(srcdir)/configure): Use them.

libada/
	* Makefile.in (AUTOCONF, configure_deps): New variables.
	($(srcdir)/configure)): Use them.  Also depend on multi.m4.

libgcc/
	* configure.ac: Add snippet for maintainer-mode.
	* configure: Regenerate.
	* Makefile.in (AUTOCONF, configure_deps): New variables.
	($(srcdir)/configure)): New rule, active only with maintainer
	mode turned on.

libiberty/
	* Makefile.in (AUTOCONF, configure_deps): New variables.
	($(srcdir)/configure): New rule, active only in maintainer mode.

libobjc/
	* Makefile.in (AUTOCONF, ACLOCAL, ACLOCAL_AMFLAGS, aclocal_deps):
	New variables.
	($(srcdir)/configure, $(srcdir)/aclocal.m4): New rules.

intl/
	* Makefile.in (aclocal_deps): New variable.
	($(srcdir)/aclocal.m4): Use it, for portable makefile syntax.

libdecnumber/
	* Makefile.in (aclocal_deps): New variable.
	($(srcdir)/aclocal.m4): Use it, for portable makefile syntax.

From-SVN: r150277
2009-07-30 22:33:49 +00:00
Razya Ladelsky 08dab97a61 ssa-loop-manip.c: Include langhooks.h.
2009-07-30  Razya Ladelsky <razya@il.ibm.com>

        * ssa-loop-manip.c: Include langhooks.h.
        (rewrite_phi_with_iv): New.
        (rewrite_all_phi_nodes_with_iv): New.
        (canonicalize_loop_ivs): Move here from tree-parloops.c.
        Remove reduction_list argument. Use rewrite_all_phi_nodes_with_iv.
        * tree-parloops.c (loop_parallel_p): Move out all conditions
        except dependency check.
        (canonicalize_loop_ivs): Move to tree-ssa-loop-manip.c.
        (gen_parallel_loop): Call canonicalize_loop_ivs without
        reduction_list argument.
        (build_new_reduction): New.
        (gather_scalar_reductions): New.
        (try_get_loop_niter): New.
        (try_create_reduction_list): New.
        (parallleize_loops): Change the parallel conditions check.
        * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
        * Makefile.in (tree-ssa-loop-manip.o): Add langhooks.h dependency.

From-SVN: r150250
2009-07-30 08:39:57 +00:00
Tobias Grosser 223cf84d33 Makefile.in (TREE_DATA_REF_H, [...]): Cleanup use of SCEV_H and TREE_DATA_REF_H.
2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>

	* Makefile.in (TREE_DATA_REF_H, tree-vrp.o, tree-cfg.o, tree-if-conv.o
	tree-ssa-loop.o, tree-ssa-loop-niter.o, tree-ssa-loop-ivcanon.o,
	tree-ssa-loop-prefetch.o, tree-predcom.o, tree-affine.o,
	tree-scalar-evolution.o, tree-data-ref.o, tree-vect-loop.o,
	tree-vect-data-refs.o, tree-loop-linear.o, tree-loop-distribution.o
	tree-parloops.o, tree-pretty-printer.o, fold-const.o, tree-ssa-dce.o,
	lambda-code.o, params.o): Cleanup use of SCEV_H and TREE_DATA_REF_H.

From-SVN: r150045
2009-07-24 10:39:47 +00:00
Shujing Zhao 3e014341f8 Makefile.in (TREE_INLINE_H, [...]): Remove $(VARRAY_H).
2009-07-20  Shujing Zhao  <pearly.zhao@oracle.com>

	* Makefile.in (TREE_INLINE_H, tree-inline.o, cgraph.o): Remove
	$(VARRAY_H).

From-SVN: r149832
2009-07-20 19:20:33 +00:00
Richard Guenther a406865a08 re PR c/40401 (ICE: verify_gimple failed)
2009-07-17  Richard Guenther  <rguenther@suse.de>

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

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

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

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

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

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

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

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

From-SVN: r149750
2009-07-17 15:49:34 +00:00
Jason Merrill c32097d8b4 re PR libstdc++/37907 ([c++0x] support for std::is_standard_layout)
PR libstdc++/37907
	Support std::is_standard_layout and std::is_trivial traits,
	change POD to C++0x version (except for layout).
	* gcc/c-common.c (c_common_reswords): Add __is_standard_layout
	and __is_trivial.
	* gcc/c-common.h (enum rid): Add RID_IS_STD_LAYOUT and RID_IS_TRIVIAL.
	* gcc/cp/cp-tree.h (enum cp_trait_kind): Add CPTK_IS_STD_LAYOUT,
	CPTK_IS_TRIVIAL.
	(struct lang_type_class): Add non_std_layout.
	(CLASSTYPE_NON_STD_LAYOUT): New.
	* gcc/cp/class.c (check_bases): Set it.
	(check_field_decls): Likewise.
	(check_bases_and_members): Likewise.
	* gcc/cp/parser.c (cp_parser_primary_expression): Handle RID_IS_STD_LAYOUT,
	RID_IS_TRIVIAL.
	(cp_parser_trait_expr): Likewise.
	* gcc/cp/semantics.c (trait_expr_value): Handle CPTK_IS_STD_LAYOUT,
	CPTK_IS_TRIVIAL.
	(finish_trait_expr): Likewise.
	* gcc/cp/tree.c (scalarish_type_p, trivial_type_p, std_layout_type_p): New.
	(pod_type_p): Use them.
	* gcc/cp/typeck.c (build_class_member_access_expr): Check
	CLASSTYPE_NON_STD_LAYOUT rather than CLASSTYPE_NON_POD_P.
	* libstdc++-v3/include/std/type_traits: Add is_standard_layout, is_trivial.

From-SVN: r149721
2009-07-16 16:36:10 -04:00
Taras Glek 2a4c03661e sourcebuild.texi: Document install-plugin target.
2009-07-14  Taras Glek  <tglek@mozilla.com>
	    Rafael Espindola  <espindola@google.com>

	* doc/sourcebuild.texi: Document install-plugin target.
	* configure.ac: Added install-plugin target to language makefiles.
	* configure: Regenerate.
	* Makefile.in: (install-plugin): Install more headers,
	depend on lang.install-plugin.

ada/ChangeLog

	* gcc-interface/Make-lang.in (ada.install-plugin): New target for
	installing plugin headers.

cp/ChangeLog

	* Make-lang.in: Added CP_PLUGIN_HEADERS and
	c.install-target to export cp-tree.h cxx-pretty-print.h
	name-lookup.h headers for plugins.

fortran/ChangeLog

	* Make-lang.in (fortran.install-plugin): New target for
	installing plugin headers.

java/ChangeLog

	* Make-lang.in (java.install-plugin): New target for
	installing plugin headers.

objc/ChangeLog

	* Make-lang.in (objc.install-plugin): New target for
	installing plugin headers.

objcp/ChangeLog

	* Make-lang.in (obj-c.install-plugin): New target for
	installing plugin headers.



Co-Authored-By: Rafael Avila de Espindola <espindola@google.com>

From-SVN: r149648
2009-07-14 18:25:23 -04:00
Richard Guenther 55b34b5fd1 tree-ssa-alias.h (refs_may_alias_p_1): Declare.
2009-07-14  Richard Guenther  <rguenther@suse.de>
	Andrey Belevantsev <abel@ispras.ru>

	* tree-ssa-alias.h (refs_may_alias_p_1): Declare.
	(pt_solution_set): Likewise.
	* tree-ssa-alias.c (refs_may_alias_p_1): Export.
	* tree-ssa-structalias.c (pt_solution_set): New function.
	* final.c (rest_of_clean_state): Free SSA data structures.
	* print-rtl.c (print_decl_name): Remove.
	(print_mem_expr): Implement in terms of print_generic_expr.
	* alias.c (ao_ref_from_mem): New function.
	(rtx_refs_may_alias_p): Likewise.
	(true_dependence): Query alias-export info.
	(canon_true_dependence): Likewise.
	(write_dependence_p): Likewise.
	* tree-dfa.c (get_ref_base_and_extent): For void types leave
	size unknown.
	* emit-rtl.c (component_ref_for_mem_expr): Remove.
	(mem_expr_equal_p): Use operand_equal_p.
	(set_mem_attributes_minus_bitpos): Do not use
	component_ref_for_mem_expr.
	* cfgexpand.c (add_partitioned_vars_to_ptset): New function.
	(update_alias_info_with_stack_vars): Likewise.
	(partition_stack_vars): Call update_alias_info_with_stack_vars.
	* tree-ssa.c (delete_tree_ssa): Do not release SSA names
	explicitly nor clear stmt operands.
	Free the decl-to-pointer map.
	* tree-optimize.c (execute_free_datastructures): Do not free
	SSA data structures here.
	* tree-flow.h (struct gimple_df): Add decls_to_pointers member.
	* Makefile.in (emit-rtl.o): Add pointer-set.h dependency.
	(alias.o): Add tree-ssa-alias.h, pointer-set.h and $(TREE_FLOW_H)
	dependencies.
	(print-rtl.o): Add $(DIAGNOSTIC_H) dependency.

Co-Authored-By: Andrey Belevantsev <abel@ispras.ru>

From-SVN: r149624
2009-07-14 09:59:18 +00:00
Tom Tromey a80b057408 unwind-dw2-fde-darwin.c: Include dwarf2.h.
gcc
	* unwind-dw2-fde-darwin.c: Include dwarf2.h.
	* config/mmix/mmix.c: Include dwarf2.h.
	* config/rs6000/darwin-fallback.c: Include dwarf2.h.
	* config/xtensa/unwind-dw2-xtensa.c: Include dwarf2.h.
	* config/sh/sh.c: Include dwarf2.h.
	* config/i386/i386.c: Include dwarf2.h.
	* Makefile.in (DWARF2_H): Remove 'elf'.
	* except.c: Include dwarf2.h.
	* unwind-dw2.c: Include dwarf2.h.
	* dwarf2out.c: Include dwarf2.h.
	* unwind-dw2-fde-glibc.c: Include dwarf2.h.
	* unwind-dw2-fde.c: Include dwarf2.h.
	* dwarf2asm.c: Include dwarf2.h.
gcc/ada
	* raise-gcc.c: Include dwarf2h (unconditionally).
include
	* elf/dwarf2.h: Remove, renaming to...
	* dwarf2.h: ... this.

From-SVN: r149433
2009-07-09 19:41:25 +00:00
Shujing Zhao 8ed77e22a9 basic-block.h (dump_regset, [...]): Remove duplicate prototypes.
2009-07-08  Shujing Zhao  <pearly.zhao@oracle.com>

	* basic-block.h (dump_regset, debug_regset): Remove duplicate
	prototypes.
	* c-objc-common.h (c_initialize_diagnostics): Ditto.
	* ebitmap.h (dump_ebitmap): Ditto.
	* optabs.h (optab_libfunc): Ditto.
	* tree.h (tree_expr_nonzero_warnv_p): Ditto.
	* tree-flow.h (vect_can_force_dr_alignment_p,
	get_vectype_for_scalar_type): Ditto.	
	(vectorize_loops): Move prototype to ...
	* tree-vectorizer.h: ... here. Also, adjust comment. 
	(vect_set_verbosity_level): Remove duplicate prototype.
	* tree-ssa-loop.c: Include tree-vectorizer.h.
	* Makefile.in (tree-ssa-loop.o): Depend on tree-vectorizer.h.

From-SVN: r149364
2009-07-08 11:35:18 +00:00
Mark Loeser 4db19cc759 re PR other/40010 (Parallel make issue when building man pages)
gcc/
2009-06-23  Mark Loeser  <mark@halcy0n.com>

	PR build/40010
	* Makefile.in (gcc.pod): Depend on gcc-vers.texi.

From-SVN: r149345
2009-07-07 19:57:15 +00:00
Basile Starynkevitch cac1b0eef1 Makefile.in: added more lists of includes to PLUGIN_HEADERS.
2009-07-07  Basile Starynkevitch  <basile@starynkevitch.net>

	* gcc/Makefile.in: added more lists of includes to PLUGIN_HEADERS.

From-SVN: r149313
2009-07-07 06:07:59 +00:00
Richard Guenther d73fb533dc re PR middle-end/34163 (10% performance regression since Nov 1 on Polyhedron's "NF" on AMD64)
2009-07-03  Richard Guenther  <rguenther@suse.de>

	PR middle-end/34163
	* tree-chrec.c (chrec_convert_1): Fold (T2)(t +- x) to
	(T2)t +- (T2)x if t +- x is known to not overflow and
	the conversion widens the operation.
	* Makefile.in (tree-chrec.o): Add $(FLAGS_H) dependency.

	* gfortran.dg/pr34163.f90: New testcase.

From-SVN: r149207
2009-07-03 14:11:14 +00:00
Eric Botcazou f82a627cf5 cgraphunit.c (cgraph_finalize_compilation_unit): Call finalize_size_functions before further processing.
* cgraphunit.c (cgraph_finalize_compilation_unit): Call
	finalize_size_functions before further processing.
	* stor-layout.c: Include cgraph.h, tree-inline.h and tree-dump.h.
	(variable_size): Call self_referential_size on size expressions
	that contain a PLACEHOLDER_EXPR.
	(size_functions): New static variable.
	(copy_self_referential_tree_r): New static function.
	(self_referential_size): Likewise.
	(finalize_size_functions): New global function.
	* tree.c: Include tree-inline.h.
	(push_without_duplicates): New static function.
	(find_placeholder_in_expr): New global function.
	(substitute_in_expr) <tcc_declaration>: Return the replacement object
	on equality.
	<tcc_expression>: Likewise.
	<tcc_vl_exp>: If the replacement object is a constant, try to inline
	the call in the expression.
	* tree.h (finalize_size_functions): Declare.
	(find_placeholder_in_expr): Likewise.
	(FIND_PLACEHOLDER_IN_EXPR): New macro.
	(substitute_placeholder_in_expr): Update comment.
	* tree-inline.c (remap_decl): Do not unshare trees if do_not_unshare
	is true.
	(copy_tree_body_r): Likewise.
	(copy_tree_body): New static function.
	(maybe_inline_call_in_expr): New global function.
	* tree-inline.h (struct copy_body_data): Add do_not_unshare field.
	(maybe_inline_call_in_expr): Declare.
	* Makefile.in (tree.o): Depend on TREE_INLINE_H.
	(stor-layout.o): Depend on CGRAPH_H, TREE_INLINE_H, TREE_DUMP_H and
	GIMPLE_H.
ada/
	* gcc-interface/decl.c: Include tree-inline.h.
	(annotate_value) <CALL_EXPR>: Try to inline the call in the expression.
	* gcc-interface/utils.c (max_size) <CALL_EXPR>: Likewise.
	* gcc-interface/utils2.c: Include tree-inline.
	(known_alignment) <CALL_EXPR>: Likewise.

From-SVN: r149112
2009-06-30 17:26:32 +00:00
Jan Hubicka 2de58650f9 cfgloopanal.c (check_irred): Move into ...
* cfgloopanal.c (check_irred): Move into ...
	(mark_irreducible_loops): ... here; return true if ireducible
	loops was found.
	* ipa-pure-const.c: Include cfgloop.h and tree-scalar-evolution.h
	(analyze_function): Try to prove loop finiteness.
	* cfgloop.h (mark_irreducible_loops): Update prototype.
	* Makefile.in (ipa-pure-const.o): Add dependency on SCEV and CFGLOOP.

From-SVN: r149101
2009-06-30 14:56:37 +00:00
Basile Starynkevitch 46db44ccae Makefile.in (PLUGIN_HEADERS): added ggc, tree-dump, pretty-print.
2009-06-30  Basile Starynkevitch  <basile@starynkevitch.net>

	* gcc/Makefile.in (PLUGIN_HEADERS): added ggc, tree-dump, pretty-print.

From-SVN: r149100
2009-06-30 14:36:55 +00:00
Tom Tromey bbf531f021 dwarf2.h: Remove.
gcc
	* dwarf2.h: Remove.
	* Makefile.in (DWARF2_H): New variable.
	(except.o): Use it.
	(dwarf2out.o): Likewise.
	(dwarf2asm.o): Likewise.
	* config/i386/t-i386: Use DWARF2_H.
	* except.c: Include elf/dwarf2.h.
	* unwind-dw2.c: Include elf/dwarf2.h.
	* dwarf2out.c: Include elf/dwarf2.h.
	(dw_loc_descr_struct) <dw_loc_opc>: Now a bitfield.
	<dtprel>: New field.
	(dwarf_stack_op_name): Don't handle INTERNAL_DW_OP_tls_addr.
	(size_of_loc_descr): Likewise.
	(output_loc_operands_raw): Likewise.
	(output_loc_operands): Handle new dtprel field.
	(loc_checksum): Update.
	(loc_descriptor_from_tree_1) <VAR_DDECL>: Set dtprel field.
	* unwind-dw2-fde-glibc.c: Include elf/dwarf2.h.
	* unwind-dw2-fde.c: Include elf/dwarf2.h.
	* dwarf2asm.c: Include elf/dwarf2.h.
	* unwind-dw2-fde-darwin.c: Include elf/dwarf2.h.
	* config/mmix/mmix.c: Include elf/dwarf2.h.
	* config/rs6000/darwin-fallback.c: Include elf/dwarf2.h.
	* config/xtensa/unwind-dw2-xtensa.c: Include elf/dwarf2.h.
	* config/sh/sh.c: Include elf/dwarf2.h.
	* config/i386/i386.c: Include elf/dwarf2.h.
gcc/ada
	* raise-gcc.c: Include elf/dwarf2.h.
include
	* elf/dwarf2.h: New file.  Merged with gdb.

From-SVN: r149070
2009-06-30 00:02:10 +00:00
Paolo Bonzini c6741572cf re PR tree-optimization/26854 (Inordinate compile times on large routines)
2009-06-07  Paolo Bonzini  <bonzini@gnu.org>

	PR rtl-optimization/26854
        * timevar.def: Remove TV_DF_RU, add TV_DF_MD.
        * df-problems.c (df_rd_add_problem): Fix comment.
        (df_md_set_bb_info, df_md_free_bb_info, df_md_alloc,
        df_md_simulate_artificial_defs_at_top,
        df_md_simulate_one_insn, df_md_bb_local_compute_process_def,
        df_md_bb_local_compute, df_md_local_compute, df_md_reset,
        df_md_transfer_function, df_md_init, df_md_confluence_0,
        df_md_confluence_n, df_md_free, df_md_top_dump, df_md_bottom_dump,
        problem_MD, df_md_add_problem): New.
        * df.h (DF_MD, DF_MD_BB_INFO, struct df_md_bb_info, df_md,
        df_md_get_bb_info): New.
        DF_LAST_PROBLEM_PLUS1): Adjust.

        * Makefile.in (fwprop.o): Include domwalk.h.
        * fwprop.c: Include domwalk.h.
        (reg_defs, reg_defs_stack): New.
        (bitmap_only_bit_between): Remove.
        (process_defs): New.
        (process_uses): Use reg_defs and local_md instead of
        bitmap_only_bit_between and local_rd.
        (single_def_use_enter_block): New, from build_single_def_use_links.
        (single_def_use_leave_block): New.
        (build_single_def_use_links): Remove code moved to
        single_def_use_enter_block, invoke domwalk.
        (use_killed_between): Adjust comment.

From-SVN: r149010
2009-06-27 14:48:34 +00:00