Commit Graph

123 Commits

Author SHA1 Message Date
Richard Sandiford b512946c89 df.h (df_mw_hardreg, [...]): Add a link pointer.
gcc/
	* df.h (df_mw_hardreg, df_base_ref): Add a link pointer.
	(df_insn_info): Turn defs, uses, eq_uses and mw_hardregs into linked
	lists.
	(df_scan_bb_info): Likewise artificial_defs and artificial_uses.
	(DF_REF_NEXT_LOC, DF_MWS_NEXT): New macros.
	(FOR_EACH_INSN_INFO_DEF, FOR_EACH_INSN_INFO_USE)
	(FOR_EACH_INSN_INFO_EQ_USE, FOR_EACH_INSN_INFO_MW)
	(FOR_EACH_ARTIFICIAL_USE, FOR_EACH_ARTIFICIAL_DEF)
	(df_get_artificial_defs, df_get_artificial_uses)
	(df_single_def, df_single_use): Update accordingly.
	(df_refs_chain_dump): Take the first element in a linked list as
	parameter, rather than a pointer to an array of pointers.
	* df-core.c (df_refs_chain_dump, df_mws_dump): Likewise.
	* df-problems.c (df_rd_bb_local_compute_process_def): Likewise.
	(df_chain_create_bb_process_use): Likewise.
	(df_md_bb_local_compute_process_def): Likewise.
	* fwprop.c (process_defs, process_uses): Likewise.
	(register_active_defs, update_uses): Likewise.
	(forward_propagate_asm): Update for new df_ref linking.
	* df-scan.c (df_scan_free_ref_vec, df_scan_free_mws_vec): Delete.
	(df_null_ref_rec, df_null_mw_rec): Likewise.
	(df_scan_free_internal): Don't free df_ref and df_mw_hardreg lists
	explicitly.
	(df_scan_free_bb_info): Remove check for null artificial_defs.
	(df_install_ref_incremental): Adjust for new df_ref linking.
	Use a single-element insertion rather than a full sort.
	(df_ref_chain_delete_du_chain): Take the first element
	in a linked list as parameter, rather than a pointer to an array of
	pointers.
	(df_ref_chain_delete, df_mw_hardreg_chain_delete): Likewise.
	(df_add_refs_to_table, df_refs_verify, df_mws_verify): Likewise.
	(df_insn_info_delete): Remove check for null defs and call to
	df_scan_free_mws_vec.
	(df_insn_rescan): Initialize df_ref and df_mw_hardreg lists to
	null rather than df_null_*_rec.
	(df_insn_rescan_debug_internal): Likewise, and update null
	checks in the same way.  Remove check for null defs.
	(df_ref_change_reg_with_loc_1): Fix choice of list for defs.
	Move a single element rather doing a full sort.
	(df_mw_hardreg_chain_delete_eq_uses): Adjust for new df_mw_hardreg
	linking.
	(df_notes_rescan): Likewise.  Use a merge rather than a full sort.
	Initialize df_ref and df_mw_hardreg lists to null rather than
	df_null_*_rec.
	(df_ref_compare): Take df_refs as parameter, transferring the
	old interface to...
	(df_ref_ptr_compare): ...this new function.
	(df_sort_and_compress_refs): Update accordingly.
	(df_mw_compare): Take df_mw_hardregs as parameter, transferring the
	old interface to...
	(df_mw_ptr_compare): ...this new function.
	(df_sort_and_compress_mws): Update accordingly.
	(df_install_refs, df_install_mws): Return a linked list rather than
	an array of pointers.
	(df_refs_add_to_chains): Assert that old lists are empty rather
	than freeing them.
	(df_insn_refs_verify): Don't handle null defs speciailly.
	* web.c (union_match_dups): Update for new df_ref linking.

From-SVN: r211683
2014-06-15 07:39:30 +00:00
Richard Sandiford 5a474220d9 df.h (df_ref_create, [...]): Delete.
gcc/
	* df.h (df_ref_create, df_ref_remove): Delete.
	* df-scan.c (df_ref_create, df_ref_compress_rec): Likewise.
	(df_ref_remove): Likewise.

From-SVN: r211682
2014-06-15 07:33:13 +00:00
Richard Sandiford 74e59b6c24 df.h (df_single_def, [...]): New functions.
gcc/
	* df.h (df_single_def, df_single_use): New functions.
	* ira.c (find_moveable_pseudos): Use them.

From-SVN: r211681
2014-06-15 07:33:04 +00:00
Richard Sandiford fc8e9f583c df.h (FOR_EACH_INSN_INFO_MW): New macro.
gcc/
	* df.h (FOR_EACH_INSN_INFO_MW): New macro.
	* df-problems.c (df_note_bb_compute): Use it.
	* regstat.c (regstat_bb_compute_ri): Likewise.

From-SVN: r211680
2014-06-15 07:32:54 +00:00
Richard Sandiford 292321a5cd df.h (FOR_EACH_ARTIFICIAL_USE, [...]): New macros.
gcc/
	* df.h (FOR_EACH_ARTIFICIAL_USE, FOR_EACH_ARTIFICIAL_DEF): New macros.
	* cse.c (cse_extended_basic_block): Use them.
	* dce.c (mark_artificial_use): Likewise.
	* df-problems.c (df_rd_simulate_artificial_defs_at_top): Likewise.
	(df_lr_bb_local_compute, df_live_bb_local_compute): Likewise.
	(df_chain_remove_problem, df_chain_bb_dump): Likewise.
	(df_word_lr_bb_local_compute, df_note_bb_compute): Likewise.
	(df_simulate_initialize_backwards): Likewise.
	(df_simulate_finalize_backwards): Likewise.
	(df_simulate_initialize_forwards): Likewise.
	(df_md_simulate_artificial_defs_at_top): Likewise.
	* df-scan.c (df_reorganize_refs_by_reg_by_insn): Likewise.
	* regrename.c (init_rename_info): Likewise.
	* regstat.c (regstat_bb_compute_ri): Likewise.
	(regstat_bb_compute_calls_crossed): Likewise.

From-SVN: r211679
2014-06-15 07:32:43 +00:00
Richard Sandiford bfac633a90 df.h (DF_INSN_INFO_MWS, [...]): New macros.
gcc/
	* df.h (DF_INSN_INFO_MWS, FOR_EACH_INSN_INFO_DEF): New macros.
	(FOR_EACH_INSN_INFO_USE, FOR_EACH_INSN_INFO_EQ_USE): Likewise.
	(FOR_EACH_INSN_DEF, FOR_EACH_INSN_USE, FOR_EACH_INSN_EQ_USE): Likewise.
	* auto-inc-dec.c (find_inc, merge_in_block): Use them.
	* combine.c (create_log_links): Likewise.
	* compare-elim.c (find_flags_uses_in_insn): Likewise.
	(try_eliminate_compare): Likewise.
	* cprop.c (make_set_regs_unavailable, mark_oprs_set): Likewise.
	* dce.c (deletable_insn_p, find_call_stack_args): Likewise.
	(remove_reg_equal_equiv_notes_for_defs): Likewise.
	(reset_unmarked_insns_debug_uses, mark_reg_dependencies): Likewise.
	(word_dce_process_block, dce_process_block): Likewise.
	* ddg.c (def_has_ccmode_p): Likewise.
	* df-core.c (df_bb_regno_first_def_find): Likewise.
	(df_bb_regno_last_def_find, df_find_def, df_find_use): Likewise.
	* df-problems.c (df_rd_simulate_one_insn): Likewise.
	(df_lr_bb_local_compute, df_live_bb_local_compute): Likewise.
	(df_chain_remove_problem, df_chain_insn_top_dump): Likewise.
	(df_chain_insn_bottom_dump, df_word_lr_bb_local_compute): Likewise.
	(df_word_lr_simulate_defs, df_word_lr_simulate_uses): Likewise.
	(df_remove_dead_eq_notes, df_note_bb_compute): Likewise.
	(df_simulate_find_defs, df_simulate_find_uses): Likewise.
	(df_simulate_find_noclobber_defs, df_simulate_defs): Likewise.
	(df_simulate_uses, df_md_simulate_one_insn): Likewise.
	* df-scan.c (df_reorganize_refs_by_reg_by_insn): Likewise.
	* fwprop.c (local_ref_killed_between_p): Likewise.
	(all_uses_available_at, free_load_extend): Likewise.
	* gcse.c (update_bb_reg_pressure, calculate_bb_reg_pressure): Likewise.
	* hw-doloop.c (scan_loop): Likewise.
	* ifcvt.c (dead_or_predicable): Likewise.
	* init-regs.c (initialize_uninitialized_regs): Likewise.
	* ira-lives.c (mark_hard_reg_early_clobbers): Likewise.
	(process_bb_node_lives): Likewise.
	* ira.c (compute_regs_asm_clobbered, build_insn_chain): Likewise.
	(find_moveable_pseudos): Likewise.
	* loop-invariant.c (check_dependencies, record_uses): Likewise.
	* recog.c (peep2_find_free_register): Likewise.
	* ree.c (get_defs): Likewise.
	* regstat.c (regstat_bb_compute_ri): Likewise.
	(regstat_bb_compute_calls_crossed): Likewise.
	* sched-deps.c (find_inc, find_mem): Likewise.
	* sel-sched-ir.c (maybe_downgrade_id_to_use): Likewise.
	(maybe_downgrade_id_to_use, setup_id_reg_sets): Likewise.
	* shrink-wrap.c (requires_stack_frame_p): Likewise.
	(prepare_shrink_wrap): Likewise.
	* store-motion.c (compute_store_table, build_store_vectors): Likewise.
	* web.c (union_defs, pass_web::execute): Likewise.
	* config/i386/i386.c (increase_distance, insn_defines_reg): Likewise.
	(insn_uses_reg_mem, ix86_ok_to_clobber_flags): Likewise.

From-SVN: r211678
2014-06-15 07:32:28 +00:00
Richard Biener 7be64667c1 re PR rtl-optimization/38518 (Excessive compile time with -O3)
2014-01-17  Richard Biener  <rguenther@suse.de>

	PR rtl-optimization/38518
	* df.h (df_analyze_loop): Declare.
	* df-core.c: Include cfgloop.h.
	(df_analyze_1): Split out main part of df_analyze.
	(df_analyze): Adjust.
	(loop_inverted_post_order_compute): New function.
	(loop_post_order_compute): Likewise.
	(df_analyze_loop): New function avoiding whole-function
	postorder computes.
	* loop-invariant.c (find_defs): Use df_analyze_loop.
	(find_invariants): Adjust.
	* loop-iv.c (iv_analysis_loop_init): Use df_analyze_loop.

From-SVN: r206702
2014-01-17 10:47:59 +00:00
Richard Sandiford 23a5b65a92 Update copyright years in gcc/
From-SVN: r206289
2014-01-02 22:23:26 +00:00
David Malcolm 04a90bec09 Eliminate FOR_ALL_BB macro.
gcc/
	* basic-block.h (FOR_ALL_BB): Eliminate macro.

	* cfg.c (alloc_aux_for_blocks, clear_aux_for_blocks): Replace
	uses of FOR_ALL_BB with FOR_ALL_BB_FN, making uses of cfun explicit.

	* cfganal.c (inverted_post_order_compute): Likewise.
	* cfgcleanup.c (try_optimize_cfg): Likewise.
	* cfgexpand.c (add_scope_conflicts): Likewise.
	* cfghooks.c (dump_flow_info, account_profile_record): Likewise.
	* cfgrtl.c (relink_block_chain): Likewise.
	* dce.c (mark_artificial_uses): Likewise.
	* df-core.c (df_set_blocks, df_compute_cfg_image, df_dump): Likewise.
	* df-problems.c (df_lr_verify_solution_start,
	df_lr_verify_solution_end, df_lr_verify_transfer_functions,
	df_live_verify_solution_start, df_live_verify_solution_end,
	df_live_set_all_dirty, df_live_verify_transfer_functions,
	df_md_local_comput): Likewise.
	* df-scan.c (df_scan_free_internal, df_scan_alloc)
	df_reorganize_refs_by_insn, df_scan_verify): Likewise.
	* dominance.c (compute_dom_fast_query, calculate_dominance_info,
	free_dominance_info): Likewise.
	* dse.c (dse_step1, dse_step3, dse_step4, dse_step6): Likewise.
	* graph.c (draw_cfg_edges): Likewise.
	* graphite-scop-detection.c (print_graphite_scop_statistics,
	dot_all_scops_1): Likewise.
	* graphite.c (print_global_statistics,
	print_graphite_scop_statistics): Likewise.
	* ira.c (do_reload): Likewise.
	* loop-init.c (loop_optimizer_finalize): Likewise.
	* lto-streamer-in.c (input_function): Likewise.
	* lto-streamer-out.c (output_function): Likewise.
	* mcf.c (adjust_cfg_counts): Likewise.
	* predict.c (estimate_loops): Likewise.
	* sched-rgn.c (haifa_find_rgns): Likewise.
	* tree-cfg.c (split_critical_edges): Likewise.
 	* tree-dfa.c (renumber_gimple_stmt_uids): Likewise.
	* tree-loop-distribution.c (tree_loop_distribution): Likewise.
	* tree-ssa-pre.c (compute_antic, insert, init_pre): Likewise.
	* tree-ssa-propagate.c (ssa_prop_init): Likewise.
	* var-tracking.c (vt_initialize, vt_finalize): Likewise.
	* vtable-verify.c (vtable_verify_main): Likewise.
	* web.c (web_main): Likewise.

From-SVN: r205830
2013-12-09 21:29:15 +00:00
Richard Sandiford c328471880 alloc-pool.c, [...]: Add missing whitespace before "(".
gcc/
	* alloc-pool.c, asan.c, auto-inc-dec.c, basic-block.h, bb-reorder.c,
	bitmap.c, bitmap.h, bt-load.c, builtins.c, calls.c, cfgcleanup.c,
	cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cfgrtl.c, cgraph.c,
	cgraph.h, cgraphbuild.c, cgraphclones.c, cgraphunit.c, collect2.c,
	combine-stack-adj.c, combine.c, compare-elim.c, context.c, context.h,
	cprop.c, cse.c, cselib.c, dbxout.c, dce.c, defaults.h, df-core.c,
	df-problems.c, df-scan.c, df.h, diagnostic.c, double-int.c, dse.c,
	dumpfile.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c,
	errors.c, except.c, expmed.c, expr.c, file-find.c, final.c,
	fixed-value.c, fold-const.c, function.c, fwprop.c, gcc-ar.c, gcc.c,
	gcov-io.c, gcov-io.h, gcov.c, gcse.c, genattr-common.c, genattr.c,
	genattrtab.c, genautomata.c, genconfig.c, genemit.c, genextract.c,
	genflags.c, gengenrtl.c, gengtype-state.c, gengtype.c, genmodes.c,
	genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c,
	gensupport.c, ggc-common.c, ggc-page.c, gimple-fold.c, gimple-low.c,
	gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple.c,
	gimple.h, godump.c, graphite-clast-to-gimple.c,
	graphite-optimize-isl.c, graphite-poly.h, graphite-sese-to-poly.c,
	graphite.c, haifa-sched.c, hash-table.c, hash-table.h, hwint.c,
	hwint.h, ifcvt.c, incpath.c, init-regs.c, input.h, intl.c, intl.h,
	ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c,
	ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c,
	ipa-utils.c, ipa.c, ira-build.c, ira.c, jump.c, loop-doloop.c,
	loop-init.c, loop-invariant.c, loop-iv.c, lower-subreg.c, lto-cgraph.c,
	lto-streamer-in.c, lto-streamer-out.c, lto-wrapper.c, mcf.c,
	mode-switching.c, modulo-sched.c, omp-low.c, optabs.c, opts.c,
	pass_manager.h, passes.c, plugin.c, postreload-gcse.c, postreload.c,
	predict.c, prefix.c, pretty-print.c, print-rtl.c, print-tree.c,
	profile.c, read-md.c, real.c, real.h, recog.c, ree.c, reg-stack.c,
	regcprop.c, reginfo.c, regmove.c, regrename.c, regs.h, regstat.c,
	reload1.c, reorg.c, rtl.c, rtl.h, rtlanal.c, sbitmap.c, sched-rgn.c,
	sdbout.c, sel-sched-ir.c, sel-sched.c, sparseset.c, stack-ptr-mod.c,
	statistics.c, stmt.c, stor-layout.c, store-motion.c, streamer-hooks.h,
	system.h, target-hooks-macros.h, targhooks.c, targhooks.h, toplev.c,
	tracer.c, trans-mem.c, tree-browser.c, tree-call-cdce.c, tree-cfg.c,
	tree-cfgcleanup.c, tree-complex.c, tree-data-ref.c, tree-data-ref.h,
	tree-eh.c, tree-emutls.c, tree-flow.h, tree-if-conv.c, tree-into-ssa.c,
	tree-iterator.c, tree-loop-distribution.c, tree-mudflap.c,
	tree-nested.c, tree-nomudflap.c, tree-nrv.c, tree-object-size.c,
	tree-optimize.c, tree-pass.h, tree-pretty-print.c, tree-profile.c,
	tree-scalar-evolution.c, tree-sra.c, tree-ssa-ccp.c,
	tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c,
	tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c,
	tree-ssa-ifcombine.c, tree-ssa-live.c, tree-ssa-loop-ch.c,
	tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c,
	tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-operands.c,
	tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c,
	tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c,
	tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c,
	tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c,
	tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c,
	tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c,
	tree-vect-stmts.c, tree-vectorizer.c, tree-vectorizer.h, tree-vrp.c,
	tree.c, tree.h, tsan.c, tsystem.h, value-prof.c, var-tracking.c,
	varasm.c, vec.h, vmsdbgout.c, vtable-verify.c, web.c: Add missing
	whitespace before "(".

From-SVN: r203004
2013-09-28 08:42:34 +00:00
Steven Bosscher 80eb8028eb df.h (df_insn_delete): Adjust prototype.
* df.h (df_insn_delete): Adjust prototype.
	* emit-rtl.c (remove_insn): Pass a basic block to df_insn_delete
	and let it decide whether mark the basic block dirty.
	(set_insn_deleted): Only pass INSN_P insns to df_insn_delete.
	* df-scan.c (df_insn_info_delete): New helper function, split
	off from df_insn_delete.
	(df_scan_free_bb_info): Use it.
	(df_insn_rescan, df_insn_rescan_all, df_process_deferred_rescans):
	Likewise.
	(df_insn_delete): Likewise.  Take insn rtx as argument.  Verify
	that the insn is actually an insn and it has a non-NULL basic block.
	Do not mark basic block dirty if only deleting a DEBUG_INSN.

From-SVN: r196977
2013-03-22 16:37:00 +00:00
Richard Sandiford d1e082c2c2 Update copyright years in gcc/
From-SVN: r195098
2013-01-10 20:38:27 +00:00
Steven Bosscher bf744527f1 re PR rtl-optimization/38711 (ira should not be using df-lr except at -O1.)
PR rtl-optimization/38711
	* df.h (df_get_live_out, df_get_live_in): Make static inline functions.
	* df-problems.c (df_get_live_out, df_get_live_in): Moved to df.h.
	* ira-lives.c (process_bb_node_lives): Use df_get_live_out instead of
	DF_LR_OUT.
	* ira-build.c (create_bb_allocnos): Likewise.
	(create_loop_allocnos): Likewise, and use df_get_live_in instead of
	DF_LR_IN.
	* ira-emit.c (generate_edge_moves): Likewise.
	(add_ranges_and_copies): Likewise.
	* ira-color.c (ira_loop_edge_freq): Use df_get_live_out instead of
	DF_LR_OUT, and df_get_live_in instead of DF_LR_IN.
	* ira.c (mark_elimination): Update DF_LR and DF_LIVE.
	(build_insn_chain): Use df_get_live_out instead of DF_LR_OUT.
	(do_reload): Remove the DF_LIVE problem for -O1.

From-SVN: r192440
2012-10-14 19:30:59 +00:00
Steven Bosscher 7b19209f29 bitmap.h (bitmap_and_into): Update prototype.
* bitmap.h (bitmap_and_into): Update prototype.
	* bitmap.c (bitmap_and_into): Return true if the target bitmap
	changed, false otherwise.

	* df.h (df_dump_insn_problem_function): New function type.
	(struct df_problem): Add two functions, to dump just before and
	just after an insn.
	(DF_RD_PRUNE_DEAD_DEFS): New changable flag.
	(df_dump_insn_top, df_dump_insn_bottom): New prototypes.
	* df-core (df_dump_region): Use dump_bb.
	(df_dump_bb_problem_data): New function.
	(df_dump_top, df_dump_bottom): Rewrite using df_dump_bb_problem_data.
	(df_dump_insn_problem_data): New function.
	(df_dump_insn_top, df_dump_insn_bottom): New functions.
	* df-scan.c (problem_SCAN): Add NULL fields for new members.
	* df-problems.c (df_rd_local_compute): Ignore hard registers if
	DF_NO_HARD_REGS is in effect.
	(df_rd_transfer_function): If DF_RD_PRUNE_DEAD_DEFS is in effect,
	prune reaching defs using the LR problem.
	(df_rd_start_dump): Fix dumping of DEFs map.
	(df_rd_dump_defs_set): New function.
	(df_rd_top_dump, df_rd_bottom_dump): Use it.
	(problem_RD): Add NULL fields for new members.
	(problem_LR, problem_LIVE): Likewise.
	(df_chain_bb_dump): New function.
	(df_chain_top_dump): Dump only for artificial DEFs and USEs,
	using df_chain_bb_dump.
	(df_chain_bottom_dump): Likewise.
	(df_chain_insn_top_dump, df_chain_insn_bottom_dump): New functions.
	(problem_CHAIN): Add them as new members.
	(problem_WORD_LR, problem_NOTE): Add NULL fields for new members.
	(problem_MD): Likewise.
	* cfgrtl.c (rtl_dump_bb): Use df_dump_insn_top and df_dump_insn_bottom.
	(print_rtl_with_bb): Likewise.

	* dce.c (init_dce): Use DF_RD_PRUNE_DEAD_DEFS.
	* loop-invariant.c (find_defs): Likewise.
	* loop-iv.c (iv_analysis_loop_init): Likewise.
	* ree.c (find_and_remove_re): Likewise.
	* web.c (web_main): Likewise.

From-SVN: r192213
2012-10-08 15:33:58 +00:00
Alexandre Oliva 08df6c0db1 re PR debug/52983 (internal compiler error: in df_uses_record, at df-scan.c:3243)
PR debug/52983
* valtrack.h, valtrack.c: New.
* Makefile.in (VALTRACK_H): New.
(OBJS): Add valtrack.o.
(valtrack.o): New.
(cselib.o, dce.o, df-problems.o, combine.o): Add VALTRACK_H.
* combine.c: Include valtrack.h.
(make_compound_operation): Publish.
(cleanup_auto_inc_dec): Move to valtrack.c.
(struct rtx_subst_pair, propagate_for_debug_subst): Likewise.
(propagate_for_debug): Likewise.  Add this_basic_block parameter.
Adjust all callers.
* cselib.c: Include valtrack.h.
* dce.c: Likewise.
* df-problems.c: Likewise.
(dead_debug_init, dead_debug_reset_uses): Move to valtrack.c.
(dead_debug_finish, dead_debug_add): Likewise.
(dead_debug_insert_temp): Likewise.
* df.h (struct dead_debug_use): Move to valtrack.h.
(struct dead_debug, enum debug_temp_where): Likewise.
(dead_debug_init, dead_debug_reset_uses): Move to valtrack.h.
(dead_debug_finish, dead_debug_add): Likewise.
(dead_debug_insert_temp): Likewise.
* rtl.h (make_compound_operation): Declare.

From-SVN: r190061
2012-08-02 00:34:11 +00:00
Richard Sandiford 0951ac864a re PR debug/53740 (--enable-checking=yes,rtl bootstrap failure with ada)
PR debug/53740
	* df.h, df-problems.c, dce.c: Revert last patch.

From-SVN: r188935
2012-06-25 14:20:19 +00:00
Richard Sandiford ecf706e5ec re PR debug/53740 (--enable-checking=yes,rtl bootstrap failure with ada)
gcc/
	PR debug/53740
	* df.h (dead_debug_add): Remove third argument.
	* df-problems.c (dead_debug_add): Likewise.  Use the REGNO of the
	REG that we want to replace instead.
	(dead_debug_insert_temp): Use the REGNO of the reg that we want
	to replace instead of DF_REF_REGNO.  Require there to always be
	at least one such use.  Check for cases where the same location
	has more than df_ref associated with it.
	(df_note_bb_compute): Remove third dead_debug_add argument.
	* dce.c (word_dce_process_block): Likewise.

From-SVN: r188934
2012-06-25 13:25:39 +00:00
Joseph Myers 073a899888 LANGUAGES: Fix typos.
* LANGUAGES: Fix typos.
	* Makefile.in: Fix typos.
	* alias.c: Fix typos.
	* auto-inc-dec.c: Fix typos.
	* bb-reorder.c: Fix typos.
	* cfgcleanup.c: Fix typos.
	* cgraph.c: Fix typos.
	* cgraph.h: Fix typos.
	* cgraphunit.c: Fix typos.
	* collect2-aix.h: Fix typos.
	* collect2.c: Fix typos.
	* compare-elim.c: Fix typos.
	* config/alpha/vms.h: Fix typos.
	* config/arm/README-interworking: Fix typos.
	* config/arm/arm.c: Fix typos.
	* config/arm/iterators.md: Fix typos.
	* config/arm/vxworks.h: Fix typos.
	* config/avr/avr.c: Fix typos.
	* config/avr/avr.h: Fix typos.
	* config/avr/avr.md: Fix typos.
	* config/avr/builtins.def: Fix typos.
	* config/c6x/c6x.c: Fix typos.
	* config/cr16/cr16.c: Fix typos.
	* config/cr16/cr16.md: Fix typos.
	* config/cris/cris.md: Fix typos.
	* config/darwin.c: Fix typos.
	* config/darwin.opt: Fix typos.
	* config/i386/i386-c.c: Fix typos.
	* config/i386/i386.c: Fix typos.
	* config/ia64/ia64.c: Fix typos.
	* config/m68k/cf.md: Fix typos.
	* config/mep/mep.c: Fix typos.
	* config/microblaze/microblaze.c: Fix typos.
	* config/microblaze/microblaze.h: Fix typos.
	* config/mn10300/mn10300.c: Fix typos.
	* config/mn10300/mn10300.md: Fix typos.
	* config/pa/pa.c: Fix typos.
	* config/picochip/picochip.h: Fix typos.
	* config/rs6000/a2.md: Fix typos.
	* config/rs6000/rs6000.c: Fix typos.
	* config/rs6000/vector.md: Fix typos.
	* config/rx/rx.md: Fix typos.
	* config/rx/rx.opt: Fix typos.
	* config/s390/2097.md: Fix typos.
	* config/s390/s390.c: Fix typos.
	* config/s390/s390.h: Fix typos.
	* config/sh/sh.c: Fix typos.
	* config/sh/sh.md: Fix typos.
	* config/sparc/sync.md: Fix typos.
	* config/spu/spu.c: Fix typos.
	* config/spu/spu.md: Fix typos.
	* config/vms/vms.c: Fix typos.
	* config/vxworks-dummy.h: Fix typos.
	* config/vxworks.h: Fix typos.
	* cselib.c: Fix typos.
	* df-scan.c: Fix typos.
	* df.h: Fix typos.
	* doc/extend.texi: Fix typos.
	* doc/install.texi: Fix typos.
	* doc/invoke.texi: Fix typos.
	* doc/md.texi: Fix typos.
	* doc/plugins.texi: Fix typos.
	* doc/rtl.texi: Fix typos.
	* dse.c: Fix typos.
	* dwarf2asm.c: Fix typos.
	* dwarf2out.c: Fix typos.
	* except.h: Fix typos.
	* expr.c: Fix typos.
	* fold-const.c: Fix typos.
	* gcc.c: Fix typos.
	* gcse.c: Fix typos.
	* genautomata.c: Fix typos.
	* gengtype-state.c: Fix typos.
	* gengtype.c: Fix typos.
	* genhooks.c: Fix typos.
	* gimple-fold.c: Fix typos.
	* gimple-pretty-print.c: Fix typos.
	* gimple.c: Fix typos.
	* gimple.h: Fix typos.
	* gimplify.c: Fix typos.
	* graphite-interchange.c: Fix typos.
	* graphite-sese-to-poly.c: Fix typos.
	* ifcvt.c: Fix typos.
	* input.c: Fix typos.
	* ipa-cp.c: Fix typos.
	* ipa-inline-analysis.c: Fix typos.
	* ipa-inline-transform.c: Fix typos.
	* ipa-inline.c: Fix typos.
	* ipa-pure-const.c: Fix typos.
	* ipa-ref.h: Fix typos.
	* ipa-reference.c: Fix typos.
	* ipa-utils.c: Fix typos.
	* ipa.c: Fix typos.
	* ira-emit.c: Fix typos.
	* ira-lives.c: Fix typos.
	* lto-streamer.c: Fix typos.
	* lto-streamer.h: Fix typos.
	* lto-wrapper.c: Fix typos.
	* mcf.c: Fix typos.
	* mode-switching.c: Fix typos.
	* modulo-sched.c: Fix typos.
	* plugin.c: Fix typos.
	* postreload.c: Fix typos.
	* sched-deps.c: Fix typos.
	* sel-sched-ir.c: Fix typos.
	* sel-sched-ir.h: Fix typos.
	* sel-sched.c: Fix typos.
	* sese.c: Fix typos.
	* stor-layout.c: Fix typos.
	* target-hooks-macros.h: Fix typos.
	* target.def: Fix typos.
	* trans-mem.c: Fix typos.
	* tree-eh.c: Fix typos.
	* tree-predcom.c: Fix typos.
	* tree-sra.c: Fix typos.
	* tree-ssa-address.c: Fix typos.
	* tree-ssa-loop-ivopts.c: Fix typos.
	* tree-ssa-loop-niter.c: Fix typos.
	* tree-ssa-math-opts.c: Fix typos.
	* tree-ssa-pre.c: Fix typos.
	* tree-ssa-propagate.c: Fix typos.
	* tree-ssa-reassoc.c: Fix typos.
	* tree-ssa-sccvn.c: Fix typos.
	* tree-ssa-ter.c: Fix typos.
	* tree-ssa-uninit.c: Fix typos.
	* tree-ssanames.c: Fix typos.
	* tree-vect-generic.c: Fix typos.
	* tree-vect-slp.c: Fix typos.
	* tree.c: Fix typos.
	* tree.h: Fix typos.
	* varasm.c: Fix typos.
	* varpool.c: Fix typos.

From-SVN: r187959
2012-05-29 15:14:06 +01:00
Alexandre Oliva 1adbb3614d re PR debug/48866 (gcc hangs when -g is set)
PR debug/48866
* df.h (enum debug_temp_where): New.
(dead_debug_init, dead_debug_finish) Declare.
(dead_debug_add, dead_debug_insert_temp): Declare.
(struct dead_debug_use, struct dead_debug): Moved from...
* df-problems.c: ... here.
(df_set_unused_notes_for_mw): Bind debug uses of unused regno
to a debug temp.
(df_create_unused_note): Likewise.
(df_set_dead_notes_for_mw): Move comment where it belongs.
(dead_debug_init): Export.
(dead_debug_reset_uses): New, factored out of...
(dead_debug_finish): ...this.  Export.
(dead_debug_reset): Remove.
(dead_debug_add): Export.
(dead_debug_insert_before): Rename to...
(dead_debug_insert_temp): ... this.  Add where argument.  Export.
Locate stored value for BEFORE_WITH_VALUE.  Avoid repeat inserts.
Return insertion count.
(df_note_bb_compute): Adjust.
* dce.c (word_dce_process_block): Adjust dead debug uses.
(dce_process_block): Likewise.

From-SVN: r186422
2012-04-13 15:56:21 +00:00
Jakub Jelinek bf743fc408 re PR bootstrap/52397 (comparison failure with Ada enabled)
PR bootstrap/52397
	* df.h (struct df_d): Adjust comment that hard_regs_live_count
	doesn't count DEBUG_INSN refs.
	* df-scan.c (df_ref_create_structure): Don't set DF_HARD_REG_LIVE
	for DEBUG_INSN refs.

From-SVN: r184652
2012-02-29 09:12:04 +01:00
Eric Botcazou 4ad9a9de2d lto-streamer-out.c (write_symbol): Use proper 64-bit host type.
* lto-streamer-out.c (write_symbol): Use proper 64-bit host type.
	* lto-cgraph.c (input_cgraph_opt_section): Use 'int' for offsets.
	* lto-streamer-in.c (lto_read_body): Likewise.
	(lto_input_toplevel_asms): Likewise.
	* lto-section-in.c (lto_create_simple_input_block): Likewise.
	* ipa-inline-analysis.c (inline_read_section): Likewise.
	* ipa-prop.c (ipa_prop_read_section): Likewise.

	* df.h (DF_NOTE): Fix typo in comment.
lto/
	* lto.h (lto_parse_hex): Delete.
	* lto.c (lto_read_decls): Use 'int' for offsets.
	(lto_parse_hex): Make static and return proper 64-bit host type.
	(lto_resolution_read): Use proper 64-bit host type.

From-SVN: r182310
2011-12-13 21:59:39 +00:00
Bernd Schmidt 4ec5d4f5b9 re PR rtl-optimization/44374 (Hoist same instructions in different branches)
gcc/
	PR rtl-optimization/44374
	Reapply patch with fixes.
	* basic-block.h (enum bb_flags): Add BB_MODIFIED.
	* df-core.c (df_set_bb_dirty): Set it.
	* ifcvt.c (find_memory): Remove function.
	(dead_or_predicable): Use can_move_insns_across.
	* df.h (can_move_insns_across): Declare function.
	* cfgcleanup.c (block_was_dirty): New static variable.
	(flow_find_head_matching_sequence): Test for epilogue notes.
	(try_crossjump_bb, try_forward_edges): Test BB_MODIFIED flag rather
	than df_get_bb_dirty.
	(try_head_merge_bb): New static function.
	(try_optimize_cfg): Call it.  Call df_analyze if block_was_dirty
	is set.
	* df-problems.c: Include "target.h"
	(df_simulate_find_uses): New static function.
	(MEMREF_NORMAL, MEMREF_VOLATILE): New macros.
	(find_memory, find_memory_store): New static functions.
	(can_move_insns_across): New function.
	* Makefile.in (df-problems.o): Update dependencies.

gcc/testsuite/
	PR rtl-optimization/44374
	Reapply patch with fixes.
	* gcc.target/arm/headmerge-1.c: New test.
	* gcc.target/arm/headmerge-2.c: New test.
	* gcc.target/i386/headmerge-1.c: New test.
	* gcc.target/i386/headmerge-2.c: New test.

From-SVN: r167779
2010-12-14 00:23:40 +00:00
Paolo Bonzini dc007c1fd2 re PR bootstrap/44970 (Revision 162270 failed to bootstrap)
2010-11-22  Paolo Bonzini<bonzini@gnu.org>

	PR bootstrap/44970
	* Makefile.in (fwprop.o) Add sparseset.h.
	* fwprop.c: Include sparseset.h
	(struct find_occurrence_data, find_occurrence_callback,
	find_occurrence): Remove.
	(active_defs, active_defs_check, register_active_defs,
	update_df_init, update_uses): New.
	(update_df): Rewrite.
	(try_fwprop_subst, forward_propagate_asm): Add calls to
	update_df_init and update_df.
	(fwprop_init): Allocate active_defs and active_defs_check.
	(fwprop_done): Free them.
	(fwprop, fwprop_addr): Adjust comments.
	* df.h (df_uses_create): Declare.
	* df-scan.c (df_install_ref_incremental): Break out of df_ref_create.
	(df_ref_create): Return result of df_ref_create_structure directly.
	(df_ref_create_structure): Call df_install_ref_incremental when
	no collection_rec is passed.
	(df_ref_record): Do not create multiword hard reg info when no
	collection_rec is passed.
	(df_uses_create): New.

From-SVN: r167038
2010-11-22 16:20:16 +00:00
Alexandre Oliva f9aeaebf75 re PR rtl-optimization/42889 ("-fcompare-debug failure (length)" with "-O1 -fgcse")
PR debug/42889
* df-scan.c (df_insn_rescan): Don't mark BBs upon debug insns.
* df-core.c (df_set_bb_dirty_nonrl): Remove.
* df.h (df_set_bb_dirty_nonlr): Likewise.

From-SVN: r166719
2010-11-13 18:51:57 +00:00
H.J. Lu 5554928d3d Revert revision 164552.
gcc/

2010-11-03  H.J. Lu  <hongjiu.lu@intel.com>

	PR rtl-optimization/45865
	* Makefile.in (df-problems.o): Revert revision 164552.
	* basic-block.h (enum bb_flags): Likewise.
	* cfgcleanup.c (block_was_dirty): Likewise.
	(try_forward_edges): Likewise.
	(try_crossjump_bb): Likewise.
	(try_head_merge_bb): Likewise.
	(try_optimize_cfg): Likewise.
	(cleanup_cfg): Likewise.
	* df-core.c (df_set_bb_dirty): Likewise.
	* df-problems.c: Likewise.
	(df_simulate_find_uses): Likewise.
	(MEMREF_NORMAL, MEMREF_VOLATILE): Likewise.
	(find_memory, find_memory_store): Likewise.
	(can_move_insns_across): Likewise.
	* df.h (can_move_insns_across): Likewise.
	* ifcvt.c (find_memory): Likewise.
	(dead_or_predicable): Likewise.

gcc/testsuite/

2010-11-03  H.J. Lu  <hongjiu.lu@intel.com>

	PR rtl-optimization/45865
	* gcc.dg/pr45865.c: New.
	* gcc.dg/torture/pr45865.c: Likewise.

	* gcc.target/arm/headmerge-1.c: Revert revision 164552.
	* gcc.target/arm/headmerge-2.c: Likewise.
	* gcc.target/i386/headmerge-1.c: Likewise.
	* gcc.target/i386/headmerge-2.c: Likewise.

From-SVN: r166259
2010-11-03 10:07:04 -07:00
Bernd Schmidt 3c3bd4710f re PR rtl-optimization/44374 (Hoist same instructions in different branches)
PR rtl-optimization/44374
	* basic-block.h (enum bb_flags): Add BB_MODIFIED.
	* df-core.c (df_set_bb_dirty): Set it.
	* ifcvt.c (find_memory): Remove function.
	(dead_or_predicable): Use can_move_insns_across.
	* df.h (can_move_insns_across): Declare function.
	* cfgcleanup.c (block_was_dirty): New static variable.
	(try_crossjump_bb, try_forward_edges): Test BB_MODIFIED flag rather
	than df_get_bb_dirty.
	(try_head_merge_bb): New static function.
	(try_optimize_cfg): Call it.  Call df_analyze if block_was_dirty
	is set.
	* df-problems.c: Include "target.h"
	(df_simulate_find_uses): New static function.
	(MEMREF_NORMAL, MEMREF_VOLATILE): New macros.
	(find_memory, find_memory_store): New static functions.
	(can_move_insns_across): New function.
	* Makefile.in (df-problems.o): Update dependencies.

testsuite/
	PR rtl-optimization/44374
	* gcc.target/arm/headmerge-1.c: New test.
	* gcc.target/arm/headmerge-2.c: New test.
	* gcc.target/i386/headmerge-1.c: New test.
	* gcc.target/i386/headmerge-2.c: New test.

From-SVN: r164552
2010-09-23 10:04:33 +00:00
Paolo Bonzini 502ef838c9 df.h (enum df_ref_class): Remove DF_REF_EXTRACT.
2010-09-04  Paolo Bonzini  <bonzini@gnu.org>

	* df.h (enum df_ref_class): Remove DF_REF_EXTRACT.
	(struct df_extract_ref): Remove.
	(union df_ref_d): Remove extract_ref member.
	(df_ref_create): Remove last three arguments.
	(DF_REF_LOC): Remove DF_REF_EXTRACT case.
	* df-scan.c (df_ref_record): Remove last three arguments, do not
	pass them to df_ref_create_structure.
	(df_uses_record): Remove first and last three arguments.  Replace
	first argument with DF_REF_REGULAR, adjust calls to remove the
	width, offset and mode.  Always call recursively on the second
	and third argument of ZERO_EXTRACT and SIGN_EXTRACT.
	(df_ref_create_structure): Remove first argument.
	(struct df_scan_problem_data): Remove ref_extract_pool.
	(df_scan_free_internal): Do not free it.
	(df_scan_alloc): Do not allocate it.
	(df_ref_create): Remove last three arguments, do not pass them to
	df_ref_create_structure.
	(df_free_ref): Remove DF_REF_EXTRACT case.
	(df_notes_rescan): Adjust call to df_uses_record.
	(df_ref_equal_p, df_ref_compare, df_ref_create_structure):
	Remove DF_REF_EXTRACT case.
	(df_def_record_1): Do not special case class for a ZERO_EXTRACT lhs.
	Adjust calls to df_ref_record, using DF_REF_REGULAR for all REG
	and SUBREG definitions.
	(df_get_conditional_uses): Remove references to width/offset/mode,
	adjust call to df_ref_create_structure.
	(df_get_call_refs, df_insn_refs_collect, df_bb_refs_collect,
	df_entry_block_defs_collect, df_exit_block_uses_collect): Adjust
	calls to df_uses_record and df_ref_record.
	* fwprop.c (update_df): Remove references to width/offset/mode,
	adjust call to df_ref_create.

From-SVN: r163854
2010-09-04 07:26:39 +00:00
Bernd Schmidt 8d0741923d re PR rtl-optimization/42575 (arm-eabi-gcc 64-bit multiply weirdness)
PR rtl-optimization/42575
	* dce.c (word_dce_process_block): Renamed from byte_dce_process_block.
	Argument AU removed.  All callers changed.  Ignore artificial refs.
	Use return value of df_word_lr_simulate_defs to decide whether an insn
	is necessary.
	(fast_dce): Rename arg to WORD_LEVEL.
	(run_word_dce): Renamed from rest_of_handle_fast_byte_dce.  No longer
	static.
	(pass_fast_rtl_byte_dce): Delete.
	* dce.h (run_word_dce): Declare.
	* df-core.c (df_print_word_regset): Renamed from df_print_byteregset.
	All callers changed.  Simplify code to only deal with two-word regs.
	* df.h (DF_WORD_LR): Renamed from DF_BYTE_LR.
	(DF_WORD_LR_BB_INFO): Renamed from DF_BYTE_LR_BB_INFO.
	(DF_WORD_LR_IN): Renamed from DF_BYTE_LR_IN.
	(DF_WORD_LR_OUT): Renamed from DF_BYTE_LR_OUT.
	(struct df_word_lr_bb_info): Renamed from df_byte_lr_bb_info.
	(df_word_lr_mark_ref): Declare.
	(df_word_lr_add_problem, df_word_lr_mark_ref, df_word_lr_simulate_defs,
	df_word_lr_simulate_uses): Declare or rename from byte variants.
	(df_byte_lr_simulate_artificial_refs_at_top,
	df_byte_lr_simulate_artificial_refs_at_end, df_byte_lr_get_regno_start,
	df_byte_lr_get_regno_len, df_compute_accessed_bytes): Delete
	declarations.
	(df_word_lr_get_bb_info): Rename from df_byte_lr_get_bb_info.
	(enum df_mm): Delete.
	* df-byte-scan.c: Delete file.
	* df-problems.c (df_word_lr_problem_data): Renamed from
	df_byte_lr_problem_data, all members deleted except for
	WORD_LR_BITMAPS, which is renamed from BYTE_LR_BITMAPS.  Uses changed.
	(df_word_lr_expand_bitmap, df_byte_lr_simulate_artificial_refs_at_top,
	df_byte_lr_simulate_artificial_refs_at_end, df_byte_lr_get_regno_start,
	df_byte_lr_get_regno_len, df_byte_lr_check_regs,
	df_byte_lr_confluence_0): Delete functions.
	(df_word_lr_free_bb_info): Renamed from df_byte_lr_free_bb_info; all
	callers changed.
	(df_word_lr_alloc): Renamed from df_byte_lr_alloc; all callers changed.
	Don't initialize members that were deleted, don't try to discover data
	about registers.  Ignore hard regs.
	(df_word_lr_reset): Renamed from df_byte_lr_reset; all callers changed.
	(df_word_lr_mark_ref): New function.
	(df_word_lr_bb_local_compute): Renamed from
	df_byte_bb_lr_local_compute; all callers changed.  Use
	df_word_lr_mark_ref.  Assert that artificial refs don't include
	pseudos.  Ignore hard registers.
	(df_word_lr_local_compute): Renamed from df_byte_lr_local_compute.
	Assert that exit block uses don't contain pseudos.
	(df_word_lr_init): Renamed from df_byte_lr_init; all callers changed.
	(df_word_lr_confluence_n): Renamed from df_byte_lr_confluence_n; all
	callers changed.  Ignore hard regs.
	(df_word_lr_transfer_function): Renamed from
	df_byte_lr_transfer_function; all callers changed.
	(df_word_lr_free): Renamed from df_byte_lr_free; all callers changed.
	(df_word_lr_top_dump): Renamed from df_byte_lr_top_dump; all callers
	changed.
	(df_word_lr_bottom_dump): Renamed from df_byte_lr_bottom_dump; all
	callers changed.
	(problem_WORD_LR): Renamed from problem_BYTE_LR; uses changed;
	confluence operator 0 set to NULL.
	(df_word_lr_add_problem): Renamed from df_byte_lr_add_problem; all
	callers changed.
	(df_word_lr_simulate_defs): Renamed from df_byte_lr_simulate_defs.
	Return bool, true if bitmap changed or insn otherwise necessary.
	All callers changed.  Simplify using df_word_lr_mark_ref.
	(df_word_lr_simulate_uses): Renamed from df_byte_lr_simulate_uses;
	all callers changed.  Simplify using df_word_lr_mark_ref.
	* lower-subreg.c: Include "dce.h"
	(decompose_multiword_subregs): Call run_word_dce if df available.
	* Makefile.in (lower-subreg.o): Adjust dependencies.
	(df-byte-scan.o): Delete.
	* timevar.def (TV_DF_WORD_LR): Renamed from TV_DF_BYTE_LR.

From-SVN: r162678
2010-07-29 12:39:57 +00:00
Joern Rennecke f12c802afd re PR other/44644 (type/data name clash makes --enable-build-with-cxx cc1 hard to debug)
PR other/44644
        * df-core.c (struct df): Rename to df_d.
        * df.h (struct df): Likewise.
        * dse.h (struct df): Remove forward declaration.
        * recog.h (struct insn_data): Rename to:
        (struct_insn_data_d).  Adjusted all users.

From-SVN: r161281
2010-06-23 15:25:33 +01:00
Jan Hubicka 50b2e85996 Fix version of patch from previous commit ;(
From-SVN: r161199
2010-06-22 16:02:34 +00:00
Jan Hubicka 1a0f3fa137 df-problems.c (df_rd_confluence_n, [...]): Return true if something changed.
* df-problems.c (df_rd_confluence_n, df_lr_confluence_n, df_live_confluence_n,
	df_byte_lr_confluence_n, df_md_confluence_n): Return true if something changed.
	* df.h (df_confluence_function_n): Return bool.
	* df-core.c (df_worklist_propagate_forward, df_worklist_propagate_backward):
	track changes and ages.
	(df_worklist_dataflow_doublequeue): Use bitmap iterator for main walk;
	track ages.
	* dse.c (dse_confluence_n): Return always true.

From-SVN: r161197
2010-06-22 15:51:15 +00:00
Jan Hubicka e285df089b df-core.c (df_clear_bb_info): New function.
* df-core.c (df_clear_bb_info): New function.
	(df_set_blocks): bb_info is always allocated.
	(df_get_bb_info): Use block_info_elt_size.
	(df_set_bb_info): Likewise.
	(df_compact_blocks): Update for new block_info.
	(grow_bb_info): New function.
	* df-problems.c (df_grow_bb_info): Move to df-core.c
	(df_rd_set_bb_info): Remove.
	(df_rd_free_bb_info): Do not free block pool.
	(df_rd_alloc): Do not create pool, use check for
	obstack presence instead of NULL pointer for new blocks.
	(df_rd_free): DO not free alloc pool; clear block_info.
	(problem_RD): Add size of block info structure.
	(df_lr_set_bb_info): Remove.
	(df_lr_free_bb_info): Do not free block pool.
	(df_lr_alloc): Do not create pool, use check for
	obstack presence instead of NULL pointer for new blocks.
	(df_lr_free): DO not free alloc pool; clear block_info.
	(problem_LR): Add size of block info structure.
	(df_live_set_bb_info): Remove.
	(df_live_free_bb_info): Do not free block pool.
	(df_live_alloc): Do not create pool, use check for
	obstack presence instead of NULL pointer for new blocks.
	(df_live_free): DO not free alloc pool; clear block_info.
	(problem_LIVE): Add size of block info structure.
	(problem_CHAIN): Add size of block info structure.
	(df_byte_lr_set_bb_info): Remove.
	(df_byte_lr_free_bb_info): Do not free block pool.
	(df_byte_lr_alloc): Do not create pool, use check for
	obstack presence instead of NULL pointer for new blocks.
	(df_byte_lr_free): DO not free alloc pool; clear block_info.
	(problem_BYTE_LR): Add size of block info structure.
	(problem_NOTE): Add size of block info structure.
	(df_byte_MD_set_bb_info): Remove.
	(df_byte_MD_free_bb_info): Do not free block pool.
	(df_byte_MD_alloc): Do not create pool, use check for
	obstack presence instead of NULL pointer for new blocks.
	(df_byte_MD_free): DO not free alloc pool; clear block_info.
	(problem_BD): Add size of block info structure.
	* df-scan.c (df_scan_free_internal): Free block pool.
	(df_scan_set_bb_info): Remove.
	(df_scan_free_bb_info): Check for artificial_defs instead
	of bb_info being non-NULL.
	(df_scan_alloc): DO not create df_scan_block pool.
	(problem_SCAN): Set size of block info.
	(df_bb_refs_record): Do not allocate bb_info.
	* df.h (df_problem): Add block_info_elt_size.
	(struct dataflow): Change block_info to void *.
	(df_scan_get_bb_info, df_rd_get_bb_info, df_lr_get_bb_info,
	df_md_get_bb_info, df_live_get_bb_info, df_byte_lr_get_bb_info): Return
	in-line structures.

From-SVN: r160660
2010-06-12 12:45:26 +00:00
Jan Hubicka a7e3698d81 df-core.c (df_set_blocks): Use bitmap_head instead of bitmap.
* df-core.c (df_set_blocks): Use bitmap_head instead of bitmap.
	(df_compact_blocks): Likewise.
	* df.h (struct df): Turn hardware_regs_used,
	regular_block_artificial_uses, eh_block_artificial_uses,
	insns_to_delete, insns_to_rescan, insns_to_notes_rescan into
	bitmap_head.
	* df-problems.c (df_lr_local_compute, df_lr_confluence_0,
	df_byte_lr_alloc, df_simulate_fixup_sets): Update.
	* df-scan.c (df_scan_free_internal, df_scan_alloc, df_scan_start_dump,
	df_scan_blocks, df_insn_delete, df_insn_rescan,
	df_insn_rescan_debug_internal, df_insn_rescan_all,
	df_process_deferred_rescans, df_process_deferred_rescans,
	df_notes_rescan, df_get_call_refs, df_get_call_refs,
	regs_invalidated_by_call_regset, df_get_call_refs, df_bb_refs_collect,
	df_record_entry_block_defs, df_record_exit_block_uses,
	df_update_exit_block_uses, df_bb_verify, df_entry_block_bitmap_verify,
	df_scan_verify): Update.

From-SVN: r160348
2010-06-06 19:29:01 +00:00
Jan Hubicka b33a91c946 df.h (df_rd_bb_info, [...]): Embedd bitmap_head into the structure.
* df.h (df_rd_bb_info, df_md_bb_info, df_lr_bb_info, df_live_bb_info,
	df_byte_lr_bb_info): Embedd bitmap_head into the structure.
	(DF_LIVE_IN, DF_LIVE_OUT, DF_LR_IN, DF_LR_OUT, DF_BYTE_LR_IN,
	DF_BYTE_LR_OUT): Update for embedded bitmaps.
	* fwprop.c (single_def_use_enter_block): Likewise.
	* ddg.c (create_ddg_dep_from_intra_loop_link,
	add_cross_iteration_register_deps, build_inter_loop_deps): Likewise.
	* loop-iv.c (latch_dominating_def): Likewise.
	* df-problems.c (df_rd_free_bb_info, df_rd_alloc,
	df_rd_bb_local_compute_process_def, df_rd_bb_local_compute_process_def,
	df_rd_init_solution, df_rd_init_solution, df_rd_transfer_function,
	df_rd_transfer_function, df_rd_top_dump,
	df_rd_bottom_dump): Update.
	(df_lr_free_bb_info, df_lr_alloc, df_lr_reset, df_lr_bb_local_compute,
	df_lr_bb_local_compute, df_lr_bb_local_compute, df_lr_bb_local_compute,
	df_lr_bb_local_compute, df_lr_local_compute, df_lr_init, df_lr_init,
	df_lr_confluence_0, df_lr_free, df_lr_top_dump, df_lr_bottom_dump,
	df_lr_verify_solution_start, df_lr_verify_solution_end,
	df_lr_verify_transfer_functions, df_lr_verify_transfer_functions,
	df_live_free_bb_info, df_live_alloc, df_live_reset,
	df_live_bb_local_compute, df_live_init, df_live_transfer_function,
	df_live_finalize, df_live_free, df_live_top_dump, df_live_bottom_dump,
	df_live_verify_solution_start, df_live_verify_solution_end,
	df_live_verify_transfer_functions, df_chain_create_bb,
	df_byte_lr_free_bb_info, df_byte_lr_alloc, df_byte_lr_reset,
	df_byte_lr_bb_local_compute, df_byte_lr_bb_local_compute,
	df_byte_lr_bb_local_compute, df_byte_lr_bb_local_compute,
	df_byte_lr_bb_local_compute, df_byte_lr_local_compute, df_byte_lr_init,
	df_byte_lr_confluence_0, df_byte_lr_confluence_n,
	df_byte_lr_transfer_function, df_byte_lr_top_dump,
	df_byte_lr_bottom_dump, df_create_unused_note,
	df_note_bb_compute, df_md_free_bb_info, df_md_alloc,
	df_md_bb_local_compute_process_def, df_md_local_compute, df_md_reset,
	df_md_transfer_function, df_md_init, df_md_confluence_0,
	df_md_confluence_n,
	df_md_top_dump, df_md_bottom_dump): Update.  (struct df_lr_problem_data):
	Embedd bitmap headers.

From-SVN: r160268
2010-06-04 14:27:50 +00:00
Nathan Froyd 25efe0608f basic-block.h (struct control_flow_graph): Move last_label_uid field up.
* basic-block.h (struct control_flow_graph): Move last_label_uid field up.
	* df.h (struct df_base_ref): Move regno field up.
	* dwarf2out.c (struct dw_fde_struct): Move funcdef_number field down.
	* expr.h (struct separate_ops): Move location field up.
	* optabs.h (struct optab_d): Move libcall_basename field down.
	* config/i386/i386.c (struct ix86_frame): Move red_zone_size up.
	* config/i386/i386.h (struct machine_function): Convert call_abi field
	into a bitfield.  Move cfa field to the end of the structure.

From-SVN: r160025
2010-05-29 14:03:31 +00:00
Steven Bosscher 7a8cba34b0 coretypes.h (struct simple_bitmap_def, [...]): New core types.
gcc/ChangeLog:
	* coretypes.h (struct simple_bitmap_def, sbitmap, const_sbitmap):
	New core types.
	* sbitmap.h (struct sbitmap_def): Do not typedef here.
	* sbitmap.c: Include sbitmap.h.
	* basic-block.h: Do not include bitmap.h, sbitmap.h, partition.h,
	hard-reg-set.h.  Split everything related to regsets out from here...
	* regset.h: ...to here.  New file.
	* df.h: Include regset.h and sbitmap.h.
	* tree-flow.h: Likewise.
	* cfgloop.h: Likewise.
	* except.h: Do not include sbitmap.h.  Include hashtab.h.
	* cgraph.h: Include vec.h and function.h.
	* reload.h (struct insn_chain): Change types of live_throughout
	and dead_or_set from regset_head to bitmap_head.
	(compute_use_by_pseudos): Be defined also if regset.h is not included.
	* ira-int.h (struct ira_spilled_reg_stack_slot): Change type of
	spilled_regs from regset_head to bitmap_head to avoid dependency
	in regset.h.
	* sel-sched-ir.h: Include regset.h.
	* reload.c: Include df.h before reload.h.
	* caller-save.c: Likewise.
	* reload1.c: Likewise.
	* ira.c: Likewise.
	(mark_elimination): Update type of r to bitmap, consistent with
	DF_LR_IN.
	* dominance.c: Include bitmap.h.
	* modulo-sched.c: Include df.h.
	* cfganal.c: Include bitmap.h and sbitmap.h.
	* cfgbuild.c: Include sbitmap.h.
	* lcm.c: Include sbitmap.h.
	* gcse.c (alloc_gcse_mem): Allocate regset with ALLOC_REG_SET.
	* domwalk.c: Include sbitmap.h, exclude ggc.h.
	* cfgexpand.c: Inlcude bitmap.h and sbitmap.h.
	* cselib.c: Include bitmap.h.
	* tree-optimize.c: Include regset.h.
	* stmt.c: Include bitmap.h.
	* Makefile.in: Update dependencies.

cp/ChangeLog
	* semantics.c: Include bitmap.h.
	* Make-lang.in: Update dependencies.

From-SVN: r159746
2010-05-22 22:24:53 +00:00
Bernd Schmidt 907deb1a1e ifcvt.c (dead_or_predicable): Use df_simulate_find_defs and df_simulate_find_noclobber_defs as appropriate.
* ifcvt.c (dead_or_predicable): Use df_simulate_find_defs and
	df_simulate_find_noclobber_defs as appropriate.  Keep track of an
	extra set merge_set_noclobber, and use it to relax the final test
	slightly.
	* df.h (df_simulate_find_noclobber_defs): Declare.
	* df-problems.c (df_simulate_find_defs): Don't ignore partial or
	conditional defs.
	(df_simulate_find_noclobber_defs): New function.

From-SVN: r158639
2010-04-22 10:42:21 +00:00
Jakub Jelinek c23cd1d60f re PR rtl-optimization/42889 ("-fcompare-debug failure (length)" with "-O1 -fgcse")
PR rtl-optimization/42889
	* df.h (df_set_bb_dirty_nonlr): New prototype.
	* df-core.c (df_set_bb_dirty_nonlr): New function.
	* df-scan.c (df_insn_rescan): Call it instead of
	df_set_bb_dirty for DEBUG_INSNs.

	* gcc.dg/pr42889.c: New test.

From-SVN: r156344
2010-01-29 13:14:47 +01:00
Alexandre Oliva 7c0281633f Update copyright notices of my recent commits.
From-SVN: r155766
2010-01-09 14:46:25 +00:00
Alexandre Oliva 994ae26cb5 re PR rtl-optimization/42631 ("-fcompare-debug failure" with "-O1 -funroll-loops")
gcc/ChangeLog:
PR debug/42631
* web.c (union_defs): Add used argument, to combine uses of
uninitialized regs.
(entry_register): Adjust type and tests of used argument.
(web_main): Widen used for new use.  Pass it to union_defs.
* df.h (union_defs): Adjust prototype.
gcc/testsuite/ChangeLog:
PR debug/42631
* gcc.dg/pr42631.c: New.

From-SVN: r155765
2010-01-09 14:41:51 +00:00
H.J. Lu b8698a0f37 Remove trailing white spaces.
2009-11-25  H.J. Lu  <hongjiu.lu@intel.com>

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

From-SVN: r154645
2009-11-25 02:55:54 -08:00
Paolo Bonzini 642746839c df-problems.c: Fix documentation for forward simulation of LR.
2009-11-08  Paolo Bonzini  <bonzini@gnu.org>

	* df-problems.c: Fix documentation for forward simulation of LR.
	(df_simulate_one_insn_forwards): Use df_simulate_find_defs.
	(df_simulate_finalize_forwards): Remove.
	* df.h (df_simulate_finalize_forwards): Remove.

From-SVN: r154012
2009-11-08 20:44:56 +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
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
Paolo Bonzini 00952e9784 re PR rtl-optimization/33928 (30% performance slowdown in floating-point code caused by r118475)
2009-05-08  Paolo Bonzini  <bonzini@gnu.org>

	PR rtl-optimization/33928
	PR 26854
	* fwprop.c (use_def_ref, get_def_for_use, bitmap_only_bit_bitween,
	process_uses, build_single_def_use_links): New.
	(update_df): Update use_def_ref.
	(forward_propagate_into): Use get_def_for_use instead of use-def
	chains.
	(fwprop_init): Call build_single_def_use_links and let it initialize
	dataflow.
	(fwprop_done): Free use_def_ref.
	(fwprop_addr): Eliminate duplicate call to df_set_flags.
	* df-problems.c (df_rd_simulate_artificial_defs_at_top, 
	df_rd_simulate_one_insn): New.
	(df_rd_bb_local_compute_process_def): Update head comment.
	(df_chain_create_bb): Use the new RD simulation functions.
	* df.h (df_rd_simulate_artificial_defs_at_top, 
	df_rd_simulate_one_insn): New.
	* opts.c (decode_options): Enable fwprop at -O1.
	* doc/invoke.texi (-fforward-propagate): Document this.

From-SVN: r147282
2009-05-08 12:22:30 +00:00
Ian Lance Taylor 81f40b7964 collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind.
./:	* collect2.c (is_ctor_dtor): Change type of ret field in struct
	names to symkind.
	* dce.c (run_fast_df_dce): Change type of old_flags to int.
	* df-core.c (df_set_flags): Change return type to int.  Change
	type of old_flags to int.
	(df_clear_flags): Likewise.
	* df-scan.c (df_def_record_1): Change 0 to VOIDmode.
	(df_get_conditional_uses): Likewise.
	* df.h (df_set_flags, df_clear_flags): Update declarations.
	* dwarf2out.c (struct indirect_string_node): Change type of form
	field to enum dwarf_form.
	(AT_string_form): Change return type to enum dwarf_form.
	* fixed-value.c (fixed_compare): Add cast to enum type.
	* fwprop.c (update_df): Change 0 to VOIDmode.
	* gensupport.c: Change 0 to UNKNOWN.
	* gimple.h (gimple_cond_code): Add cast to enum type.
	* haifa-sched.c (reemit_notes): Add cast to enum type.
	* hooks.c (hook_int_void_no_regs): Remove function.
	* hooks.h (hook_int_void_no_regs): Remove declaration.
	* optabs.c (expand_widen_pattern_expr): Change 0 to VOIDmode.
	* predict.c (combine_predictions_for_insn): Add casts to enum
	type.
	* real.c (real_arithmetic): Add cast to enum type.
	(real_compare): Likewise.
	* target.h (struct gcc_target): Change return type of
	branch_target_register_class to enum reg_class.
	* target-def.h (TARGET_BRANCH_TARGET_REGISTER_CLASS): Define as
	default_branch_target_register_class.
	* targhooks.c (default_branch_target_register_class): New
	function.
	* targhooks.h (default_branch_target_register_class): Declare.
	* tree-data-ref.c (print_direction_vector): Add cast to enum
	type.
	* tree-vect-data-refs.c (vect_supportable_dr_alignment): Remove
	cast to int.
	* tree-vect-loop.c (vect_create_epilog_for_reduction): Change 0 to
	ERROR_MARK.
	* tree-vect-slp.c (vect_build_slp_tree): Change 0 to
	vect_uninitialized_def.  Change 0 to ERROR_MARK.
	* tree-vect-stmts.c (supportable_widening_operation): Don't
	initialize icode1 and icode2.
	* tree-vectorizer.h (enum vect_def_type): Add
	vect_uninitialized_def.
	* config/sol2-c.c (cmn_err_length_specs): Change 0 to FMT_LEN_none
	and to STD_C89.
	(cmn_err_flag_specs): Change 0 to STD_C89.
	(cmn_err_char_table): Likewise.
	* config/arm/arm.c (get_arm_condition_code): Change type of code
	to enum arm_cond_code.
	(IWMMXT_BUILTIN): Change 0 to UNKNOWN.
	(IWMMXT_BUILTIN2): Likewise.
	(neon_builtin_type_bits): Don't define typedef.
	(neon_builtin_datum): Change type of bits field to int.
	(arm_expand_neon_args): Add cast to enum type.
	* config/ia64/ia64.c (tls_symbolic_operand_type): Change 0 to
	TLS_MODEL_NONE.
	* config/i386/i386.c (bdesc_multi_arg): Change 0 to UNKNOWN.  Add
	casts to enum type.
	* config/mips/mips.c (LOONGSON_BUILTIN_ALIAS): Change 0 to
	MIPS_FP_COND_f.
	* config/mips/mips.md (jal_macro): Return enum constant.
	(single_insn): Likewise.
	* config/rs6000/rs6000.c (bdesc_altivec_preds): Change 0 to
	CODE_FOR_nothing.
	* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
	casts to enum type.
	* config/s390/s390.c (s390_tune_flags): Change type to int.
	(s390_arch_flags): Likewise.
	(s390_handle_arch_option): Change flags field of struct pta to
	int.
	* config/s390/s390.h (s390_tune_flags): Update declaration.
	(s390_arch_flags): Likewise.
	* config/sh/sh.c (prepare_move_operands): Compare
	tls_symbolic_operand result with enum constant.
	(sh_reorg): Change PUT_MODE to PUT_REG_NOTE_KIND.
	(sh_expand_prologue): Add cast to enum type.
	(sh_expand_epilogue): Likewise.
	(tls_symbolic_operand): Change return type to enum tls_model.
	(fpscr_set_from_mem): Add cast to enum type.
	(legitimize_pic_address): Compare tls_symbolic_operand result with
	enum constant.
	(sh_target_reg_class): Change return type to enum reg_class.
	* config/sh/sh.h (OVERRIDE_OPTIONS): Change CPU_xxx to
	PROCESSOR_xxx.
	* config/sh/sh-protos.h (tls_symbolic_operand): Update
	declaration.
	* config/sparc/sparc.c (sparc_override_options): Add cast to enum
	type.
	* config/sparc/sparc.md (empty_delay_slot): Return enum constant.
	(pic, calls_alloca, calls_eh_return, leaf_function): Likewise.
	(delayed_branch, tls_call_delay): Likewise.
	(eligible_for_sibcall_delay): Likewise.
	(eligible_for_return_delay): Likewise. 
	* config/spu/spu.c (expand_builtin_args): Add cast to enum type.
	(spu_expand_builtin_1): Likewise.

	* c-typeck.c (convert_for_assignment): Issue -Wc++-compat warnings
	for all types of conversions.
	(output_init_element): Issue -Wc++-compat warning if needed when
	initializing a bitfield with enum type.
	* c-parser.c (c_parser_expression): Set original_type to
	original_type of right hand operand of comman operator.
cp/:
	* semantics.c (finish_omp_clauses): Change type of c_kind to enum
	omp_clause_code.
fortran/:
	* trans-intrinsic.c (DEFINE_MATH_BUILTIN): Add casts to enum
	type.
	* trans-io.c (st_parameter_field): Add casts to enum type.
java/:
	* builtins.c (java_builtins): Add casts to enum type.
	* verify-impl.c (check_class_constant): Add cast to enum type.
	(check_constant, check_wide_constant): Likewise.
objc/:
	* objc-act.c (objc_gimplify_expr): Add casts to enum type.
testsuite/:
	* gcc.dg/Wcxx-compat-5.c: New testcase.
	* gcc.dg/Wcxx-compat-6.c: New testcase.

From-SVN: r146855
2009-04-27 20:25:48 +00:00
Ian Lance Taylor 32e8bb8ebf combine.c (record_value_for_reg): Change 0 to VOIDmode, twice.
gcc/:
	* combine.c (record_value_for_reg): Change 0 to VOIDmode, twice.
	(record_dead_and_set_regs): Likewise.
	* df.h (struct df_mw_hardreg): Change flags field to int.
	(struct df_base_ref): Likewise.
	(struct df): Change changeable_flags field to int.
	* df-scan.c (df_defs_record): Change clobber_flags to int.
	* dwarf2.h (enum dwarf_tag): Make lo_user and hi_user values enum
	constants rather than #define macros.
	(enum dwarf_attribute, enum dwarf_location_atom): Likewise.
	(enum dwarf_type, enum dwarf_endianity_encoding): Likewise.
	(enum dwarf_calling_convention): Likewise.
	(enum dwarf_line_number_x_ops): Likewise.
	(enum dwarf_call_frame_info): Likewise.
	(enum dwarf_source_language): Likewise.
	* dwarf2out.c (int_loc_descriptor): Add cast to enum type.
	(add_calling_convention_attribute): Likewise.
	* fold-const.c (fold_undefer_overflow_warnings): Add cast to enum
	type.
	(combine_comparisons): Change compcode to int.  Add cast to enum
	type.
	* genrecog.c (maybe_both_true_2): Change c to int.
	(write_switch): Likewise.  Add cast to enum type.
	* gimplify.c (gimplify_omp_for): Handle return values from
	gimplify_expr using MIN rather than bitwise or.
	(gimplify_expr): Add cast to enum type.
	* ipa-prop.c (update_jump_functions_after_inlining): Change
	IPA_BOTTOM to IPA_JF_UNKNOWN.
	* ira.c (setup_class_subset_and_memory_move_costs): Change mode to
	int.  Add casts to enum type.
	(setup_cover_and_important_classes): Change cl to int.  Add casts
	to enum type.
	(setup_class_translate): Change cl and mode to int.
	(ira_init_once): Change mode to int.
	(free_register_move_costs): Likewise.
	(setup_prohibited_mode_move_regs): Add casts to enum type.
	* langhooks.c (add_builtin_function_common): Rework assertion that
	value fits bitfield.
	* mcf.c (add_fixup_edge): Change type parameter to edge_type.
	* omega.c (omega_do_elimination): Avoid math on enum types.
	* optabs.c (expand_vec_shift_expr): Remove casts to int.
	* opts.c (set_debug_level): Change 2 to enum constant.  Use new
	int local to handle integral_argment value.
	* regmove.c (try_auto_increment): Change PUT_MODE to
	PUT_REG_NOTE_KIND.
	* reload.c (push_secondary_reload): Add casts to enum type.
	(secondary_reload_class, find_valid_class): Likewise.
	* reload1.c (emit_input_reload_insns): Likewise.
	* rtl.h (NOTE_VAR_LOCATION_STATUS): Likewise.
	* sel-sched.c (init_hard_regs_data): Change cur_mode to int.
	* sel-sched-ir.c (hash_with_unspec_callback): Change 0 to enum
	constant.
	* tree.c (build_common_builtin_nodes): Add casts to enum type.
	* tree-complex.c (complex_lattice_t): Typedef to int rather than
	enum type.
	(expand_complex_libcall): Add casts to enum type.
	* tree-into-ssa.c (get_ssa_name_ann): Change 0 to enum constant.
	* tree-vect-loop.c (vect_model_reduction_cost): Compare reduc_code
	with ERROR_MARK, not NUM_TREE_CODES.
	(vect_create_epilog_for_reduction): Likewise.
	(vectorizable_reduction): Don't initialize epiloc_reduc_code.
	When not using it, set it to ERROR_MARK rather than
	NUM_TREE_CODES.
	* tree-vect-patterns.c (vect_pattern_recog_1): Change vec_mode to
	enum machine_mode.
	* tree-vect-stmts.c (new_stmt_vec_info): Change 0 to
	vect_unused_in_loop.  Change 0 to loop_vect.
	* tree-vectorizer.c (vect_set_verbosity_level): Add casts to enum
	type.
	* var-tracking.c (get_init_value): Change return type to enum
	var_init_status.
	* vec.h (DEF_VEC_FUNC_P) [iterate]: Cast 0 to type T.
	* config/arm/arm.c (fp_model_for_fpu): Change to array to enum
	arm_fp_model.
	(arm_override_options): Add casts to enum type.
	(arm_emit_tls_decoration): Likewise.
	* config/i386/i386.c (ix86_function_specific_restore): Add casts
	to enum type.
	* config/i386/i386-c.c (ix86_pragma_target_parse): Likewise.
	* config/ia64/ia64.c (ia64_expand_compare): Change magic to int.
	* config/rs6000/rs6000.c (rs6000_override_options): Add casts to
	enum type.
	* config/s390/s390.c (code_for_builtin_64): Change to array of
	enum insn_code.
	(code_for_builtin_31): Likewise.
	(s390_expand_builtin): Change code_for_builtin to enum insn_code
	const *.
	* config/sparc/sparc.c (sparc_override_options): Change value
	field in struct code_model to enum cmodel.  In initializer change
	0 to NULL and add cast to enum type.

	* c-typeck.c (build_modify_expr): Add lhs_origtype parameter.
	Change all callers.  Issue a -Wc++-compat warning using
	lhs_origtype if necessary.
	(convert_for_assignment): Issue -Wc++-compat warnings about
	invalid conversions to enum type on assignment.
	* c-common.h (build_modify_expr): Update declaration.

gcc/cp/:
	* call.c (build_temp): Change 0 to enum constant.
	* cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
	type.
	* cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
	* decl2.c (constrain_visibility): Likewise.
	* parser.c (cp_lexer_get_preprocessor_token): Likewise.
	(cp_parser_flags): Typedef to int rather than enum type.
	(cp_parser_expression_stack_entry): Change prec field to enum
	cp_parser_prec.

	* typeck.c (build_modify_expr): Add lhs_origtype parameter.
	Change all callers.

gcc/fortran/:
	* gfortran.h (enum gfc_symbol_type): New named enum type, broken
	out of struct gfc_symbol.
	(struct gfc_symbol): Use enum gfc_symbol_type.
	(enum gfc_array_ref_dimen_type): New named enum type, broken out
	of struct gfc_array_ref).
	(struct gfc_array_ref): Use enum gfc_array_ref_dimen_type.
	(mod_pointee_as): Update declaration.
	* decl.c (add_global_entry): Change type to enum gfc_symbol_type.
	(gfc_mod_pointee_as): Change return type to "match".
	* module.c (mio_array_ref): Add cast to enum type.
	(mio_symbol): Likewise.
	* resolve.c (resolve_global_procedure): Change type to enum
	gfc_symbol_type.
	* trans-io.c (gfc_build_st_parameter): Change type to unsigned
	int.

gcc/java/:
	* jcf-parse.c (handle_constant): Add cast to enum type.

gcc/objc/:
	* objc-act.c (get_super_receiver): Update calls to
	build_modify_expr to pass new argument.

gcc/testsuite/:
	* gcc.dg/Wcxx-compat-4.c: New testcase.

From-SVN: r146735
2009-04-24 15:31:38 +00:00
Ian Lance Taylor bbbbb16a88 Fix enum conversions which are invalid in C++:
gcc/:
	Fix enum conversions which are invalid in C++:
	* auto-inc-dec.c (attempt_change): Change 0 to SET in function
	call.
	* calls.c (store_one_arg): Change 0 to EXPAND_NORMAL in function
	call.
	* cse.c (hash_rtx_cb): Change 0 to VOIDmode in function call.
	* dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type.
	* dbxout.c (dbxout_symbol): Change 0 to VOIDmode in function
	call.
	(dbxout_parms): Likewise.
	* df-core.c (df_set_flags): Change changeable_flags parameter to
	int.
	(df_clear_flags): Likewise.
	* df-problems.c (df_rd_bb_local_compute_process_def): Change
	top_flag parameter to int.
	(df_chain_create_bb_process_use): Likewise.
	(df_chain_add_problem): Change chain_flags parameter to unsigned
	int.  Remove cast.
	* df-scan.c (df_ref_create): Change ref_flags parameter to int.
	(df_ref_create_structure, df_def_record_1): Likewise.
	(df_defs_record, df_uses_record, df_get_call_refs): Likewise.
	(df_notes_rescan): Change 0 to VOIDmode in function call.
	(df_get_call_refs, df_insn_refs_collect): Likewise.
	(df_bb_regs_collect): Likewise.
	(df_entry_block_defs_collect): Likewise.
	(df_exit_block_uses_collect): Likewise.
	* df.h: Update declarations.
	* double-int.c (double_int_divmod): Add cast to enum type.
	* dse.c (replace_inc_dec): Reverse parameters to gen_int_mode.
	* dwarf2out.c (new_reg_loc_descr): Add casts to enum type.
	(based_loc_descr): Likewise.
	(loc_descriptor_from_tree_1): Change first_op and second_op to
	enum dwarf_location_atom.  Add cast to enum type.
	* expmed.c (init_expmed): Change 0 to SET in function call.
	* expr.c (init_expr_target): Change 0 to VOIDmode in function
	call.
	(expand_expr_real_1): Change 0 to EXPAND_NORMAL in function call.
	(do_store_flag): Likewise.
	* fixed-value.h (struct fixed_value): Change mode to enum
	machine_mode.
	* function.c (assign_parms): Change 0 to VOIDmode in function
	call.
	* genautomata.c (insert_automaton_decl): Change 1 to INSERT in
	function call.
	(insert_insn_decl, insert_decl, insert_state): Likewise.
	(automata_list_finish): Likewise.
	* genrecog.c (process_define_predicate): Add cast to enum type.
	* gensupport.c (init_predicate_table): Add cast to enum type.
	* gimple.c (gimple_build_return): Change 0 to ERROR_MARK in
	function call.
	(gimple_build_call_1, gimple_build_label): Likewise.
	(gimple_build_goto, gimple_build_asm_1): Likewise.
	(gimple_build_switch_1, gimple_build_cdt): Likewise.
	* gimple.h (GIMPLE_CHECK): Change 0 to ERROR_MARK in function
	call.
	(enum fallback): Rename from enum fallback_t.
	(fallback_t): Typedef as int.
	* gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to
	GSI_SAME_STMT in function call.
	* ira.c (setup_class_subset_and_memory_move_costs): Add casts to
	enum type.
	(setup_reg_class_relations): Likewise.
	(setup_reg_class_nregs): Change cl to int.  Add casts to enum
	type.
	(setup_prohibited_class_mode_regs): Add cast to enum type.
	(setup_prohibited_mode_move_regs): Likewise.
	* ira-costs.c (record_reg_classes): Change rclass to enum
	reg_class.
	(record_address_regs): Change i to enum reg_class.
	* lists.c (alloc_EXPR_LIST): Add cast to enum type.
	* machmode.h (GET_MODE_CLASS): Cast value to enum mode_class.
	(GET_MODE_WIDER_MODE): Cast value to enum machine_mode.
	(GET_MODE_2XWIDER_MODE): Likewise.
	(GET_CLASS_NARROWEST_MODE): Likewise.
	* omp-low.c (expand_omp_for): Add cast to enum type.
	* optabs.c (debug_optab_libfuncs): Add casts to enum type.
	* opts.c (enable_warning_as_error): Change kind to diagostic_t.
	* postreload.c (reload_cse_simplify_operands): Change rclass local
	to enum reg_class.
	* predict.c (combine_predictions_for_insn): Change best_predictor
	and predictor to enum br_predictor.
	(combine_predictions_for_bb): Likewise.
	(build_predict_expr): Change assignment to PREDICT_EXPR_OUTCOME to
	use SET_PREDICT_EXPR_OUTCOME.
	* real.c (real_arithmetic): Change icode to code in function
	call.
	* reginfo.c (init_move_cost): Add casts to enum type.
	(init_reg_sets_1, init_fake_stack_mems): Likewise.
	* regmove.c (regclass_compatible_p): Change class0 and class1 to
	enum reg_class.
	* reload.c (find_valid_class): Add casts to enum type.
	(push_reload): Change 0 to NO_REGS in function call.
	(find_reloads): Change this_alternative to array of enum
	reg_class.  Remove some now-unnecessary casts.
	(make_memloc): Change 0 to VOIDmode in function call.
	* reload1.c (reload): Change 0 to VOIDmode in function call.
	(eliminate_regs_1, elimination_effects): Likewise.
	(eliminate_regs_in_insn): Likewise.
	(emit_input_reload_insns): Add cast to enum type.
	(delete_output_reload): Change 0 to VOIDmode in function call.
	* reorg.c (insn_sets_resource_p): Convert include_delayed_effects
	to enum type in function call.
	* tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type.
	(SET_PREDICT_EXPR_OUTCOME): Define.
	* tree-dump.c (get_dump_file_info): Change phase parameter to
	int.
	(get_dump_file_name, dump_begin, dump_enabled_p): Likewise.
	(dump_initialized_p, dump_flag_name, dump_end): Likewise.
	(dump_function): Likewise.
	* tree-dump.h: Update declarations.
	* tree-pass.h: Update declarations.
	* varasm.c (assemble_integer): Change mclass to enum mode_class.
	* config/arm/arm.c (thumb_legitimize_reload_address): Add cast to
	enum type.
	(arm_rtx_costs_1): Correct parenthesization.
	(arm_rtx_costs): Add casts to enum type.
	(adjacent_mem_locations): Reverse arguments to const_ok_for_op.
	(vfp_emit_fstmd): Use add_rg_note.
	(emit_multi_reg_push, emit_sfm): Likewise.
	(thumb_set_frame_pointer): Likewise.
	(arm_expand_prologue): Likewise.
	(arm_regno_class): Change return type to enum reg_class.
	(thumb1_expand_prologue): Use add_reg_note.
	* config/arm/arm-protos.h (arm_regno_class): Update declaration.
	* config/arm/arm.h (INITIALIZE_TRAMPOLINE): Change 0 to LCT_NORMAL
	in function call.
	* config/arm/gentune.sh: Add cast to enum type.
	* config/arm/arm-tune.md: Rebuild.
	* config/i386/i386.c (ix86_expand_prologue): Use add_reg_note.
	(ix86_split_fp_branch, predict_jump): Likewise.
	(ix86_expand_multi_arg_builtin): Change sub_code from enum
	insn_code to enum rtx_code.
	(ix86_builtin_vectorized_function): Add cast to enum type.
	* config/i386/i386.md (truncdfsf2): Change slot to enum
	ix86_stack_slot.
	(truncxf<mode>2, isinf<mode>2): Likewise.
	* config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to
	enum type.
	* config/ia64/ia64.c (ia64_split_tmode_move): Use add_reg_note.
	(spill_restore_mem, do_spill, ia64_expand_prologue): Likewise.
	(insert_bundle_state): Change 1 to INSERT in function call.
	(ia64_add_bundle_selector_before): Likewise.
	* config/ia64/ia64.md (cpu attr): Add cast to enum type.
	(save_stack_nonlocal): Change 0 to LCT_NORMAL in function call.
	(restore_stack_nonlocal): Likewise.
	* config/mips/mips.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in
	function call.
	* config/mips/mips.c (mips_binary_cost): Change 0 to SET in
	function call.
	(mips_rtx_costs): Likewise.
	(mips_override_options): Add casts to enum type.
	* config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL
	in function call.
	* config/pa/pa.c (legitimize_pic_address): Use add_reg_note.
	(store_reg, set_reg_plus_d): Likewise.
	(hppa_expand_prologue, hppa_profile_hook): Likewise.
	* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add
	cast to enum type.
	(altivec_expand_vec_set_builtin): Change 0 to EXPAND_NORMAL in
	function call.
	(emit_unlikely_jump): Use add_reg_note.
	(rs6000_emit_allocate_stack): Likewise.
	(rs6000_frame_related, rs6000_emit_prologue): Likewise.
	(output_toc): Change 1 to INSERT in function call.
	(output_profile_hook): Change 0 to LCT_NORMAL in function call.
	(rs6000_initialize_trampoline): Likewise.
	(rs6000_init_dwarf_reg_sizes_extra): Change 0 to EXPAND_NORMAL in
	function call.
	* config/s390/s390.c (s390_rtx_costs): Add cast to enum type.
	(s390_expand_movmem): Change 0 to OPTAB_DIRECT in function call.
	(s390_expand_setmem, s390_expand_cmpmem): Likewise.
	(save_gprs): Use add_reg_note.
	(s390_emit_prologue): Likewise.
	(s390_expand_builtin): Change 0 to EXPAND_NORMAL in function
	call.
	* config/sparc/sparc.c (sparc_expand_prologue): Use add_reg_note.
	(sparc_fold_builtin): Add cast to enum type.
	* config/spu/spu.c (spu_emit_branch_or_set): Change ior_code to
	enum insn_code.
	(spu_expand_prologue): Use add_reg_note.
	(expand_builtin_args): Change 0 to EXPAND_NORMAL in function
	call.

	* c-parser.c (c_parser_attributes): Change VEC back to tree list.
	(c_parser_postfix_expression_after_primary): Get VEC for list of
	arguments.  Get original types of arguments.  Call
	build_function_call_vec.
	(cached_expr_list_1, cached_expr_list_2): New static variables.
	(c_parser_expr_list): Change return type to VEC *.  Add
	p_orig_types parameter.  Change all callers.
	(c_parser_release_expr): New static function.
	(c_parser_vec_to_tree_list): New static function.
	* c-typeck.c (build_function_call): Rewrite to build a VEC and
	call build_function_call_vec.
	(build_function_call_vec): New function, based on old
	build_function_call.
	(convert_arguments): Remove nargs and argarray parameters.  Change
	values to a VEC.  Add origtypes parameter.
	(build_modify_expr): Add rhs_origtype parameter.  Change all
	callers.
	(convert_for_assignment): Add origtype parameter.  Change all
	callers.  If warn_cxx_compat, check for conversion to an enum
	type when calling a function.
	(store_init_value): Add origtype parameter.  Change all callers.
	(digest_init): Likewise.
	(struct init_node): Add origtype field.
	(add_pending_init): Add origtype parameter.  Change all callers.
	(output_init_element): Likewise.
	(output_pending_init_elements): Pass origtype from init_node to
	output_init_element.
	(process_init_elemnt): Pass origtype from c_expr to
	output_init_element.
	(c_finish_return): Add origtype parameter.  Change all callers.
	* c-common.c (sync_resolve_size): Change params to VEC *.  Change
	caller.
	(sync_resolve_params): Likewise.
	(sync_resolve_return): Change params to first_param.  Change
	caller.
	(resolve_overloaded_builtins): Change params to VEC *.  Change
	callers.   Save first parameter around call to
	build_function_call_vec.
	* c-decl.c (finish_decl): Add origtype parameter.  Change all
	callers.  Call build_function_call_vec rather than
	build_function_call for cleanup.
	* c-tree.h: Update declarations.
	* c-common.h: Update declarations.
	* stub-objc.c (objc_rewrite_function_call): Change parameter from
	params to first_param.
	* target.h (struct gcc_target): Change resolve_overloaded_builtin
	params parameter from tree to void *.
	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
	Change arglist parameter to have type void *, and to be a pointer
	to a VEC.
	* config/rs6000/rs6000-protos.h
	(altivec_resolve_overloaded_builtin): Update declaration.
	* config/spu/spu-c.c (spu_resolved_overloaded_builtin): Change
	fnargs parameter to have type void *, and to be a pointer to a
	VEC.  Call build_function_call_vec instead of
	build_function_call.
	* config/spu/spu-protos.h (spu_expand_builtin): Update
	declaration.

gcc/cp/:
	* typeck.c (build_function_call_vec): New function.
	(cp_build_function_call): Only pass first parameter to
	objc_rewrite_function_call.
	(build_modify_expr): Add rhs_origtype parameter.  Change all
	callers.
	* decl.c (finish_decl): Add origtype parameter.  Change all
	callers.
	* semantics.c (finish_call_expr): Pass VEC to
	resolve_overloaded_builtin.

gcc/objc:
	* objc-act.c (objc_rewrite_function_call): Change parameter from
	params to first_param.  Change all callers.

gcc/testsuite:
	* gcc.dg/Wcxx-compat-3.c: New testcase.

From-SVN: r146451
2009-04-20 19:35:00 +00:00
Ian Lance Taylor 7072a650e3 df.h: Include "timevar.h".
* df.h: Include "timevar.h".
	(struct df_problem): Change tv_id field to timevar_id_t.
	* tree-pass.h: Include "timevar.h".
	(struct opt_pass): Change tv_id field to timevar_id_t.
	* timevar.h (timevar_id_t): Define TV_NONE.
	* passes.c (execute_one_ipa_transform_pass): Check for tv_id !=
	TV_NONE rather than tv_id != 0.
	(execute_one_pass): Likewise.
	* Makefile.in (DF_H): Add $(TIMEVAR_H).
	(TREE_PASS_H): Define.  Change all instances of tree-pass.h in
	dependencies to $(TREE_PASS_H).
	* bt-load.c (pass_branch_target_load_optimize1): Set tv_id field
	to TV_NONE.
	(pass_branch_target_load_optimize2): Likewise.
	* cfglayout.c (pass_into_cfg_layout_mode): Likewise.
	(pass_outof_cfg_layout_mode): Likewise.
	* cgraphbuild.c (pass_remove_cgraph_callee_edges): Likewise.
	(pass_rebuild_cgraph_edges): Likewise.
	(pass_remove_cgraph_callee_edges): Likewise.
	* df-core.c (pass_df_initialize_opt): Likewise.
	(pass_df_initialize_no_opt): Likewise.
	(pass_df_finish): Likewise.
	* emit-rtl.c (pass_unshare_all_rtl): Likewise.
	* except.c (pass_set_nothrow_function_flags): Likewise.
	(pass_convert_to_eh_region_ranges): Likewise.
	* final.c (pass_compute_alignments): Likewise.
	* function.c (pass_instantiate_virtual_regs): Likewise.
	(pass_init_function): Likewise.
	(pass_leaf_regs): Likewise.
	(pass_match_asm_constraints): Likewise.
	* gimple-low.c (pass_lower_cf): Likewise.
	(pass_mark_used_blocks): Likewise.
	* init-regs.c (pass_initialize_regs): Likewise.
	* integrate.c (pass_initial_value_sets): Likewise.
	* ira.c (pass_ira): Likewise.
	* jump.c (pass_cleanup_barriers): Likewise.
	* omp-low.c (pass_expand_omp): Likewise.
	(pass_lower_omp): Likewise.
	* matrix-reorg.c (pass_ipa_matrix_reorg): Likewise.
	* recog.c (pass_split_all_insns): Likewise.
	(pass_split_after_reload): Likewise.
	(pass_split_before_regstack): Likewise.
	(pass_split_before_sched2): Likewise.
	(pass_split_for_shorten_branches): Likewise.
	* reginfo.c (pass_reginfo_init): Likewise.
	(pass_subregs_of_mode_init): Likewise.
	(pass_subregs_of_mode_finish): Likewise.
	* passes.c (pass_postreload): Likewise.
	* stack-ptr-mod.c (pass_stack_ptr_mod): Likewise.
	* tree-cfg.c (pass_remove_useless_stmts): Likewise.
	(pass_warn_function_return): Likewise.
	(pass_warn_function_noreturn): Likewise.
	* tree-complex.c (pass_lower_complex): Likewise.
	(pass_lower_complex_O0): Likewise.
	* tree-if-conv.c (pass_if_conversion): Likewise.
	* tree-into-ssa.c (pass_build_ssa): Likewise.
	* tree-mudflap.c (pass_mudflap_1): Likewise.
	(pass_mudflap_2): Likewise.
	* tree-nomudflap.c (pass_mudflap_1): Likewise.
	(pass_mudflap_2): Likewise.
	* tree-nrv.c (pass_return_slot): Likewise.
	* tree-object-size.c (pass_object_sizes): Likewise.
	* tree-optimize.c (pass_all_optimizations): Likewise.
	(pass_early_local_passes): Likewise.
	(pass_all_early_optimizations): Likewise.
	(pass_cleanup_cfg): Likewise.
	(pass_cleanup_cfg_post_optimizing): Likewise.
	(pass_free_datastructures): Likewise.
	(pass_free_cfg_annotations): Likewise.
	(pass_fixup_cfg): Likewise.
	(pass_init_datastructures): Likewise.
	* tree-ssa.c (pass_early_warn_uninitialized): Likewise.
	(pass_late_warn_uninitialized): Likewise.
	(pass_update_address_taken): Likewise.
	* tree-ssa-ccp.c (pass_fold_builtins): Likewise.
	* tree-ssa-math-opts.c (pass_cse_reciprocals): Likewise.
	(pass_cse_sincos): Likewise.
	(pass_convert_to_rsqrt): Likewise.
	* tree-ssa-structalias.c (pass_build_alias): Likewise.
	* tree-stdarg.c (pass_stdarg): Likewise.
	* tree-tailcall.c (pass_tail_recursion): Likewise.
	(pass_tail_calls): Likewise.
	* tree-vect-generic.c (pass_lower_vector): Likewise.
	(pass_lower_vector_ssa): Likewise.
	* tree-vectorizer.c (pass_ipa_increase_alignment): Likewise.

From-SVN: r146222
2009-04-17 05:40:46 +00:00
Jakub Jelinek 8f5929e11f dse.c (struct group_info): Reorder fields for 64-bit hosts.
* dse.c (struct group_info): Reorder fields for 64-bit hosts.
	* matrix-reorg.c (struct matrix_info): Likewise.
	* tree-ssa-loop-ivopts.c (struct ivopts_data): Likewise.
	* rtl.h (struct mem_attrs): Likewise.
	* df.h (struct df): Likewise.
	* tree-data-ref.h (struct data_dependence_relation): Likewise.
	* ira-int.h (struct ira_allocno): Likewise.
	* df-scan.c (struct df_collection_rec): Likewise.
	* ira.c (struct equivalence): Likewise.
	* function.c (struct temp_slot): Likewise.
	* cfgloop.h (struct loop): Likewise.

	* parser.c (struct cp_token): Reorder fields for 64-bit hosts.
	(eof_token): Adjust.

	* include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.

From-SVN: r144938
2009-03-18 18:04:26 +01:00