Commit Graph

236 Commits

Author SHA1 Message Date
Steven Bosscher df92c6403c ipa-pure-const.c (state_from_flags, [...]): Use current_function_name instead of lang_hooks.decl_printable_name.
* ipa-pure-const.c (state_from_flags, local_pure_const): Use
	current_function_name instead of lang_hooks.decl_printable_name.

	* function.h (fndecl_name): New prototype.
	* function.c (fndecl_name): New function.
	* vecir.h (cgraph_node_p): New standard IR VEC type.
	* trans-mem.c (cgraph_node_p): No need anymore to define it here.
	* ipa-utils.h (ipa_get_nodes_in_cycle): New prototype.
	* ipa-utils.c (ipa_get_nodes_in_cycle): New function.
	* ipa-reference.c: Don't include langhooks.h, and certainly not twice.
	Fix many formatting issues (long lines, short lines, spacing, etc.).
	(get_static_name): Use fndecl_name.
	(dump_static_vars_set_to_file): New function split out from propagate.
	(union_static_var_sets): New function, union two sets and collapse
	to all_module_statics as quickly as possible.
	(intersect_static_var_sets): New function, similar to above.
	(copy_static_var_set): Renamed from copy_global_bitmap and rewritten
	to allocate a copy on the same bitmap_obstack as the source set.
	(propagate_bits): Simplify, and clarify by using union_static_var_sets.
	(generate_summary): Remove bm_temp.  Print UID of promotable globals.
	(read_write_all_from_decl): Use pass-by-reference, bless C++.
	(get_read_write_all_from_node): New function, split out from propagate.
	(propagate): Simplify and clarify with helper functions.  Use
	ipa_get_nodes_in_cycle to walk all nodes in a reduced node.
	(ipa_reference_read_optimization_summary): Use fndecl_name instead of
	lang_hooks.decl_printable_name.

	* rtl.h (print_rtl_single_with_indent): New prototype.
	* print-rtl.c (print_rtl_single_with_indent): New function.
	* cfghooks.h (empty_block_p, split_block_before_cond_jump): New hooks.
	* cfghooks.c (empty_block_p, split_block_before_cond_jump): Implement.
	* cfgrtl.c (rtl_block_empty_p, rtl_split_block_before_cond_jump):
	Implement RTL specific hooks.
	(rtl_cfg_hooks, cfg_layout_rtl_cfg_hooks): Register the new hooks.
	* tree-cfg.c (gimple_empty_block_p,
	gimple_split_block_before_cond_jump): Implement GIMPLE specific hooks.
	(gimple_cfg_hooks): Register the new hooks.
	* tree-ssa-phiopt.c (empty_block_p): Remove in favor of new hook.

From-SVN: r191255
2012-09-13 13:41:46 +00:00
Kenneth Zadeck 481755378d cfgexpand.c (expand_debug_locations): Encapsulate test for CONST_DOUBLE in macro.
2012-08-02  Kenneth Zadeck <zadeck@naturalbridge.com>

	* cfgexpand.c (expand_debug_locations):  Encapsulate test for
	CONST_DOUBLE in macro.
	* combine.c (try_combine, gen_lowpart_for_combine): Ditto.
	* cprop.c (implicit_set_cond_p): Ditto.
	* cselib.c (rtx_equal_for_cselib_1): Ditto.
	* expmed.c (expand_mult): Ditto.
	* expr.c (convert_modes): Ditto.
	* ira-costs.c (record_reg_classes): Ditto.
	* ira-lives.c (single_reg_class): Ditto.
	* optabs.c (expand_copysign_absneg, expand_copysign): Ditto.
	* print-rtl.c (print_rtx): Ditto.
	* recog.c (simplify_while_replacing, const_double_operand)
	(asm_operand_ok, constrain_operands): Ditto.
	* reg-stack.c (subst_stack_regs_pat): Ditto.
	* reload.c (find_reloads, find_equiv_reg): Ditto.
	* rtlanal.c (replace_rtx): Remove test.
	* rtlanal.c (constant_pool_constant_p, split_double): Encapsulate test for
	CONST_DOUBLE in macro.
	* simplify-rtx.c (mode_signbit_p, avoid_constant_pool_reference)
	(simplify_unary_operation_1, simplify_const_unary_operation)
	(simplify_binary_operation_1, simplify_const_binary_operation)
	(simplify_relational_operation_1)
	(simplify_const_relational_operations)
	(implify_subreg): Ditto.
	* varasm.c (output_constant_pool_2): Ditto.
	* rtl.h (CONST_DOUBLE_AS_INT_P, CONST_DOUBLE_AS_FLOAT_P): New
	macros.
	* rtl.def (CONST_DOUBLE):  Updated comments.

From-SVN: r190105
2012-08-02 22:39:57 +00:00
Steven Bosscher 7ee2468b92 system.h (dump_file): Do not define.
gcc/
	* system.h (dump_file): Do not define.
	* tree-pass.h: Include dumpfile.h, which is a new file containing...
	(enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p,
	dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p,
	dump_flag_name, dump_file, dump_flags, dump_file_name,
	get_dump_file_info, struct dump_file_info): all of this, moved to...
	* dumpfile.h: Here, new file.
	* tree-dump.h: Include dumpfile.h, but not tree-pass.h.
	(dump_stmt): Remove prototype for C++ specific function.
	(dump_enumerated_decls): Move prototype from here...
	* tree-flow.h (dump_enumerated_decls): ... to here.
	(get_ref_base_and_extent) Move prototype from here ...
	* tree.h (get_ref_base_and_extent) ... to here.
	* tree-ssa-live.c: Do not inclde tree-pretty-print.h, because
	gimple-pretty-print.h is enough.  Do not include tree-dump.h,
	include timevar.h and dumpfile.h instead.
	(struct numbered_tree_d, compare_decls_by_uid,
	dump_enumerated_decls_push, dump_enumerated_decls): Move from here ...
	* tree-dfa.c:(struct numbered_tree_d, compare_decls_by_uid,
	dump_enumerated_decls_push, dump_enumerated_decls):... to here.
	Do not include timevar.h.
	* tree.c: Do not include timevar.h.
	* tree-cfg.c: Do not include langhooks.h, tree-pretty-print.h, and
	timevar.h.
	(dump_cfg_stats): Use current_function_name.
	(gimple_cfg2vcg): Likewise.
	(dump_function_to_file): Likewise.
	* df-scan.c: Do not include tree-pass.h and timevar.h.
	Include dumpfile.h.
	(df_entry_block_bitmap_verify, df_exit_block_bitmap_verify): Do not
	use print_current_pass.
	* df-problems.c: Include dumpfile.h.
	Always define REG_DEAD_DEBUGGING, avoid #ifdef code, because it
	leads to errors in the code not selected.
	(df_note_compute): Do not print_rtl_with_bb here.  Fix compilation
	bug if REG_DEAD_DEBUGGING is not 0, get_insns is not available here.
	* lcm.c: Include dumpfile.h.
	Remove obsolete include of insn-attr.h.
	* dojump.c (do_compare_rtx_and_jump): Remove failure printing for
	missing probability notes.
	* stmt.c: Include dumpfile.h.
	(emit_case_decision_tree): Re-enable printing expand details only
	if TDF_DETAILS.
	* alias.c, auto-inc-dec.c, bb-reorder.c, caller-save.c, cfg.c, 
	cfgcleanup.c, cfgexpand.c, cfgloop.c, cfgloopmanip.c, cgraph.c, 
	cgraphclones.c, cgraphunit.c, combine.c, combine-stack-adj.c, 
	coverage.c, cprop.c, cse.c, cselib.c, dbgcnt.c, dce.c, df-core.c, 
	dse.c, dwarf2out.c, emit-rtl.c, except.c, expr.c, final.c, 
	function.c, fwprop.c, gcse.c, gimple-fold.c, 
	gimple-pretty-print.c, gimple-ssa-strength-reduction.c, 
	gimplify.c, graphite-blocking.c, graphite-clast-to-gimple.c, 
	graphite-dependences.c, graphite-interchange.c, 
	graphite-optimize-isl.c, graphite-poly.c, 
	graphite-sese-to-poly.c, haifa-sched.c, hw-doloop.c, ifcvt.c, 
	ipa.c, ipa-cp.c, ipa-inline-analysis.c, ipa-inline.c, 
	ipa-inline-transform.c, ipa-prop.c, ipa-pure-const.c, 
	ipa-reference.c, ipa-split.c, ipa-utils.c, ira.c, ira-emit.c, 
	jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c, 
	loop-unroll.c, loop-unswitch.c, lower-subreg.c, 
	lto-section-out.c, lto-streamer-in.c, matrix-reorg.c, mcf.c, 
	mode-switching.c, modulo-sched.c, omega.c, omp-low.c, passes.c, 
	plugin.c, postreload.c, postreload-gcse.c, predict.c, print-rtl.c, 
	print-tree.c, profile.c, recog.c, ree.c, regcprop.c, reginfo.c, 
	regmove.c, regrename.c, reg-stack.c, reload1.c, reorg.c, 
	sched-rgn.c, sched-vis.c, sel-sched.c, sel-sched-ir.c, 
	store-motion.c, tracer.c, trans-mem.c, tree-affine.c, 
	tree-call-cdce.c, tree-cfgcleanup.c, tree-chrec.c, 
	tree-data-ref.c, tree-diagnostic.c, tree-dump.c,
	tree-eh.c, tree-flow-inline.h, tree-if-conv.c, tree-into-ssa.c, 
	tree-mudflap.c, tree-nrv.c, tree-object-size.c, 
	tree-optimize.c, tree-outof-ssa.c, tree-predcom.c, 
	tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c, 
	tree-sra.c, tree-ssa-address.c, tree-ssa-alias.c, tree-ssa.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-loop.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, 
	tree-ssa-loop-ivcanon.c, tree-ssa-loop-ivopts.c, 
	tree-ssa-loop-manip.c, tree-ssa-loop-niter.c, 
	tree-ssa-loop-prefetch.c, tree-ssa-loop-unswitch.c, 
	tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c, 
	tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-propagate.c, 
	tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-sink.c, 
	tree-ssa-structalias.c, tree-ssa-tail-merge.c, tree-ssa-ter.c, 
	tree-ssa-threadedge.c, tree-ssa-threadupdate.c, 
	tree-ssa-uncprop.c, tree-ssa-uninit.c, 
	tree-switch-conversion.c, tree-tailcall.c, 
	tree-vect-data-refs.c, tree-vect-loop.c, 
	tree-vect-loop-manip.c, tree-vectorizer.c, 
	tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, 
	tree-vrp.c, value-prof.c, var-tracking.c, web.c: Include tree-pass.h
	only if needed.  If tree-pass.h is included, do not include timevar.h
	and dumpfile.h.  If tree-pass.h is not included but dump_file, or
	dump_flags, or the TDF_* flags are used, include dumpfile.h.
	If gimple-pretty-print.h is included, don't include tree-pretty-print.h.
	Remove assorted unnecessary includes.

	* config/mn10300/mn10300.c, config/c6x/c6x.c, config/ia64/ia64.c,
	config/arm/arm.c, config/bfin/bfin.c, config/frv/frv.c,
	config/spu/spu.c, config/mep/mep.c, config/i386/i386.c:
	Include dumpfile.h.
	* config/rl78/rl78.c: Include dumpfile.h instead of tree-pass.h.
	* arm/t-arm, avr/t-avr, i386/t-i386, ia64/t-ia64, mep/t-mep,
	spu/t-spu-elf: Fix dependencies.

c-family/
	* c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
	* c-ada-spec.c: Likewise.
	* c-dump.c (dump_stmt): Move to cp/dump.c, the only user.

c/
	* c-decl.c: Include dumpfile.h instead of tree-dump.h.
	* Make-lang.in: Fix dependencies.

cp/
	* dump.c (dump_stmt): Moved here from c-dump.c.
	* optimize.c: Include dumpfile.h instead of tree-dump.h.
	* class.c: Likewise.
	* decl2.c: Likewise.
	* Make-lang.in: Fix dependencies.

fortran/
	* f95-lang.c: Include dumpfile.h instead of tree-dump.h.
	* Make-lang.in: Fix dependencies.

java/
	* java-gimplify.c Include dumpfile.h instead of tree-dump.h
	* Make-lang.in: Fix dependencies.

lto/
	* lto.c: Do not include timevar.h.
	* Make-lang.in: Fix dependencies.

ada/
	* gcc-interface/utils.c: Include timevar.h.
	* Make-lang.in: Fix dependencies.

From-SVN: r189519
2012-07-16 11:32:42 +00:00
Jakub Jelinek 5619e52cfb re PR tree-optimization/50693 (Loop optimization restricted by GOTOs)
PR tree-optimization/50693
	* tree-cfg.c (gimple_can_merge_blocks_p): Allow merging with
	non-forced user labels.
	(gimple_merge_blocks): Turn non-forced user labels into
	debug bind stmt with the label as first operand and reset value.
	(gimple_duplicate_bb): Don't duplicate label debug stmts.
	* dwarf2out.c (gen_label_die): Handle NOTE_INSN_DELETED_DEBUG_LABEL.
	* final.c (final_scan_insn): Likewise.
	(rest_of_clean_state): Don't dump NOTE_INSN_DELETED_DEBUG_LABEL.
	* var-tracking.c (debug_label_num): New variable.
	(delete_debug_insns): Don't delete DEBUG_INSNs for LABEL_DECLs,
	instead turn them into NOTE_INSN_DELETED_DEBUG_LABEL notes.
	* cfglayout.c (skip_insns_after_block, duplicate_insn_chain): Handle
	NOTE_INSN_DELETED_DEBUG_LABEL.
	(duplicate_insn_chain): Don't duplicate LABEL_DECL DEBUG_INSNs.
	* insn-notes.def (DELETED_DEBUG_LABEL): New note kind.
	* print-rtl.c (print_rtx): Handle NOTE_INSN_DELETED_DEBUG_LABEL.
	* gengtype.c (adjust_field_rtx_def): Likewise.
	* config/i386/i386.c (ix86_output_function_epilogue): For MachO
	clear CODE_LABEL_NUMBER of NOTE_INSN_DELETED_DEBUG_LABEL
	if their are at the end of function and nop hasn't been emitted.
	* config/rs6000/rs6000.c (rs6000_output_function_epilogue): Likewise.

From-SVN: r181014
2011-11-05 20:58:37 +01:00
Alan Modra c62c54419c reload1.c (gen_reload): Don't use REGNO on SUBREGs.
* reload1.c (gen_reload): Don't use REGNO on SUBREGs.
	* print-rtl.c (print_rtx): Don't segfault on negative regno.

From-SVN: r180983
2011-11-05 07:35:46 +10:30
Bernd Schmidt 268987713c rtl.texi (simple_return): Document.
* doc/rtl.texi (simple_return): Document.
	(parallel, PATTERN): Here too.
	* doc/md.texi (return): Mention it's allowed to expand to simple_return
	in some cases.
	(simple_return): Document standard pattern.
	* gengenrtl.c (special_rtx): SIMPLE_RETURN is special.
	* final.c (final_scan_insn): Use ANY_RETURN_P on body.
	* reorg.c (function_return_label, function_simple_return_label):
	New static variables, replacing...
	(end_of_function_label): ... this.
	(simplejump_or_return_p): New static function.
	(optimize_skip, steal_delay_list_from_fallthrough,
	fill_slots_from_thread): Use it.
	(relax_delay_slots): Likewise.  Use ANY_RETURN_P on body.
	(rare_destination, follow_jumps): Use ANY_RETURN_P on body.
	(find_end_label): Take a new arg which is one of the two return
	rtxs.  Depending on which, set either function_return_label or
	function_simple_return_label.  All callers changed.
	(make_return_insns): Make both kinds.
	(dbr_schedule): Adjust for two kinds of end labels.
	* function.c (emit_return_into_block): Set JUMP_LABEL properly.
	* genemit.c (gen_exp): Handle SIMPLE_RETURN.
	(gen_expand, gen_split): Use ANY_RETURN_P.
	* df-scan.c (df_uses_record): Handle SIMPLE_RETURN.
	* rtl.def (SIMPLE_RETURN): New code.
	* ifcvt.c (find_if_case_1): Be more careful about
	redirecting jumps to the EXIT_BLOCK.
	* jump.c (condjump_p, condjump_in_parallel_p, any_condjump_p,
	returnjump_p_1): Handle SIMPLE_RETURNs.
	* print-rtl.c (print_rtx): Likewise.
	* rtl.c (copy_rtx): Likewise.
	* bt-load.c (compute_defs_uses_and_gen): Use ANY_RETURN_P.
	* combine.c (simplify_set): Likewise.
	* resource.c (find_dead_or_set_registers, mark_set_resources):
	Likewise.
	* emit-rtl.c (verify_rtx_sharing, classify_insn, copy_insn_1,
	copy_rtx_if_shared_1, mark_used_flags): Handle SIMPLE_RETURNs.
	(init_emit_regs): Initialize simple_return_rtx.
	* cfglayout.c (fixup_reorder_chain): Pass a JUMP_LABEL to
	force_nonfallthru_and_redirect.
	* rtl.h (ANY_RETURN_P): Allow SIMPLE_RETURN.
	(GR_SIMPLE_RETURN): New enum value.
	(simple_return_rtx): New macro.
	* basic-block.h (force_nonfallthru_and_redirect): Adjust
	declaration.
	* cfgrtl.c (force_nonfallthru_and_redirect): Take a new jump_label
	argument.  All callers changed.  Be careful about what kinds of
	returnjumps to generate.
	* config/i386/3i86.c (ix86_pad_returns, ix86_count_insn_bb,
	ix86_pad_short_function): Likewise.
	* config/arm/arm.c (arm_final_prescan_insn): Handle both kinds
	of return.
	* config/mips/mips.md (any_return): New code_iterator.
	(optab): Add cases for return and simple_return.
	(return): Expand to a simple_return.
	(simple_return): New pattern.
	(*<optab>, *<optab>_internal for any_return): New patterns.
	(return_internal): Remove.
	* config/mips/mips.c (mips_expand_epilogue): Make the last insn
	a simple_return_internal.

From-SVN: r178135
2011-08-27 17:38:58 +00:00
Bernd Schmidt dc0ff1c802 rtlanal.c (tablejump_p): False for returns.
* rtlanal.c (tablejump_p): False for returns.
	* reorg.c (first_active_target_insn): New static function.
	(find_end_label): Set JUMP_LABEL for a new returnjump.
	(optimize_skip, get_jump_flags, rare_destination,
	mostly_true_jump, get_branch_condition,
	steal_delay_list_from_target, own_thread_p,
	fill_simple_delay_slots, follow_jumps, fill_slots_from_thread,
	fill_eager_delay_slots, relax_delay_slots, make_return_insns,
	dbr_schedule): Adjust to handle ret_rtx in JUMP_LABELs.
	* jump.c (delete_related_insns): Likewise.
	(jump_to_label_p): New function.
	(redirect_target): New static function.
	(redirect_exp_1): Use it.  Adjust to handle ret_rtx in JUMP_LABELS.
	(redirect_jump_1): Assert that the new label is nonnull.
	(redirect_jump): Likewise.
	(redirect_jump_2): Check for ANY_RETURN_P rather than NULL labels.
	* ifcvt.c (find_if_case_1): Take care when redirecting jumps to the
	exit block.
	(dead_or_predicable): Change NEW_DEST arg to DEST_EDGE.  All callers
	changed.  Ensure that the right label is passed to redirect_jump.
	* function.c (emit_return_into_block,
	thread_prologue_and_epilogue_insns): Ensure new returnjumps have
	ret_rtx in their JUMP_LABEL.
	* print-rtl.c (print_rtx): Handle ret_rtx in a JUMP_LABEL.
	* emit-rtl.c (skip_consecutive_labels): Allow the caller to
	pass ret_rtx as label.
	* cfglayout.c (fixup_reorder_chain): Use
	force_nonfallthru_and_redirect rather than force_nonfallthru.
	(duplicate_insn_chain): Copy JUMP_LABELs for returns.
	* rtl.h (ANY_RETURN_P): New macro.
	(jump_to_label_p): Declare.
	* resource.c (find_dead_or_set_registers): Handle ret_rtx in
	JUMP_LABELs.
	(mark_target_live_regs): Likewise.
	* basic-block.h (force_nonfallthru_and_redirect): Declare.
	* cfgrtl.c (force_nonfallthru_and_redirect): No longer static.
	* config/alpha/alpha.c (alpha_tablejump_addr_vec,
	alpha_tablejump_best_label): Remove functions.
	* config/alpha/alpha-protos.c (alpha_tablejump_addr_vec,
	alpha_tablejump_best_label): Remove declarations.
	* config/sh/sh.c (barrier_align, split_branches): Adjust for
	ret_rtx in JUMP_LABELs.
	* config/arm/arm.c (is_jump_table): Likewise.

From-SVN: r176881
2011-07-28 18:45:20 +00:00
Richard Sandiford 527210c448 rtl.texi (MEM_OFFSET_KNOWN_P): Document.
gcc/
	* doc/rtl.texi (MEM_OFFSET_KNOWN_P): Document.
	(MEM_OFFSET): Change from returning an rtx to returning a
	HOST_WIDE_INT.
	* rtl.h (MEM_OFFSET_KNOWN_P): New macro.
	(MEM_OFFSET): Return a HOST_WIDE_INT rather than an rtx.
	* emit-rtl.h (set_mem_offset): Take a HOST_WIDE_INT rather than an rtx.
	(clear_mem_offset): Declare.
	* alias.c (ao_ref_from_mem): Adjust uses of MEM_OFFSET, using
	MEM_OFFSET_KNOWN_P to test whether the offset is known, and
	MEM_OFFSET to get a HOST_WIDE_INT offset.
	(nonoverlapping_memrefs_p): Likewise.  Adjust calls to...
	(adjust_offset_for_component_ref): Take a bool "known_p"
	parameter and a HOST_WIDE_INT "offset" parameter.
	* builtins.c (get_memory_rtx): As for ao_ref_from_mem.
	Adjust calls to set_mem_offset, passing a HOST_WIDE_INT rather
	than an rtx.  Use clear_mem_offset to clear the offset.
	* cfgcleanup.c (merge_memattrs): Likewise.
	* dwarf2out.c (tls_mem_loc_descriptor): Likewise.
	* function.c (assign_parm_find_stack_rtl): Likewise.
	(assign_parm_setup_stack): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* reload.c (find_reloads_subreg_address): Likewise.
	* simplify-rtx.c (delegitimize_mem_from_attrs): Likewise.
	* var-tracking.c (INT_MEM_OFFSET): Likewise.
	* emit-rtl.c (set_reg_attrs_from_value): Likewise.
	(get_mem_align_offset): Likewise.
	(set_mem_offset): Take a HOST_WIDE_INT rather than an rtx.
	(clear_mem_offset): New function.
	* config/mips/mips.c (r10k_safe_mem_expr_p): Take a HOST_WIDE_INT
	offset rather than an rtx.  Assume both the expressio and offset
	are available.
	(r10k_needs_protection_p_1): Update accordingly, checking the
	expression and offset availability here instead.

From-SVN: r176477
2011-07-19 17:43:27 +00:00
Richard Sandiford f5541398ef rtl.texi (MEM_SIZE_KNOWN_P): Document.
gcc/
	* doc/rtl.texi (MEM_SIZE_KNOWN_P): Document.
	(MEM_SIZE): Change from returning an rtx to returning a HOST_WIDE_INT.
	* rtl.h (MEM_SIZE_KNOWN_P): New macro.
	(MEM_SIZE): Return a HOST_WIDE_INT rather than an rtx.
	* emit-rtl.h (set_mem_size): Take a HOST_WIDE_INT rather than an rtx.
	(clear_mem_size): Declare.
	* emit-rtl.c (set_mem_size): Take a HOST_WIDE_INT rather than an rtx.
	(clear_mem_size): New function.
	* alias.c (ao_ref_from_mem): Adjust uses of MEM_SIZE, using
	MEM_SIZE_KNOWN_P to test whether the size is known, and MEM_SIZE
	to get a HOST_WIDE_INT size.  Adjust calls to set_mem_size,
	passing a HOST_WIDE_INT rather than an rtx.  Use clear_mem_size
	to clear the size.
	(nonoverlapping_memrefs_p): Likewise.
	* builtins.c (get_memory_rtx, expand_builtin_memcmp): Likewise.
	(expand_builtin_init_trampoline): Likewise.
	* calls.c (compute_argument_addresses): Likewise.
	* cfgcleanup.c (merge_memattrs): Likewise.
	* dce.c (find_call_stack_args): Likewise.
	* dse.c (record_store, scan_insn): Likewise.
	* dwarf2out.c (dw_sra_loc_expr): Likewise.
	* expr.c (emit_block_move_hints): Likewise.
	* function.c (assign_parm_find_stack_rtl): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* reload.c (find_reloads_subreg_address): Likewise.
	* rtlanal.c (may_trap_p_1): Likewise.
	* var-tracking.c (track_expr_p): Likewise.
	* varasm.c (assemble_trampoline_template): Likewise.
	* config/arm/arm.c (arm_print_operand): Likewise.
	* config/h8300/h8300.c (h8sx_emit_movmd): Likewise.
	* config/i386/i386.c (expand_movmem_via_rep_mov): Likewise.
	(expand_setmem_via_rep_stos, expand_constant_movmem_prologue)
	(expand_constant_setmem_prologue): Likewise.
	* config/mips/mips.c (mips_get_unaligned_mem): Likewise.
	* config/rs6000/rs6000.c (expand_block_move): Likewise.
	(adjacent_mem_locations): Likewise.
	* config/s390/s390.c (s390_expand_setmem): Likewise.
	(s390_expand_insv): Likewise.
	* config/s390/s390.md (*extzv<mode>, *extv<mode>): Likewise.
	(*extendqi<mode>2_short_displ): Likewise.
	* config/sh/sh.c (expand_block_move): Likewise.
	* config/sh/sh.md (extv, extzv): Likewise.

From-SVN: r176476
2011-07-19 17:43:15 +00:00
Richard Henderson 2867fa7cbd Dump NOTE_INSN_CFI notes.
* dwarf2out.c (output_cfi_directive): Export.  Add FILE parameter.
        Handle some opcodes specially for debugging.
        * print-rtl.c: Include dwarf2out.h
        (print_rtx): Handle NOTE_INSN_CFI.
        * Makefile.in (print-rtl.o): Update.

From-SVN: r176020
2011-07-07 17:13:02 -07:00
Jakub Jelinek ddb555ed51 re PR debug/47858 (IPA-SRA decreases quality of debug info)
PR debug/47858
	* gimple.h (enum gimple_debug_subcode): Add GIMPLE_DEBUG_SOURCE_BIND.
	(gimple_build_debug_source_bind_stat): New prototype.
	(gimple_build_debug_source_bind): Define.
	(gimple_debug_source_bind_p, gimple_debug_source_bind_get_var,
	gimple_debug_source_bind_get_value,
	gimple_debug_source_bind_get_value_ptr,
	gimple_debug_source_bind_set_var,
	gimple_debug_source_bind_set_value): New inlines.
	* gimple.c (gimple_build_debug_source_bind_stat): New function.
	* gimple-pretty-print.c (dump_gimple_debug): Handle
	GIMPLE_DEBUG_SOURCE_BIND.
	* sese.c (rename_uses): Handle gimple_debug_source_bind_p.
	* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
	* tree-parloops.c (eliminate_local_variables,
	separate_decls_in_region): Likewise.
	(separate_decls_in_region_debug): Renamed from
	separate_decls_in_region_debug_bind.  Handle
	gimple_debug_source_bind_p.
	* tree.h (decl_debug_args_lookup, decl_debug_args_insert): New
	prototypes.
	(DECL_HAS_DEBUG_ARGS_P): Define.
	(struct tree_function_decl): Add has_debug_args_flag field.
	* tree.c (debug_args_for_decl): New variable.
	(decl_debug_args_lookup, decl_debug_args_insert): New functions.
	* tree-into-ssa.c (mark_def_sites): Handle uses in debug stmts.
	(rewrite_debug_stmt_uses): New function.
	(rewrite_stmt): Use it to rewrite debug stmt uses.
	* rtl.def (DEBUG_PARAMETER_REF): New.
	* rtl.h (DEBUG_PARAMETER_REF_DECL): Define.
	* cselib.c (rtx_equal_for_cselib_1, cselib_hash_rtx): Handle
	DEBUG_PARAMETER_REF.
	* rtl.c (rtx_equal_p_cb, rtx_equal_p, iterative_hash_rtx): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* tree-sra.c (sra_ipa_reset_debug_stmts): Prefer replacing of
	SSA_NAMEs with DEBUG_EXPR_DECLs initialized in source bind
	debug stmts in the first bb.
	* tree-inline.c (remap_ssa_name): If remapping default def
	of a PARM_DECL fails, map to a DEBUG_EXPR_DECL set in
	a source bind debug stmt.
	(remap_gimple_stmt): Handle gimple_debug_source_bind_p.
	(maybe_move_debug_stmts_to_successors): Likewise.
	(copy_debug_stmt): Likewise.  Avoid shadowing a variable.
	(tree_function_versioning): If DECL_HAS_DEBUG_ARGS_P, copy
	debug args vector from old_decl to new_decl.
	* ipa-prop.c (ipa_modify_call_arguments): For optimized away
	or modified parameters, add debug bind stmts before call
	setting DEBUG_EXPR_DECL which is remembered in debug args
	vector.
	* cfgexpand.c (expand_call_stmt): Call expand_debug_expr
	on DECL_DEBUG_EXPRs from debug args vector.
	(expand_debug_source_expr): New function.
	(expand_debug_locations): Use it for source bind insns.
	(expand_gimple_basic_block): Handle gimple_debug_source_bind_p.
	* var-tracking.c (prepare_call_arguments): Add debug args
	to call_arguments if any.
	* dwarf2out.c (dwarf_stack_op_name, size_of_loc_descr,
	output_loc_operands, output_loc_operands_raw,
	resolve_addr_in_expr, compare_loc_operands): Handle
	DW_OP_GNU_parameter_ref.
	(get_ref_die_offset, parameter_ref_descriptor): New functions.
	(mem_loc_descriptor): Handle DEBUG_PARAMETER_REF.
	(gen_subprogram_die): Handle parameters identified by
	DEBUG_PARAMETER_REF.

	* dwarf2.h (enum dwarf_location_atom): Add DW_OP_GNU_parameter_ref.

From-SVN: r175288
2011-06-22 12:41:58 +02:00
Jakub Jelinek a58a8e4b1f re PR debug/45882 (No debug info for vars depending on unused parameter)
PR debug/45882
	* rtl.def (ENTRY_VALUE): Change format from "e" to "0".
	* rtl.h (ENTRY_VALUE_EXP): Define.
	* rtl.c (rtx_equal_p_cb, rtx_equal_p): Handle ENTRY_VALUE.
	* cselib.c (rtx_equal_for_cselib_p, cselib_hash_rtx): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* gengtype.c (adjust_field_rtx_def): Likewise.
	* var-tracking.c (vt_add_function_parameter): Adjust
	gen_rtx_ENTRY_VALUE uses, use ENTRY_VALUE_EXP macro.
	* dwarf2out.c (mem_loc_descriptor): Use ENTRY_VALUE_EXP macro.
	* cfgexpand.c (expand_debug_expr): If a SSA_NAME without
	partition is a default definition of a PARM_DECL, use ENTRY_VALUE
	of its DECL_INCOMING_RTL if possible, or its DECL_RTL if set.

	* gcc.dg/guality/pr45882.c: New test.

From-SVN: r171035
2011-03-16 09:35:31 +01:00
Jakub Jelinek 2b1c543325 final.c (final_scan_insn): Handle NOTE_INSN_CALL_ARG_LOCATION.
* final.c (final_scan_insn): Handle NOTE_INSN_CALL_ARG_LOCATION.
	Call var_location debug hook even on CALL_INSNs.
	(rest_of_clean_state): Don't print NOTE_INSN_CALL_ARG_LOCATION.
	* rtl.def (ENTRY_VALUE): New.
	* dwarf2out.c: Include cfglayout.h.
	(dwarf_stack_op_name, size_of_loc_descr, output_loc_operands,
	output_loc_operands_raw): Handle DW_OP_GNU_entry_value.
	(struct call_arg_loc_node): New type.
	(call_arg_locations, call_arg_loc_last, block_map, call_site_count,
	tail_call_site_count): New variables.
	(dwarf_tag_name): Handle DW_TAG_GNU_call_site and
	DW_TAG_GNU_call_site_parameter.
	(dwarf_attr_name): Handle DW_AT_GNU_call_site_value,
	DW_AT_GNU_call_site_data_value, DW_AT_GNU_call_site_target,
	DW_AT_GNU_call_site_target_clobbered, DW_AT_GNU_tail_call,
	DW_AT_GNU_all_tail_call_sites, DW_AT_GNU_all_call_sites
	and DW_AT_GNU_all_source_call_sites.
	(mem_loc_descriptor): Handle ENTRY_VALUE.
	(add_src_coords_attributes): Don't add enything if
	DECL_SOURCE_LOCATION is UNKNOWN_LOCATION.
	(dwarf2out_abstract_function): Save and clear call_arg_location,
	call_site_count and tail_call_site_count around dwarf2out_decl call.
	(gen_call_site_die): New function.
	(gen_subprogram_die): Emit DW_TAG_GNU_call_site DIEs for call sites.
	(gen_lexical_block_die, gen_inlined_subroutine_die): Update block_map.
	(dwarf2out_function_decl): Clear call_arg_locations,
	call_arg_loc_last, set call_site_count and tail_call_site_count
	to -1 and free block_map.
	(dwarf2out_var_location): Handle NOTE_INSN_CALL_ARG_LOCATION and
	CALL_INSNs.  Add NOTE_DURING_CALL_P var location notes even when not
	followed by any real instructions.
	(dwarf2out_begin_function): Set call_site_count and
	tail_call_site_count to 0.
	(resolve_addr): If DW_AT_abstract_origin of DW_TAG_GNU_call_site
	is dw_val_class_addr, attempt to look it up again, for DECL_EXTERNAL
	attempt to force a DIE for it and worst case remove the attribute.
	(resolve_one_addr): For TREE_CONSTANT_POOL_ADDRESS_P SYMBOL_REFs
	check TREE_ASM_WRITTEN of DECL_INITIAL of the decl instead of
	the decl itself.
	* var-tracking.c: Include tm_p.h.
	(vt_stack_adjustments): For calls call note_register_arguments.
	(argument_reg_set): New variable.
	(add_stores): For MO_VAL_SET of non-tracked regs from argument_reg_set
	ensure the VALUE is resolved.
	(call_arguments): New variable.
	(prepare_call_arguments): New function.
	(add_with_sets): For MO_CALL set u.loc from call_arguments and clear it.
	(struct expand_loc_callback_data): Add ignore_cur_loc field.
	(vt_expand_loc_callback): If ignore_cur_loc, don't look at cur_loc and
	always use the best expression.
	(vt_expand_loc): Add ignore_cur_loc argument.
	(vt_expand_loc_dummy): Clear ignore_cur_loc field.
	(emit_note_insn_var_location): Adjust vt_expand_loc callers.
	(emit_notes_in_bb) <case MO_CALL>: Add NOTE_INSN_CALL_ARG_LOCATION
	note for all calls.
	(vt_add_function_parameter): Use cselib_lookup_from_insn.
	If dv is a VALUE, enter into hash table also ENTRY_VALUE for the
	argument.  Don't call cselib_preserve_only_values and
	cselib_reset_table.
	(note_register_arguments): New function.
	(vt_initialize): Compute argument_reg_set.  Call
	vt_add_function_parameters before processing basic blocks instead of
	afterwards.  For calls call prepare_call_arguments before calling
	cselib_process_insn.
	* print-rtl.c (print_rtx): Handle NOTE_INSN_CALL_ARG_LOCATION.
	* Makefile.in (dwarf2out.o): Depend on $(CFGLAYOUT_H).
	(var-tracking.o): Depend on $(TM_P_H).
	* cfglayout.h (insn_scope): New prototype.
	* gengtype.c (adjust_field_rtx_def): Handle NOTE_INSN_CALL_ARG_LOCATION.
	* cfglayout.c (insn_scope): No longer static.
	* insn-notes.def (CALL_ARG_LOCATION): New.
	* calls.c (expand_call, emit_library_call_value_1): Put USEs for
	MEM arguments into CALL_INSN_FUNCTION_USAGE unconditionally.
	* integrate.c (set_block_origin_self, set_block_abstract_flags): Do
	nothing for DECL_EXTERNAL BLOCK_VARS.
cp/
	* cp-objcp-common.c (cp_function_decl_explicit_p): Don't crash if
	DECL_LANG_SPECIFIC is NULL.
include/
	* dwarf2.h (DW_TAG_GNU_call_site, DW_TAG_GNU_call_site_parameter,
	DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
	DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered,
	DW_AT_GNU_tail_call, DW_AT_GNU_all_tail_call_sites,
	DW_AT_GNU_all_call_sites,, DW_AT_GNU_all_source_call_sites,
	DW_OP_GNU_entry_value): New.

From-SVN: r171033
2011-03-16 09:32:13 +01:00
Jakub Jelinek 32990d5bc2 re PR middle-end/45234 (ICE in expand_call, at calls.c:2845 when passing aligned function argument from unaligned stack after alloca)
PR middle-end/45234
	* rtl.h (enum global_rtl_index): Add
	GR_VIRTUAL_PREFERRED_STACK_BOUNDARY.
	(LAST_VIRTUAL_POINTER_REGISTER): Define.
	(virtual_preferred_stack_boundary_rtx,
	VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM): Define.
	(LAST_VIRTUAL_REGISTER): Increase by one.
	(REGNO_PTR_FRAME_P): Use LAST_VIRTUAL_POINTER_REGISTER
	instead of LAST_VIRTUAL_REGISTER.
	* function.c (instantiate_new_reg): Handle
	virtual_preferred_stack_boundary_rtx.
	* emit-rtl.c (init_virtual_regs): Handle
	VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM.
	(init_emit_regs): Initialize virtual_preferred_stack_boundary_rtx.
	* explow.c (round_push): If crtl->preferred_stack_boundary
	is smaller than MAX_SUPPORTED_STACK_ALIGNMENT, use
	virtual_preferred_stack_boundary_rtx alignment instead of
	crtl->preferred_stack_boundary alignment.
	(allocate_dynamic_stack_space): Use CONST_INT_P and REG_P
	macros.  Never decrease crtl->preferred_stack_boundary,
	use crtl->preferred_stack_boundary or MAX_SUPPORTED_STACK_ALIGNMENT
	instead of PREFERRED_STACK_BOUNDARY.  Don't modify
	stack_pointer_delta in dynamic allocation, even when size
	is constant.
	(probe_stack_range, anti_adjust_stack_and_probe): Use CONST_INT_P
	macro.
	* print-rtl.c (print_rtx): Handle
	VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM.
	* config/alpha/alpha.h (NONSTRICT_REG_OK_FP_BASE_P): Use
	LAST_VIRTUAL_POINTER_REGISTER instead of LAST_VIRTUAL_REGISTER.
	* config/frv/frv.c (frv_emit_movsi): Likewise.
	* config/arm/arm.c (thumb1_legitimate_address_p): Likewise.
	* config/rs6000/rs6000.c (virtual_stack_registers_memory_p):
	Likewise.

	* gcc.dg/torture/stackalign/alloca-6.c: New test.
	* gcc.target/i386/pr45234.c: New test.

	Revert:
	2010-09-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/45234
	* calls.c (expand_call): Make sure that all variable sized
	adjustments are multiple of preferred stack boundary after
	stack alignment.

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

From-SVN: r164370
2010-09-17 15:14:49 +01:00
Jakub Jelinek c8a27c4018 rtl.def (DEBUG_IMPLICIT_PTR): New rtl code.
* rtl.def (DEBUG_IMPLICIT_PTR): New rtl code.
	* rtl.h (DEBUG_IMPLICIT_PTR_DECL): Define.
	* rtl.c (rtx_equal_p_cb, rtx_equal_p): Handle DEBUG_IMPLICIT_PTR.
	* print-rtl.c (print_rtx): Likewise.
	* cselib.c (rtx_equal_for_cselib_p, cselib_hash_rtx): Likewise.
	* cfgexpand.c (expand_debug_expr): Generate DEBUG_IMPLICIT_PTR
	for ADDR_EXPR with non-addressable object.
	* dwarf2out.c (enum dw_val_class): Add dw_val_class_decl_ref.
	(struct dw_val_struct): Add v.val_decl_ref.
	(dwarf_stack_op_name, output_loc_operands, output_loc_operands_raw):
	Handle DW_OP_GNU_implicit_pointer.
	(size_of_loc_descr): Likewise.  Fix up DW_OP_call_ref size.
	(get_ref_die_offset_label): New function.
	(implicit_ptr_descriptor): New function.
	(mem_loc_descriptor): Handle DEBUG_IMPLICIT_PTR.
	(loc_descriptor): Likewise.
	(gen_variable_die): Put even definitions into decl_die_table.
	(resolve_addr_in_expr): Resolve still unresolved
	DW_OP_GNU_implicit_pointer operands, if it can't be resolved
	return false.
	(dwarf2out_finish): Call output_location_lists after outputting
	.debug_info and .debug_abbrev instead of before.

	* dwarf2.h (DW_OP_GNU_implicit_pointer): New.

2010-09-09  Roland McGrath  <roland@redhat.com>

	* dwarf2out.c (DWARF_REF_SIZE): Define.
	(size_of_loc_descr): Use it for DW_OP_call_ref.

From-SVN: r164050
2010-09-09 08:43:47 +02:00
Bernd Schmidt 418e920fc6 rtl.def (DEBUG_INSN, [...]): Swap operands 4 and 5.
* rtl.def (DEBUG_INSN, INSN, JUMP_INSN, CALL_INSN, NOTE): Swap operands
	4 and 5.
	* rtl.h (PATTERN, INSN_LOCATOR, NOTE_DATA, NOTE_DELETED_LABEL_NAME,
	NOTE_BLOCK, NOTE_EH_HANDLER, NOTE_BASIC_BLOCK, NOTE_VAR_LOCATION,
	NOTE_KIND, LABEL_NUSES, LABEL_REFS): Adjust accordingly.
	* gengtype.c (adjust_field_rtx_def): Swap operands 4 and 5 of
	CODE_LABELs and NOTEs.
	* caller-save.c (init_caller_save): Fix up gen_rtx_INSN call.
	* combine.c (try_combine): Likewise.
	* ira.c (setup_prohibited_mode_move_regs): Likewise.
	* print-rtl.c (print_rtx): Start REG_NOTES on a new line.

From-SVN: r162602
2010-07-27 21:52:39 +00:00
Richard Sandiford 0fe60a1bfa md.texi: Document the "unspec" and "unspecv" enum names.
gcc/
	* doc/md.texi: Document the "unspec" and "unspecv" enum names.
	* Makefile.in (OBJS-common): Include insn-enums.o.
	(insn-enums.o): New rule.
	(simple_generated_c): Add insn-enums.c.
	(build/genenums.o): New rule.
	(genprogmd): Add "enums".
	* genconstants.c (print_enum_type): Declare a C string array
	for each enum.
	* genenums.c: New file.
	* print-rtl.c (print_rtx): If defined, use the "unspecv" enum
	for UNSPEC_VOLATILE.  If defined, use the "unspec" enum for both
	UNSPEC and (as a fallback) for UNSPEC_VOLATILE.

From-SVN: r160582
2010-06-10 20:24:45 +00:00
Jan Hubicka 24e47c76ba tree-vrp.c (debug_value_range, [...]): Annotate with DEBUG_FUNCTION.
* tree-vrp.c (debug_value_range, debug_all_value_ranges,
	debug_asserts_for, debug_all_asserts): Annotate with DEBUG_FUNCTION.
	* tree-into-ssa.c (debug_decl_set, debug_defs_stack, debug_currdefs,
	debug_tree_ssa, debug_tree_ssa_stats, debug_def_blocks,
	debug_names_replaced_by, debug_update_ssa): Likewise.	
	* sbitmap.c (debug_sbitmap): Likewise.
	* genrecog.c (debug_decision, debug_decision_list): Likewise.
	* tree-pretty-print.c (debug_generic_expr, debug_generic_stmt,
	debug_tree_chain): Likewise.
	* tree-loop-distribution.c (debug_rdg_partitions): Likewise.
	* cgraph.c (debug_cgraph_node, debug_cgraph): Likewise.
	* optabs.c  (debug_optab_libfuncs): Likewise.
	(verify_loop_closed_ssa): Likewise.
	* value-prof.c (verify_histograms): Likewise.
	* reload.c (debug_reload_to_stream, debug_reload): Likewise.
	* bitmap.c (debug_bitmap_file, debug_bitmap, bitmap_print): Likewise.
	* cfghooks.c (verify_flow_info): Likewise.
	* fold-const.c (debug_fold_checksum): Likewise.
	* omp-low.c (debug_omp_region, debug_all_omp_regions): Likewise.
	* cfg.c (debug_regset, debug_flow_info, debug_bb, debug_bb_n):
	Likewise.
	* omega.c (debug_omega_problem): Likewise.
	* cgraphunit.c (verify_cgraph_node, verify_cgraph): Likewise.
	* tree-ssa-ccp.c (debug_lattice_value): Likewise.
	* dominance.c (verify_dominators, debug_dominance_info,
	debug_dominance_tree): Likewise.
	* df-core.c (df_insn_uid_debug, df_insn_debug, df_insn_debug_regno,
	* df_regno_debug, df_ref_debug,
	debug_df_insn, debug_df_reg, debug_df_regno, debug_df_ref,
	debug_df_defno, debug_df_useno, debug_df_chain): Likewise.
	* tree-ssa-dom.c (debug_dominator_optimization_stats): Likewise.
	* sel-sched.c (debug_state): Likewise.
	* tree-ssa-alias.c (debug_alias_info, debug_points_to_info_for): Likewise.
	* cfganal.c (print_edge_list, verify_edge_list): Likewise.
	* dwarf2out.c (debug_dwarf_die, debug_dwarf): Likewise.
	* tree-eh.c (verify_eh_edges, verify_eh_dispatch_edge): Likewise.
	* gimple-pretty-print.c (debug_gimple_stmt, debug_gimple_seq): Likewise.
	* c-pretty-print.c (debug_c_tree): Likewise.
	* sel-sched-dump.c (debug_insn_rtx, debug_vinsn, debug_expr, debug_insn
	debug_av_set, debug_lv_set, debug_ilist, debug_blist, debug_insn_vector,
	debug_hard_reg_set, debug_mem_addr_value): Likewise.
	* ebitmap.c (debug_ebitmap): Likewise.
	* function.c (debug_find_var_in_block_tree): Likewise.
	* print-rtl.c (debug_rtx): Likewise.
	(debug_rtx_count): Likewise.
	(debug_rtx_list, debug_rtx_range, debug_rtx_find): Likewise.
	* stor-layout.c (debug_rli): Likewise.
	* ipa.c (debug_cgraph_node_set, debug_varpool_node_set): Likewise.
	* tree-data-ref.c (debug_data_references, debug_data_dependence_relations,
	debug_data_reference, debug_data_dependence_relation, debug_rdg_vertex,
	debug_rdg_component, debug_rdg): Likewise.
	* tree-affine.c (debug_aff): Likewise.
	* tree-dfa.c (debug_referenced_vars, debug_variable, debug_dfa_stats): Likewise.
	* except.c (debug_eh_tree, verify_eh_tree): Likewise.
	* emit-rtl.c (verify_rtl_sharing): Likewise.
	* tree-ssa-pre.c (debug_pre_expr, debug_bitmap_set,
	debug_value_expressions): Likewise.
	* tree-ssa-live.c (debug_scope_block, debug_scope_blocks): Likewise.
	* sese.c (debug_rename_map, debug_ivtype_map): Likewise.
	* print-tree.c (debug_tree, debug_vec_tree): Likewise.
	* cfglayout.c (verify_insn_chain): Likewise.
	* graphite-clast-to-gimple.c (debug_clast_name_indexes,
	debug_clast_stmt, debug_generated_program): Likewise.
	* ggc-page.c (debug_print_page_list): Likewise.
	* tree-ssa-ter.c (debug_ter): Likewise.
	* graphite-dependences.c (debug_pddr): Likewise.
	* sched-deps.c (debug_ds): Likewise.
	* tree-ssa.c (verify_ssa): Likewise.
	* graphite-poly.c (debug_scattering_function, debug_iteration_domain,
	debug_scattering_functions, debug_iteration_domains, debug_pdr,
	debug_pdrs, debug_pbb_domain, debug_pbb, debug_scop_context, debug_scop,
	debug_cloog, debug_scop_params, debug_lst): Likewise.
	* tree-inline.c (debug_find_tree): Likewise.
	* graphite-ppl.c (debug_ppl_linear_expr, debug_ppl_polyhedron_matrix,
	debug_ppl_powerset_matrix): Likewise.
	* var-tracking.c (debug_dv): Likewise.
	* system.h (DEBUG_FUNCTION, DEBUG_VARIABLE): Define.
	* cfgloop.c (verify_loop_structure): Likewise.
	* plugin.c (dump_active_plugins, debug_active_plugins): Likewise.
	* c-common.c (verify_sequence_points): Likewise.
	* sched-rgn.c (debug_regions, debug_region, debug_candidate,
	debug_candidates, debug_rgn_dependencies): Likewise.
	* tree-ssa-structalias.c (debug_constraint, debug_constraints,
	* debug_constraint_graph, debug_solution_for_var,
	debug_sa_points_to_info): Likewise.
	* sched-vis.c (debug_insn_slim, debug_bb_slim, debug_bb_n_slim):
	Likewie.
	* tree-cfg.c (debug_cfg_stats, verify_stmts, debug_function,
	debug_loops, debug_loop, debug_loop_num): Likewise.
	* passes.c (debug_pass): Likewise.
	(dump_properties): Likewise; add cfglayout property.
	(debug_properties): Likewise.
	* tree-ssa-reassoc.c (debug_ops_vector): Likewise.
	* varpool.c (debug_varpool): Likewise.
	* regcprop.c (debug_value_data): Likewise.
	* tree-ssa-operands.c (verify_imm_links, debug_immediate_uses,
	debug_immediate_uses_for): Likewise.

From-SVN: r160036
2010-05-29 20:31:45 +00:00
Steven Bosscher a2c9fe4253 rtl.h (union rtunion_def): Remove rt_bit member.
* rtl.h (union rtunion_def): Remove rt_bit member.
	(XBITMAP, X0BITMAP, XCBITMAP): Remove.
	* print-rtl (print_rtx): Do not print the member.
	* gengtype.c (adjust_field_rtx_def): Do not handle it.
	* gengenrtl.c (type_from_format): Likewise.
	(accessor_from_format): Likewise.

From-SVN: r159698
2010-05-22 14:15:50 +00:00
Joseph Myers cf8358387d diagnostic.c: Don't include tm.h, tree.h, tm_p.h, langhooks.h or langhooks-def.h.
* diagnostic.c: Don't include tm.h, tree.h, tm_p.h, langhooks.h or
	langhooks-def.h.
	(diagnostic_initialize): Initialize x_data not last_function.
	(diagnostic_report_current_function): Move to tree-diagnostic.c.
	(default_diagnostic_starter): Call
	diagnostic_report_current_module not
	diagnostic_report_current_function.
	(diagnostic_report_diagnostic): Initialize x_data not
	abstract_origin.
	(verbatim): Likewise.
	* diagnostic.h (struct diagnostic_info): Change abstract_origin to
	x_data.
	(struct diagnostic_context): Change last_function to x_data.
	(diagnostic_auxiliary_data): Replace with
	diagnostic_context_auxiliary_data and
	diagnostic_info_auxiliary_data.
	(diagnostic_last_function_changed, diagnostic_set_last_function,
	diagnostic_report_current_function): Move to tree-diagnostic.h.
	(print_declaration, dump_generic_node, print_generic_stmt,
	print_generic_stmt_indented, print_generic_expr,
	print_generic_decl, debug_c_tree, dump_omp_clauses,
	print_call_name, debug_generic_expr, debug_generic_stmt,
	debug_tree_chain, default_tree_printer): Move to
	tree-pretty-print.h.
	(debug_gimple_stmt, debug_gimple_seq, print_gimple_seq,
	print_gimple_stmt, print_gimple_expr, dump_gimple_stmt): Move to
	gimple-pretty-print.h.
	* pretty-print.c: Don't include tree.h
	(pp_base_format): Don't handle %K here.
	(pp_base_tree_identifier): Move to tree-pretty-print.c.
	* pretty-print.h (text_info): Change abstract_origin to x_data.
	(pp_tree_identifier, pp_unsupported_tree,
	pp_base_tree_identifier): Move to tree-pretty-print.h.
	* gimple-pretty-print.h, tree-diagnostic.c, tree-diagnostic.h,
	tree-pretty-print.h: New files.
	* tree-pretty-print.c: Include tree-pretty-print.h.
	(percent_K_format): New.  Moved from pretty-print.c.
	(pp_base_tree_identifier): Move from pretty-print.c.
	* c-objc-common.c: Include tree-pretty-print.h.
	(c_tree_printer): Handle %K here.
	* langhooks.c: Include tree-diagnostic.h.
	(lhd_print_error_function): Use diagnostic_abstract_origin macro.
	* toplev.c: Include tree-diagnostic.h and tree-pretty-print.h.
	(default_tree_printer): Handle %K using percent_K_format.
	(general_init): Use default_tree_diagnostic_starter.
	* tree.c: Include tree-diagnostic.h and tree-pretty-print.h.
	(free_lang_data): Use default_tree_diagnostic_starter.
	* c-pretty-print.c: Include tree-pretty-print.h.
	* cfgexpand.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* cgraphunit.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* dwarf2out.c: Include tree-pretty-print.h.
	* except.c: Include tree-pretty-print.h.
	* gimple-pretty-print.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* gimplify.c: Include tree-pretty-print.h.
	* graphite-poly.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* ipa-cp.c: Include tree-pretty-print.h.
	* ipa-inline.c: Include gimple-pretty-print.h.
	* ipa-prop.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* ipa-pure-const.c: Include gimple-pretty-print.h.
	* ipa-struct-reorg.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* ipa-type-escape.c: Include tree-pretty-print.h.
	* print-rtl.c: Include tree-pretty-print.h.
	* print-tree.c: Include gimple-pretty-print.h.
	* sese.c: Include tree-pretty-print.h.
	* tree-affine.c: Include tree-pretty-print.h.
	* tree-browser.c: Include tree-pretty-print.h.
	* tree-call-cdce.c: Include gimple-pretty-print.h.
	* tree-cfg.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-chrec.c: Include tree-pretty-print.h.
	* tree-data-ref.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-dfa.c: Include tree-pretty-print.h.
	* tree-if-conv.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-inline.c: Include tree-pretty-print.h.
	* tree-into-ssa.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-nrv.c: Include tree-pretty-print.h.
	* tree-object-size.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-outof-ssa.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-parloops.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-predcom.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-scalar-evolution.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-sra.c: Include tree-pretty-print.h.
	* tree-ssa-address.c: Include tree-pretty-print.h.
	* tree-ssa-alias.c: Include tree-pretty-print.h.
	* tree-ssa-ccp.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-coalesce.c: Include tree-pretty-print.h.
	* tree-ssa-copy.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-copyrename.c: Include tree-pretty-print.h.
	* tree-ssa-dce.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-dom.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-dse.c: Include gimple-pretty-print.h.
	* tree-ssa-forwprop.c: Include tree-pretty-print.h.
	* tree-ssa-ifcombine.c: Include tree-pretty-print.h.
	* tree-ssa-live.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-loop-im.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-loop-ivcanon.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-loop-ivopts.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-loop-niter.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-loop-prefetch.c: Include tree-pretty-print.h.
	* tree-ssa-math-opts.c: Include gimple-pretty-print.h.
	* tree-ssa-operands.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-phiprop.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-pre.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-propagate.c: Include gimple-pretty-print.h.
	* tree-ssa-reassoc.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-sccvn.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-sink.c: Include gimple-pretty-print.h.
	* tree-ssa-ter.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-uninit.c: Include gimple-pretty-print.h.
	* tree-ssa.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-stdarg.c: Include gimple-pretty-print.h.
	* tree-switch-conversion.c: Include gimple-pretty-print.h.
	* tree-tailcall.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-vect-data-refs.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-vect-loop-manip.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-vect-loop.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-vect-patterns.c: Include gimple-pretty-print.h.
	* tree-vect-slp.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-vect-stmts.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-vectorizer.c: Include tree-pretty-print.h.
	* tree-vrp.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* value-prof.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* var-tracking.c: Include tree-pretty-print.h.
	* Makefile.in (OBJS-common): Add tree-diagnostic.o.
	(tree-diagnostic.o): New dependencies.
	(c-objc-common.o, c-pretty-print.o, langhooks.o, tree.o,
	tree-inline.o, print-tree.o, stor-layout.o, tree-ssa-uninit.o,
	tree-ssa.o, tree-into-ssa.o, tree-ssa-ter.o, tree-ssa-coalesce.o,
	tree-outof-ssa.o, tree-ssa-forwprop.o, tree-ssa-phiprop.o,
	tree-ssa-ifcombine.o, tree-nrv.o, tree-ssa-copy.o,
	tree-ssa-propagate.o, tree-ssa-dom.o, tree-ssa-uncprop.o,
	tree-ssa-live.o, tree-ssa-copyrename.o, tree-ssa-pre.o,
	tree-ssa-sccvn.o, tree-vrp.o, tree-cfg.o, tree-tailcall.o,
	tree-ssa-sink.o, tree-if-conv.o, tree-dfa.o, tree-ssa-operands.o,
	tree-ssa-address.o, tree-ssa-loop-niter.o,
	tree-ssa-loop-ivcanon.o, tree-ssa-loop-prefetch.o, tree-predcom.o,
	tree-ssa-loop-ivopts.o, tree-affine.o, tree-ssa-loop-im.o,
	tree-ssa-math-opts.o, tree-ssa-alias.o, tree-ssa-reassoc.o,
	gimplify.o, tree-browser.o, tree-chrec.o, tree-scalar-evolution.o,
	tree-data-ref.o, sese.o, graphite-poly.o, tree-vect-loop.o,
	tree-vect-loop-manip.o, tree-vect-patterns.o, tree-vect-slp.o,
	tree-vect-stmts.o, tree-vect-data-refs.o, tree-vectorizer.o,
	tree-parloops.o, tree-stdarg.o, tree-object-size.o,
	gimple-pretty-print.o, tree-pretty-print.o, diagnostic.o,
	toplev.o, print-rtl.o, except.o, dwarf2out.o, cgraphunit.o,
	ipa-prop.o, ipa-cp.o, ipa-inline.o, ipa-pure-const.o,
	ipa-type-escape.o, ipa-struct-reorg.o, tree-ssa-dce.o,
	tree-call-cdce.o, tree-ssa-ccp.o, tree-sra.o,
	tree-switch-conversion.o, var-tracking.o, value-prof.o,
	cfgexpand.o, pretty-print.o): Update dependencies.

cp:
	* error.c: Include tree-diagnostic.h and tree-pretty-print.h.
	(cp_print_error_function): Use diagnostic_abstract_origin macro.
	(cp_printer): Handle %K here using percent_K_format.
	* cxx-pretty-print.c: Include tree-pretty-print.h.
	* Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
	dependencies.

From-SVN: r159685
2010-05-21 23:34:26 +01:00
Steven Bosscher 40013784db tree.h: Include real.h and fixed-value.h as basic datatypes.
gcc/ChangeLog:
	* tree.h: Include real.h and fixed-value.h as basic datatypes.
	* dfp.c, convert.c, reload1.c, reginfo.c, tree-flow.h,
	tree-ssa-threadedge.c, tree-ssanames.c, tree-loop-linear.c,
	tree-into-ssa.c, tree-vect-generic.c, tree-ssa-structalias.c,
	tree-ssa-loop-im.c, tree-dump.c, tree-complex.c, tree-ssa-uninit.c,
	genrecog.c, tree-ssa-threadupdate.c, tree-ssa-loop-niter.c,
	tree-pretty-print.c, tree-loop-distribution.c,
	tree-ssa-loop-unswitch.c, c-lex.c, optabs.c, postreload-gcse.c,
	tree-ssa-loop-manip.c, postreload.c, tree-ssa-loop-ch.c,
	tree-tailcall.c, tree.c, reload.c, tree-scalar-evolution.c, rtlanal.c,
	tree-phinodes.c, builtins.c, final.c, genoutput.c, fold-const.c,
	tree-ssa-dse.c, genautomata.c, tree-ssa-uncprop.c, toplev.c,
	tree-chrec.c, genemit.c, c-cppbuiltin.c, tree-ssa-sccvn.c,
	tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, mode-switching.c,
	tree-call-cdce.c, cse.c, genpeep.c, tree-ssa-math-opts.c,
	tree-ssa-dom.c, tree-nrv.c, tree-ssa-propagate.c, tree-ssa-alias.c,
	tree-ssa-sink.c, jump.c, ifcvt.c, dwarf2out.c, expr.c, genattrtab.c,
	genconditions.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop.c,
	tree-parloops.c, recog.c, tree-ssa-address.c, lcm.c, tree-eh.c,
	gimple-pretty-print.c, c-pretty-print.c, print-rtl.c, gcse.c,
	tree-if-conv.c, tree-data-ref.c, tree-affine.c, gimplify.c,
	tree-ssa-phiopt.c, implicit-zee.c, expmed.c, tree-dfa.c, emit-rtl.c,
	store-motion.c, cselib.c, tree-cfgcleanup.c, simplify-rtx.c,
	tree-ssa-pre.c, genpreds.c, tree-mudflap.c, print-tree.c,
	tree-ssa-copy.c, tree-ssa-forwprop.c, tree-ssa-dce.c, varasm.c,
	tree-nested.c, tree-ssa.c, tree-ssa-loop-prefetch.c, rtl.c,
	tree-inline.c, integrate.c, tree-optimize.c, tree-ssa-phiprop.c,
	fixed-value.c, combine.c, tree-profile.c, c-common.c, sched-vis.c,
	tree-cfg.c, passes.c, tree-ssa-reassoc.c, config/alpha/alpha.c,
	config/frv/frv.c, config/s390/s390.c, config/m32c/m32c.c,
	config/spu/spu.c, config/sparc/sparc.c, config/mep/mep.c,
	config/m32r/m32r.c, config/rx/rx.c, config/i386/i386.c,
	config/sh/sh.c, config/pdp11/pdp11.c, config/avr/avr.c,
	config/crx/crx.c, config/xtensa/xtensa.c, config/stormy16/stormy16.c,
	config/fr30/fr30.c, config/lm32/lm32.c, config/moxie/moxie.c,
	config/m68hc11/m68hc11.c, config/cris/cris.c, config/iq2000/iq2000.c,
	config/mn10300/mn10300.c, config/ia64/ia64.c, config/m68k/m68k.c,
	config/rs6000/rs6000.c, config/picochip/picochip.c, config/darwin.c,
	config/arc/arc.c, config/mcore/mcore.c, config/score/score3.c,
	config/score/score7.c, config/score/score.c, config/arm/arm.c,
	config/pa/pa.c, config/mips/mips.c, config/vax/vax.c,
	config/h8300/h8300.c, config/v850/v850.c, config/mmix/mmix.c,
	config/bfin/bfin.c:
	Clean up redundant includes.
	* Makefile.in: Update accordingly.

java/ChangeLog:
	* typeck.c, decl.c, jcf-parse.c, except.c, expr.c:

cp/Changelog:
	* error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
	Clean up redundant includes.

fortran/ChangeLog:
	* trans-const.c, trans-types.c, trans-intrinsic.c:
	Clean up redundant includes.

From-SVN: r159663
2010-05-21 13:53:22 +00:00
Uros Bizjak a3f1cee4d3 df-core.c (df_ref_debug): Change format string placeholder from 0x%x to %#x.
* df-core.c (df_ref_debug): Change format string placeholder
	from 0x%x to %#x.
	* dwarf2asm.c (dw2_asm_output_data_raw,
	dw2_asm_output_data_uleb128_raw, dw2_asm_output_data_uleb128,
	dw2_asm_output_data_sleb128_raw, dw2_asm_output_data_sleb128): Ditto.
	* dwarf2out.c (output_cfi, output_cfi_directive,
	dwarf2out_do_cfi_startproc, output_loc_sequence_raw,
	output_cfa_loc_raw, output_die, output_ranges, output_file_names):
	Ditto.
	* genattrtab.c (write_test_expr, write_attr_valueq): Ditto.
	* print-rtl.c (print_rtx): Ditto.

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

From-SVN: r157753
2010-03-26 17:18:51 +01:00
Alexandre Oliva 5440c0e741 re PR debug/42896 (Random debug generation differences, bootstrap fails)
2010-02-03  Alexandre Oliva  <aoliva@redhat.com>

	PR debug/42896
	* cselib.h (struct cselib_val_struct): Add uid.  Rename value to
	hash.
	(cselib_reset_table): Renamed from...
	(cselib_reset_table_with_next_value): ... this.
	(cselib_get_next_uid): Renamed from...
	(cselib_get_next_unknown_value): ... this.
	* cselib.c (next_uid): Renamed from...
	(next_unknown_value): ... this.
	(cselib_clear_table): Adjust.
	(cselib_reset_table): Adjust.  Renamed from...
	(cselib_reset_table_with_next_value): ... this.
	(cselib_get_next_uid): Adjust.  Renamed from...
	(cselib_get_next_unknown_value): ... this.
	(get_value_hash): Use hash.
	(cselib_hash_rtx): Likewise.
	(new_cselib_val): Adjust.  Set and dump uid.
	(cselib_lookup_mem): Pass next_uid as hash.
	(cselib_subst_to_values): Likewise.
	(cselib_log_lookup): Dump uid.
	(cselib_lookup): Pass next_uid as hash.  Adjust.
	(cselib_process_insn): Adjust.
	(cselib_init): Initialize next_uid.
	(cselib_finish): Adjust.
	(dump_cselib_table): Likewise.
	* dse.c (canon_address): Dump value uid.
	* print-rtl.c (print_rtx): Print value uid.
	* var-tracking.c (VARIABLE_HASH_VAL): Dropped.
	(dvuid): New type.
	(dv_uid): New function, sort of renamed from...
	(dv_htab_hash): ... this, reimplemented in terms of it and...
	(dv_uid2hash): ... this.  New.
	(variable_htab_eq): Drop excess assertions.
	(tie_break_pointers): Removed.
	(canon_value_cmp): Compare uids.
	(variable_post_merge_New_vals): Print uids.
	(vt_add_function_parameters): Adjust.
	(vt_initialize): Reset table.  Adjust.

From-SVN: r156468
2010-02-03 15:00:33 +00:00
Richard Guenther 831b9ef8f0 tree-dump.c (dump_option_value_in): Add TDF_NOUID.
2009-11-30  Richard Guenther  <rguenther@suse.de>

	* tree-dump.c (dump_option_value_in): Add TDF_NOUID.
	* tree-pass.h (TDF_NOUID): Likewise.
	* print-rtl.c: Include tree-pass.h.
	(print_mem_expr): Pass dump_flags.
	(print_rtx): Likewise.
	* print-tree.c: Include tree-pass.h.
	(print_node_brief): Handle TDF_NOUID.
	(print_node): Likewise.
	* tree-pretty-print.c (dump_decl_name): Likewise.
	(dump_generic_node): Likewise.
	* Makefile.in (print-rtl.o, print-tree.o): Add $(TREE_PASS_H)
	dependency.

From-SVN: r154775
2009-11-30 10:36:54 +00:00
Jakub Jelinek 8a2bbeef66 print-rtl.c (print_rtx): When printing newline, append print_rtx_head and indentation after the newline.
* print-rtl.c (print_rtx): When printing newline, append
	print_rtx_head and indentation after the newline.

From-SVN: r154651
2009-11-25 21:18:37 +01: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
Ben Elliston 09e881c9e2 extend.texi (Named Address Spaces): New section.
2009-10-26  Ben Elliston  <bje@au.ibm.com>
	    Michael Meissner  <meissner@linux.vnet.ibm.com>
	    Ulrich Weigand  <uweigand@de.ibm.com>

	* doc/extend.texi (Named Address Spaces): New section.
	* coretypes.h (addr_space_t): New type.
	(ADDR_SPACE_GENERIC): New define.
	(ADDR_SPACE_GENERIC_P): New macro.

	* doc/tm.texi (Named Address Spaces): New section.
	(TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Document.
	(TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Document.
	(TARGET_ADDR_SPACE_SUBSET_P): Document.
	(TARGET_ADDR_SPACE_CONVERT): Document.
	* target.h (struct gcc_target): Add addr_space substructure.
	* target-def.h (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Define.
	(TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Likewise.
	(TARGET_ADDR_SPACE_SUBSET_P): Likewise.
	(TARGET_ADDR_SPACE_CONVERT): Likewise.
	(TARGET_ADDR_SPACE_HOOKS): Likewise.
	(TARGET_INITIALIZER): Initialize addr_space hooks.
	* targhooks.c (default_addr_space_legitimate_address_p): New function.
	(default_addr_space_legitimize_address): Likewise.
	(default_addr_space_subset_p): Likewise.
	(default_addr_space_convert): Likewise.
	* targhooks.h (default_addr_space_legitimate_address_p): Add prototype.
	(default_addr_space_legitimize_address): Likewise.
	(default_addr_space_subset_p): Likewise.
	(default_addr_space_convert): Likewise.

	* doc/rtl.texi (MEM_ADDR_SPACE): Document.
	* rtl.h (mem_attrs): Add ADDRSPACE memory attribute.
	(MEM_ADDR_SPACE): New macro.
	* emit-rtl.c (get_mem_attrs): Add ADDRSPACE argument and set
	address space memory attribute.
	(mem_attrs_htab_hash): Handle address space memory attribute.
	(mem_attrs_htab_eq): Likewise.
	(set_mem_attributes_minus_bitpos): Likewise.
	(set_mem_alias_set): Likewise.
	(set_mem_align): Likewise.
	(set_mem_expr): Likewise.
	(set_mem_offset): Likewise.
	(set_mem_size): Likewise.
	(adjust_address_1): Likewise.
	(offset_address): Likewise.
	(widen_memoy_address): Likewise.
	(get_spill_slot_decl): Likewise.
	(set_mem_attrs_for_spill): Likewise.
	(set_mem_addr_space): New function.
	* emit-rtl.h (set_mem_addr_space): Add prototype.
	* print-rtl.c (print_rtx): Print address space memory attribute.
	* expr.c (expand_assignment): Set address space memory attribute
	of generated MEM RTXes as appropriate.
	(expand_expr_real_1): Likewise.
	* cfgexpand.c (expand_debug_expr): Likewise.
	* tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise.

	* tree.h (struct tree_base): Add address_space bitfield.  Reduce
	size of "spare" bitfield.
	(TYPE_ADDR_SPACE): New macro.
	(ENCODE_QUAL_ADDR_SPACE): Likewise.
	(DECODE_QUAL_ADDR_SPACE): Likewise.
	(CLEAR_QUAL_ADDR_SPACE): Likewise.
	(KEEP_QUAL_ADDR_SPACE): Likewise.
	(TYPE_QUALS): Encode type address space.
	(TYPE_QUALS_NO_ADDR_SPACE): New macro.
	* tree.c (set_type_quals): Set type address space.
	(build_array_type): Inherit array address space from element type.
	* print-tree.c (print_node_brief): Print type address space.
	(print_node): Likewise.
	* tree-pretty-print.c (dump_generic_node): Likewise.

	* explow.c (memory_address): Rename to ...
	(memory_address_addr_space): ... this.  Add ADDRSPACE argument.
	Use address-space aware variants of memory address routines.
	* recog.c (memory_address_p): Rename to ...
	(memory_address_addr_space_p): ... this.  Add ADDSPACE argument.
	Use address-space aware variants of memory address routines.
	(offsettable_address_p): Rename to ...
	(offsettable_address_addr_space_p): ... this.  Add ADDRSPACE argument.
	Use address-space aware variants of memory address routines.
	* reload.c (strict_memory_address_p): Rename to ...
	(strict_memory_address_addr_space_p): ... this.  Add ADDSPACE argument.
	Use address-space aware variants of memory address routines.
	(maybe_memory_address_p): Rename to ...
	(maybe_memory_address_addr_space_p): ... this.  Add ADDSPACE argument.
	Use address-space aware variants of memory address routines.
	* expr.h (memory_address_addr_space): Add prototype.
	(memory_address): Define as macro.
	* recog.h (memory_address_addr_space_p): Add prototype.
	(memory_address_p): Define as macro.
	(offsettable_address_addr_space_p): Add prototype.
	(offsettable_address_p): Define as macro.
	(strict_memory_address_addr_space_p): Add prototype.
	(strict_memory_address_p): Define as macro.

	* combine.c (find_split_point): Use address-space aware variants
	of memory address routines.
	* emit-rtl.c (operand_subword): Likewise.
	(change_address_1): Likewise.
	(adjust_address_1): Likewise.
	(offset_address): Likewise.
	* expr.c (emit_move_insn): Likewise.
	(expand_assignment): Likewise.
	(expand_expr_real_1): Likewise.
	* recog.c (verify_changes): Likewise.
	(general_operand): Likewise.
	(offsettable_memref_p): Likewise.
	(offsettable_nonstrict_memref_p): Likewise.
	(constrain_operands): Likewise.
	* reload.c (get_secondary_mem): Likewise.
	(find_reloads_toplev): Likewise.
	(find_reloads_address): Likewise.
	(find_reloads_subreg_address): Likewise.
	* reload1.c (reload): Likewise.
	* rtlhooks.c (gen_lowpart_if_possible): Likewise.
	* rtl.h (address_cost): Add ADDRSPACE argument.
	* rtlanal.c (address_cost): Add ADDRSPACE argument.  Use address-space
	aware variant of memory address routines.
	* loop-invariant.c (create_new_invariant): Update address_cost call.
	* tree-ssa-loop-ivopts.c (computation_cost): Likewise.
	* fwprop.c (should_replace_address): Add ADDRSPACE argument.
	Use address-space aware variant of memory address routines.
	(propagate_rtx_1): Update call to should_replace_address.
	* tree-flow.h (multiplier_allowed_in_address_p): Add ADDRSPACE
	argument.
	* tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Add
	ADDRSPACE argument.  Use per-address-space instead of global cache.
	Use address-space aware variant of memory address routines.
	(get_address_cost): Likewise.
	(get_computation_cost_at): Update calls.
	* tree-ssa-address.c (valid_mem_ref_p): Add ADDRSPACE argument.
	Use address-space aware variant of memory address routines.
	(create_mem_ref_raw): Update call to valid_mem_ref_p.
	(most_expensive_mult_to_index): Update call to
	multiplier_allowed_in_address_p.

	* dwarf2out.c (modified_type_die): Output DW_AT_address_class
	attribute to indicate named address spaces.

	* varasm.c (get_variable_section): DECLs in named address spaces
	cannot be "common".

	* reload.c (find_reloads_address): Do not use LEGITIMIZE_RELOAD_ADDRESS
	for addresses in a non-generic address space.

	* expr.c (emit_block_move_hints): Do not use libcalls for
	memory in non-generic address spaces.
	(clear_storage_hints): Likewise.
	(expand_assignment): Likewise.

	* fold-const.c (operand_equal_p): Expressions refering to different
	address spaces are not equivalent.

	* rtl.c (rtx_equal_p_cb): MEMs refering to different address
	spaces are not equivalent.
	(rtx_equal_p): Likewise.
	* cse.c (exp_equiv_p): Likewise.
	* jump.c (rtx_renumbered_equal_p): Likewise.
	* reload.c (operands_match_p): Likewise.

	* alias.c (nonoverlapping_memrefs_p): MEMs refering to different
	address spaces may alias.
	(true_dependence): Likewise.
	(canon_true_dependence): Likewise.
	(write_dependence_p): Likewise.

	* dse.c (canon_address): Handle named address spaces.
	* ifcvt.c (noce_try_cmove_arith): Likewise.

	* tree.def (ADDR_SPACE_CONVERT_EXPR): New tree code.
	* expr.c (expand_expr_real_2): Expand ADDR_SPACE_CONVERT_EXPR.
	* convert.c (convert_to_pointer): Generate ADDR_SPACE_CONVERT_EXPR
	to handle conversions between different address spaces.
	* fold-const.c (fold_convert_loc): Likewise.
	(fold_unary_loc): Handle ADDR_SPACE_CONVERT_EXPR.
	* tree-pretty-print.c (dump_generic_node): Likewise.
	* gimple-pretty-print.c (dump_unary_rhs): Likewise.
	* tree-cfg.c (verify_gimple_assign_unary): Likewise.
	* tree-inline.c (estimate_operator_cost): Likewise.
	* tree-ssa.c (useless_type_conversion_p): Conversions between pointers
	to different address spaces are not useless.

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

From-SVN: r153572
2009-10-26 21:55:59 +00:00
Alexandre Oliva da1e150327 print-rtl.c (print_rtx): Print locators in asm_operands and asm_input.
* print-rtl.c (print_rtx): Print locators in asm_operands
and asm_input.

From-SVN: r152928
2009-10-17 06:28:58 +00:00
Jakub Jelinek e4fb38bd17 re PR target/41693 (RTL Check Failure in expand_debug_expr, at cfgexpand.c:2371)
PR target/41693
	* rtl.h (DEBUG_EXPR_TREE_DECL): Define.
	* sched-vis.c (print_value): Use it.
	* cselib.c (cselib_hash_rtx): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* cfgexpand.c (expand_debug_rtx): Likewise.
	* var-tracking.c (vt_expand_loc_callback): Likewise.

From-SVN: r152707
2009-10-13 15:56:07 +02:00
Alexandre Oliva 0ca5af51ab re PR debug/41343 (sysdeps/ieee754/dbl-64/dosincos.c from glibc causes excessive memory use)
gcc/ChangeLog:
PR debug/41343
PR debug/41447
PR debug/41264
PR debug/41338
* tree.def (DEBUG_EXPR_DECL): New.
* rtl.def (DEBUG_EXPR): New.
* gengtype.c (adjust_field_rtx_def): Handle it.
* tree-ssa.c (propagate_var_def_into_debug_stmts): Rename to...
(insert_debug_temp_for_var_def): ... this.  Drop support for
moving.  Take iterator for def stmt; insert debug stmt before it.
Scan early for use count and kind in debug stmts.
(propagate_defs_into_debug_stmts): Rename to...
(insert_debug_temps_for_defs): ... this.  Likewise.
* tree.h (DEBUG_TEMP_UID): New.
* tree.c (next_debug_decl_uid): New.
(make_node_stat): Count debug decls separately.
(copy_node_stat): Likewise.
* cfgexpand.c (expand_debug_expr): Handle DEBUG_EXPR_DECL.
* var-tracking.c (dv_is_decl_p): Recognize it.
(VALUE_RECURSED_INTO): Apply to DEBUG_EXPRs too.
(track_expr_p): Track expanded DEBUG_EXPR_DECLs.
(vt_expand_loc_callback): Expand DEBUG_EXPRs.
(emit_note_insn_var_location): Don't emit notes for DEBUG_EXPR_DECLs.
* cselib.c (rtx_equal_for_cselib_p): Handle DEBUG_EXPR.
(cselib_hash_rtx): Likewise.
(cselib_expand_value_rtx_1): Use callback for DEBUG_EXPR.
* tree-ssa-operands.c (get_expr_operands): Skip DEBUG_EXPR_DECLs in
debug bind stmts.
* emit-rtl.c (verify_rtx_sharing): Handle DEBUG_EXPR and VALUE.
(copy_rtx_if_shared_1, reset_used_flags, set_used_flags): Likewise.
* rtl.c (copy_rtx): Likewise.
(rtx_equal_p_cb, rtx_equal_p): Handle DEBUG_EXPR.
* print-rtl.c (print_rtx): Likewise.
* sched-vis.c (print_value): Likewise.
(print_insn): Handle DEBUG_EXPR_DECL.
* tree-dump.c (dequeue_and_dump): Likewise.
* tree-pretty-print.c (dump_decl_name, dump_generic_node): Likewise.
* gimple-iterator (gsi_replace): Check for same lhs.
(gsi_remove): Insert debug temps.
* tree-ssa-loop-im.c (rewrite_reciprocal): Replace with same lhs.
(move_computations_stmt): Drop explicit propagation into debug stmts.
(rewrite_bittest): Likewise.  Use gsi_remove for propagation.
* tree-ssa-reassoc.c (rewrite_expr_tree, linearize_expr): Likewise.
* tree-ssa-sink.c (statement_sink_location): Likewise.
* tree-ssa-forwprop (forward_propagate_addr_expr): Likewise.
* tree-ssanames.c (release_ssa_name): Adjust for rename.
* tree-flow.h: Likewise.
* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Don't mark
debug temps without values.
(eliminate_unnecessary_stmts): Don't discard just-inserted
debug stmts.
gcc/testsuite/ChangeLog:
PR debug/41343
PR debug/41447
PR debug/41264
PR debug/41338
* gcc.dg/guality/pr41447-1.c: New.
* gcc.dg/debug/pr41264-1.c: New.
* gcc.dg/debug/pr41343-1.c: New.

From-SVN: r152681
2009-10-12 18:58:38 +00:00
Jakub Jelinek 137a05d3c0 print-rtl.c (print_rtx): Use JUMP_LABEL (in_rtx) instead of XEXP (in_rtx, 8).
* print-rtl.c (print_rtx): Use JUMP_LABEL (in_rtx) instead of
	XEXP (in_rtx, 8).

From-SVN: r151643
2009-09-11 21:39:10 +02:00
Richard Henderson 68bcdeed11 * print-rtl.c (print_rtx): Fix JUMP_LABEL index.
From-SVN: r151619
2009-09-10 14:46:31 -07: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
Richard Guenther 55b34b5fd1 tree-ssa-alias.h (refs_may_alias_p_1): Declare.
2009-07-14  Richard Guenther  <rguenther@suse.de>
	Andrey Belevantsev <abel@ispras.ru>

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

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

From-SVN: r149624
2009-07-14 09:59:18 +00:00
Shujing Zhao 481683e1d5 alias.c: Use REG_P...
2009-06-22  Shujing Zhao  <pearly.zhao@oracle.com>

	* alias.c: Use REG_P, MEM_P, CONST_INT_P, LABEL_P, CALL_P, NOTE_P and
	JUMP_TABLE_DATA_P predicates where applicable.
	* auto-inc-dec.c: Ditto.
	* builtins.c: Ditto.
	* caller-save.c: Ditto.
	* calls.c: Ditto.
	* cfgcleanup.c: Ditto.
	* cfglayout.c: Ditto.
	* cfgrtl.c: Ditto.
	* combine.c: Ditto.
	* combine-stack-adj.c: Ditto.
	* cse.c: Ditto.
	* cselib.c: Ditto.
	* dbxout.c: Ditto.
	* df-scan.c: Ditto.
	* dse.c: Ditto.
	* dwarf2asm.c: Ditto.
	* dwarf2out.c: Ditto.
	* emit-rtl.c: Ditto.
	* except.c: Ditto.
	* explow.c: Ditto.
	* expmed.c: Ditto.
	* expr.c: Ditto.
	* final.c: Ditto.
	* function.c: Ditto.
	* fwprop.c: Ditto.
	* gcse.c: Ditto.
	* genpreds.c: Ditto.
	* genrecog.c: Ditto.
	* ifcvt.c: Ditto.
	* ira-costs.c: Ditto.
	* ira-lives.c: Ditto.
	* jump.c: Ditto.
	* loop-iv.c: Ditto.
	* lower-subreg.c: Ditto.
	* modulo-sched.c: Ditto.
	* optabs.c: Ditto.
	* postreload.c: Ditto.
	* print-rtl.c: Ditto.
	* recog.c: Ditto.
	* reginfo.c: Ditto.
	* regmove.c: Ditto.
	* reload1.c: Ditto.
	* reload.c: Ditto.
	* reorg.c: Ditto.
	* rtlanal.c: Ditto.
	* rtl.c: Ditto.
	* sched-vis.c: Ditto.
	* sdbout.c: Ditto.
	* sel-sched-ir.c: Ditto.
	* simplify-rtx.c: Ditto.
	* targhooks.c: Ditto.
	* var-tracking.c: Ditto.
	* vmsdbgout.c: Ditto.

From-SVN: r148786
2009-06-22 10:29:13 +00:00
Alexandre Oliva 9e74b7d2a4 print_rtl (print_rtx): Don't print modes in EXPR_LISTs and INSN_LISTs that are out of the REG_NOTE range.
* print_rtl (print_rtx): Don't print modes in EXPR_LISTs and
INSN_LISTs that are out of the REG_NOTE range.

From-SVN: r148091
2009-06-02 17:51:00 +00:00
Alexandre Oliva 2aa7c49bff common.opt (fdump-unnumbered-links): New.
* common.opt (fdump-unnumbered-links): New.
* doc/invoke.texi (-fdump-unnumbered-links): Document it.
* print-rtl.c (flag_dump_unnumbered_links): New.
(print_rtx): Test it.

From-SVN: r148074
2009-06-02 08:07:13 +00:00
Jakub Jelinek 66647d441f Update Copyright years for files modified in 2008 and/or 2009.
From-SVN: r144324
2009-02-20 16:20:38 +01:00
Doug Kwan 3d57d7cee7 dwarf2asm.c (dw2_assemble_integer): Cast to unsigned HOST_WIDE_INT for hex printing.
2008-04-15  Doug Kwan  <dougkwan@google.com>

	* dwarf2asm.c (dw2_assemble_integer): Cast to unsigned HOST_WIDE_INT
	for hex printing.
	* tree-pretty-print.c (dump_generic_node): Ditto.
	* final.c (output_addr_const): Ditto.
	* dwarf2out.c (output_cfi): Ditto.
	* c-pretty-print.c (pp_c_integer_constant): Ditto.
	* print-rtl.c (print_rtx): Ditto.
	* print-tree.c (print_node_brief, print_node): Ditto.
	* c-common.c (match_case_to_enum_1): Ditto.
	* sched-vis.c (print_value): Ditto.
	* config/i386/i386.c (print_operand): Cast to long unsigned int
	for hex printing.

From-SVN: r134331
2008-04-15 19:56:20 +00:00
Hans-Peter Nilsson cf7c4aa6af Divide REG_LABEL notes into REG_LABEL_OPERAND and REG_LABEL_TARGET.
* doc/rtl.texi (Insns): Specify when a label_ref makes a jump_insn.
	Similar for what label_refs can go in the JUMP_TARGET field.  Split
	REG_LABEL documentation into REG_LABEL_TARGET and REG_LABEL_OPERAND.
	* reload.c (find_reloads): Generate REG_LABEL_OPERAND, not
	REG_LABEL when replacing an operand with a LABEL_REF for a
	non-jump insn.
	(subst_reloads): When replacing a LABEL_REG with a register,
	instead of generating a REG_LABEL note, assert that there already
	is one or that the label is a known target for the insn.
	* rtlanal.c (computed_jump_p): Instead of looking for a REG_LABEL
	note, check the JUMP_LABEL field.  Remove "else" after return.
	* reorg.c (emit_delay_sequence): Replace case for REG_LABEL with
	cases for REG_LABEL_OPERAND and REG_LABEL_TARGET.
	(fill_slots_from_thread): Handle both REG_LABEL_OPERAND and
	REG_LABEL_TARGET notes, including the JUMP_TARGET field on JUMP_P
	insns.  Iterate over all notes; don't assume there's only one.
	* cse.c (recorded_label_ref): Adjust comment to refer to
	REG_LABEL_OPERAND.
	(cse_extended_basic_block): Do LABEL_REF check for all INSN_P
	insns, not just NONJUMP_INSN_P.
	(check_for_label_ref): For JUMP_P insns, check that the LABEL_REF
	isn't a jump target.
	* jump.c (rebuild_jump_labels): Adjust head comment.
	(init_label_info): Ditto.  Remove REG_LABEL_OPERAND notes only;
	don't reset REG_LABEL_TARGET notes, including the JUMP_LABEL field.
	(mark_all_labels): For JUMP_P insns without a target, check if the
	the target is noted on the previous nonjump insn.
	(mark_jump_label_1): New function, guts from mark_jump_label.
	<case IF_THEN_ELSE>: Handle first operand as a non-target when
	marking jump target labels.
	<case LABEL_REF>: Adjust for whether to generate a
	REG_LABEL_TARGET or a REG_LABEL_OPERAND note.
	For 'E' format rtl, iterate in descending element order.
	(delete_related_insns): Handle both REG_LABEL_TARGET and
	REG_LABEL_OPERAND notes.  For JUMP_P insns with labels with zero
	reference count, delete and fallthrough.  Move finding-next-
	non-deleted insn last in the function.  Look at all INSN_P insns
	for REG_LABEL_OPERAND notes.
	(redirect_jump_2): Assert that OLABEL equals the old JUMP_LABEL of
	JUMP.
	* print-rtl.c (print_rtx): For JUMP_P insns and a non-NULL
	JUMP_LABEL, output the INSN_UID of it.
	* gcse.c: Adjust comments as appropriate to say REG_LABEL_OPERAND
	and/or REG_LABEL_TARGET.
	(add_label_notes): Only add REG_LABEL_OPERAND notes.  Put in line
	with jump.c copy by only adding notes for labels actually
	referenced in the insn.
	* emit-rtl.c (try_split): Don't assume only NONJUMP_INSN_P need
	usage count increment; handle all INSN_P trial insns.
	(emit_copy_of_insn_after): Change to not copy REG_LABEL_OPERAND
	notes.
	* rtl.h (struct rtx_def) <volatil>: Adjust to mention
	REG_LABEL_TARGET and REG_LABEL_OPERAND.
	(LABEL_REF_NONLOCAL_P): Allow REG_LABEL_TARGET and
	REG_LABEL_OPERAND.
	* combine.c (distribute_notes): Adjust for REG_LABEL_TARGET on
	JUMP_P insns and REG_LABEL_OPERAND everywhere.
	* sched-rgn.c (is_cfg_nonregular): Check for REG_LABEL_OPERANDS
	on all INSN_P insns.
	* reg-notes.def (LABEL_TARGET, LABEL_OPERAND): Split from LABEL.
	* cfgrtl.c (delete_insn): Adjust to handle REG_LABEL_TARGET and
	REG_LABEL_OPERAND notes.
	* reload1.c (calculate_needs_all_insns): Adjust comments.
	(set_label_offsets): Adjust to look for REG_LABEL_OPERAND notes.
	* config/alpha/alpha.md (split for load of an address into a
	four-insn sequence on Unicos/Mk): Adjust to use
	REG_LABEL_OPERAND.
	* config/sh/sh.md (sh_reorg, final_prescan_insn): Ditto.

From-SVN: r128287
2007-09-09 04:41:58 +00:00
Ian Lance Taylor bb0500b075 tree-pretty-print.c (dump_decl_name): Cast LABEL_DECL_UID to int when printing.
* tree-pretty-print.c (dump_decl_name): Cast LABEL_DECL_UID to int
	when printing.
	(dump_generic_node): Likewise.
	* print-rtl.c (print_decl_name): Likewise.
	* print-tree.c (print_node_brief): Likewise.
	(print_node): Likewise.
	* Makefile.in (RTL_BASE_H): Add alias.h.
	(TREE_H): Likewise.

From-SVN: r128175
2007-09-06 05:59:15 +00:00
Kenneth Zadeck 297e9b46f3 cfg.c (dump_flow_info): Change to also print entry and exit block info.
2007-08-30  Kenneth Zadeck <zadeck@naturalbridge.com>

	* cfg.c (dump_flow_info): Change to also print entry and exit
	block info.
	* print-rtl.c (print_rtl_single): Allow to print rtl with
	-fdump-unnumbered.

From-SVN: r127932
2007-08-30 17:43:04 +00:00
Ian Lance Taylor 4862826d55 alias.h (alias_set_type): Define new type.
./:	* alias.h (alias_set_type): Define new type.
	(ALIAS_SET_MEMORY_BARRIER): Use it.
	* rtl.h: Include alias.h.
	(struct mem_attrs): Use alias_set_type.
	* tree.h: Include alias.h
	(struct tree_type): Use alias_set_type.
	(struct tree_struct_field_tag): Likewise.
	(struct tree_decl_common): Likewise.
	* alias.c (struct alias_set_entry): Use alias_set_type.
	(get_alias_set_entry, alias_set_subset_of): Likewise.
	(alias_sets_conflict_p): Likewise.
	(alias_sets_must_conflict_p): Likewise.
	(objects_must_conflict_p): Likewise.
	(get_alias_set, new_alias_set): Likewise.
	(record_alias_subset, record_component_aliases): Likewise.
	(varargs_set, frame_set): Change to alias_set_type.
	(get_varargs_alias_set): Use alias_set_type.
	(get_frame_alias_set): Likewise.
	* builtins.c (setjmp_alias_set): Change to alias_set_type.
	* dse.c (struct store_info): Use alias_set_type.
	(struct read_info, struct clear_alias_mode_holder): Likewise.
	(clear_alias_set_lookup, canon_address): Likewise.
	(record_store, check_mem_read_rtx): Likewise.
	(dse_record_singleton_alias_set): Likewise.
	(dse_invalidate_singleton_alias_set): Likewise.
	* emit-rtl.c (get_mem_attrs): Likewise.
	(set_mem_attributes_minus_bitpos): Likewise.
	(set_mem_alias_set): Likewise.
	* expr.c (store_constructor_field, store_field): Likewise.
	* gimplify.c (struct gimplify_init_ctor_preeval_data): Likewise.
	* langhooks.c (lhd_get_alias_set): Likewise.
	* langhooks-def.h (lhd_get_alias_set): Likewise.
	* reload1.c (alter_reg): Likewise.
	* tree-flow.h (struct fieldoff): Likewise.
	* tree-ssa-alias.c (struct alias_map_d): Likewise.
	(may_alias_p, get_smt_for, create_sft): Likewise.
	* tree-ssa-alias-warnings.c (nonstandard_alias_types_p): Likewise.
	* tree-ssa-structalias.c (set_uids_in_ptset): Likewise.
	(merge_smts_into): Likewise.
	* varasm.c (const_alias_set): Likewise.
	* c-common.c (strict_aliasing_warning): Likewise.
	(c_common_get_alias_set): Likewise.
	* dse.h (dse_record_singleton_alias_set): Update declaration.
	(dse_invalidate_singleton_alias_set): Likewise.
	* emit-rtl.h (set_mem_alias_set): Likewise.
	* c-common.h (c_common_get_alias_set): Likewise.
	* print-rtl.c (print_rtx): Cast MEM_ALIAS_SET when printing it.
	* print-tree.c (print_node): Likewise.
	* config/alpha/alpha.c (alpha_sr_alias_set): Change to
	alias_set_type.
	(alpha_setup_incoming_varargs): Use alias_set_type.
	* config/i386/i386.c (setup_incoming_varargs_64): Use
	alias_set_type.
	(setup_incoming_varargs_ms_64): Likewise.
	(ix86_GOT_alias_set): Likewise.
	* config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise.
	* config/rs6000/rs6000.c (setup_incoming_varargs): Likewise.
	(set): Change to alias_set_type.
	(get_TOC_alias_set): Use alias_set_type.
	* config/rs6000/rs6000-protos.h (get_TOC_alias_set): Update
	declaration.
	* config/sh/sh.c (sh_builtin_saveregs): Use alias_set_type.
	* config/sparc/sparc.c (sparc_sr_alias_set): Change to
	alias_set_type.
	(struct_value_alias_set): Likewise.
	* Makefile.in (GTFILES): Add $(srcdir)/alias.h.
ada/:
	* misc.c (gnat_get_alias_set): Change return type to
	alias_set_type.
cp/:
	* cp-objcp-common.c (cxx_get_alias_set): Change return type to
	alias_set_type.
	* cp/cp-tree.h (cxx_get_alias_set): Update declaration.
fortran:/
	* f95-lang.c (gfc_get_alias_set): Change return type to
	alias_set_type.

From-SVN: r127362
2007-08-11 17:21:56 +00:00
Nick Clifton 9dcd6f09a3 Change copyright header to refer to version 3 of the GNU General Public License and to point readers at the COPYING3 file and the FSF's license web page.
From-SVN: r126948
2007-07-26 08:37:01 +00:00
Kaveh R. Ghazi f7d504c227 cfglayout.c (insn_scope, insn_line): Constify.
* cfglayout.c (insn_scope, insn_line): Constify.
	* emit-rtl.c (const_int_htab_hash, const_int_htab_eq,
	const_double_htab_hash, const_double_htab_eq,
	mem_attrs_htab_hash): Likewise.
	* loop-iv.c (biv_eq): Likewise.
	* print-rtl.c (print_rtx, print_decl_name, print_mem_expr,
	print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range,
	debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl):
	Likewise. 
	* rtl-error.c (location_for_asm, diagnostic_for_asm,
	error_for_asm, warning_for_asm, _fatal_insn,
	_fatal_insn_not_found): Likewise. 
	* rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat,
	rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1,
	rtl_check_failed_type2, rtl_check_failed_code1,
	rtl_check_failed_code2, rtl_check_failed_code_mode,
	rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise.
	* rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1,
	rtl_check_failed_type2, rtl_check_failed_code1,
	rtl_check_failed_code2, rtl_check_failed_code_mode,
	rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND,
	SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs,
	shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p,
	get_pool_mode, insn_line, insn_file, simplify_replace_rtx,
	mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p,
	rtx_unstable_p, get_integer_term, get_related_value,
	offset_within_block_p, reg_mentioned_p, count_occurrences,
	reg_referenced_p, reg_used_between_p, no_labels_between_p,
	single_set_2, multiple_sets, set_noop_p, refers_to_regno_p,
	reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p,
	find_reg_note, find_regno_note, find_reg_equal_equiv_note,
	find_constant_src, find_reg_fusage, find_regno_fusage,
	pure_call_p, remove_note, side_effects_p, volatile_refs_p,
	volatile_insn_p, may_trap_p, may_trap_after_code_motion_p,
	may_trap_or_fault_p, inequality_comparisons_p, tablejump_p,
	computed_jump_p, auto_inc_p, in_expr_list_p,
	remove_node_from_expr_list, loc_mentioned_in_p,
	label_is_jump_target_p, reversed_comparison_code_parts,
	debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find,
	print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single,
	print_inline_rtx): Likewise.
	* rtlanal.c (covers_regno_p, covers_regno_no_parallel_p,
	computed_jump_p_1, nonzero_bits1, rtx_unstable_p,
	rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p,
	get_integer_term, get_related_value, offset_within_block_p,
	count_occurrences, reg_mentioned_p, no_labels_between_p,
	reg_used_between_p, reg_referenced_p, single_set_2,
	multiple_sets, set_noop_p, refers_to_regno_p,
	reg_overlap_mentioned_p, dead_or_set_p,
	covers_regno_no_parallel_p, covers_regno_p,
	dead_or_set_regno_p, find_reg_note, find_regno_note,
	find_reg_equal_equiv_note, find_constant_src, find_reg_fusage,
	find_regno_fusage, pure_call_p, remove_note, in_expr_list_p,
	remove_node_from_expr_list, volatile_insn_p, volatile_refs_p,
	side_effects_p, may_trap_p_1, may_trap_p,
	may_trap_after_code_motion_p, may_trap_or_fault_p,
	inequality_comparisons_p, tablejump_p, computed_jump_p_1,
	computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb,
	subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise.
	* simplify-rtx.c (neg_const_int, plus_minus_operand_p,
	mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p):
	Likewise. 
	* toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm,
	warning_for_asm): Likewise.
	* tree.h (print_rtl): Likewise.
	* varasm.c (get_pool_mode): Likewise.

From-SVN: r126922
2007-07-25 18:33:26 +00:00
Caroline Tice 62760ffd15 Add ability to track uninitialized variables, and mark uninitialized variables in the Dwarf debug info.
Add ability to track uninitialized variables, and mark uninitialized
variables in the Dwarf debug info.  Controlled by compile option
-fvar-tracking-uninit

From-SVN: r126630
2007-07-13 16:11:15 -07:00
Jan Hubicka 9dbe7947ab invoke.texi (-fdump-unnumbered): Update docs when line number notes are gone.
* doc/invoke.texi (-fdump-unnumbered): Update docs when line number
	notes are gone.
	* print-rtl.c (flag_dump_unnumbered): Update comments.
	(print_rtl): Fix my previous change.
	* emit-rtl.c (emit_note_before, emit_note_after): Clear out note
	specific data.

From-SVN: r125026
2007-05-24 14:21:14 +00:00
Jan Hubicka a38e7aa544 gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER...
* gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of
	NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	* ddg.c (create_ddg): LIkewise.
	* final.c (final): Remove hunk moving line numbernotes around since
	they are no longer present at this stage.
	(final_scan_insn): Use NOTE_KIND instead of
	NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	(output_asm_label): Likewise.
	* reorg.c (dbr_schedule): Likewise.
	* haifa-sched.c (unlink_other_notes): Likewise.
	* mode-switching.c (optimize_mode_switching): Likewise.
	* graph.c (start_bb): Likewise.
	* rtl.def (NOTE): Update description.
	* jump.c (squeeze_notes): Delete.
	(mark_jump_label): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use
	NOTE_INSN_BASIC_BLOCK_P when possible.
	* ifcvt.c (dead_or_predicable): Remove call of squeeze_notes.
	* dwarf2out.c (gen_label_die): Use NOTE_KIND instead of
        NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	(dwarf2out_var_location): Likewise.
	* cfgbuild.c (make_edges): Likewise.
	(find_basic_blocks_1): Likewise.
	* function.c (reorder_blocks_1): Likewise.
	(epilogue_done): Likewise.
	(reposition_prologue_and_epilogue_notes): Likewise.
	* print-rtl.c (print_rtx): Likewise; drop code for printing line number
	notes.
	(print_rtl): Likewise.
	(print_rtl_single): Likewise.
	* gcse.c (insert_insn_start_bb): Likewise.
	* alias.c (init_alias_analysis): Likewise.
	* calls.c (fixup_tail_calls): Likewise.
	* except.c (sjlj_emit_function_enter): Likewise.
	* emit-rtl.c (add_insn_after): Likeiwse.
	(emit_label_before): Likewise.
	(emit_label_after): Likewise.
	(emit_note_before, emit_note_after, emit_note): Update
	parameter to be enum insn_note; do not deal with source
	files.
	* cfgcleanup.c (merge_blocks_move_predecessor_nojumps):
	Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P
	when possible.
	(merge_blocks_move_successor_nojumps): Simplify now when
	we don't have BLOCK notes.
	(try_optimize_cfg): Likewise.
	* cfglayout.c (skip_insns_after_block): Likewise.
	(record_effective_endpoints): Likewise.
	(duplicate_insn_chain): Likewise.
	* varasm.c (output_constant_pool_1): Likewise.
	* sched-deps.c (sched_analyze): Likewise.
	* rtl.c (NOTE_INSN_MAX_isnt_negative_adjust_NOTE_INSN_BIAS):
	Exterminate.
	(note_insn_name): Simplify now when NOTE_INSN_BIAS is gone.
	* rtl.h (NOTE_SOURCE_LOCATION, NOTE_EXPANDED_LOCATION): Exterminate.
	(SET_INSN_DELETED): Simplify.
	(NOTE_LINE_NUMBER): Exterminate.
	(NOTE_LINE_KIND): New.
	(NOTE_INSN_BASIC_BLOCK_P): Update.
	(enum insn_note): Simplify.
	(GET_NOTE_INSN_NAME) Simplify.
	(emit_note_before, emit_note_after, emit_note): Update prototype.
	(squeeze_notes): Remove.
	* sched-int.h (NOTE_NOT_BB_P): Update.
	* resource.c (mark_target_live_regs): Update.
	* sched-rgn.c (debug_dependencies): Update.
	* sched-vis.c (print_insn): Update.
	* config/alpha/alpha.c (alpha_handle_trap_shadows): Update.
	* config/i386/i386.c (ix86_output_function_epilogue): Update.
	* config/sh/sh.c (sh_adjust_unroll_max): Function dead since gcc 4.0.0.
	(TARGET_ADJUST_UNROLL_MAX): Likewise.
	(split_branches): Update.
	(sh_optimize_target_register_callee_saved): Remove hunk dead since gcc
	4.0.0.
	(sh_adjust_unroll_max): Exterminate.
	* config/c4x/c4x.c (c4x_reorg): Use SET_INSN_DELETED.
	* config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Likewise.
	(m68hc11_reorg): Likewise.
	* config/ia64/ia64.c (emit_insn_group_barriers): Update.
	(emit_predicate_relation_info): Update.
	(process_for_unwind_directive): Update.
	* config/rs6000/rs6000.c (rs6000_output_function_epilogue): Update.
	(output_call): Update.
	* config/pa/pa.c (output_lbranch): Update.
	(output_millicode_call): Update.
	(output_call): Update.
	(pa_combine_instructions): Update.
	* config/mips/mips.c (mips16_gp_pseudo_reg): Update.
	* config/bfin/bfin.c (gen_one_bundle): Update.
	* cfgrtl.c (can_delete_note_p): Update.
	(delete_insn): Update.
	(rtl_merge_blocks): Update.
	(commit_one_edge_insertion): Update.
	(rtl_verify_flow_info): Update.
	* stmt.c (expand_case): Do not call squeeze_notes.

From-SVN: r124895
2007-05-21 06:19:50 +00:00
Jan Hubicka ef950eba66 extended.texi (__builtin_expect): We no longer require second argument to be constant.
* extended.texi (__builtin_expect): We no longer require second argument
	to be constant.
	* gengtype.c (adjust_field_rtx_def): Drop NOTE_INSN_EXPECTED_VALUE.
	* builtins.c (expand_builtin_expect): Simplify.
	(expand_builtin_expect_jump): Kill.
	* final.c (final_scan_insn): Do not skip the removed notes.
	* insn-notes.def (LOOP_BEG, LOOP_END, REPEATED_LINE_NUMBER,
	EXPECTED_VALUE): Remove.
	* dojump.c (do_jump): Do not care about __builtin_expect.
	* predict.c (expected_value_to_br_prob): Kill.
	* function.c (expand_function_end): Do not expand
	NOTE_INSN_REPEATED_LINE_NUMBER.
	* print-rtl.c (print_rtx): Do not pretty print the removed notes.
	* expect.c (sjlj_emit_function_enter): Emit directly branch probability.
	* cfgexpand.c (add_reg_br_prob_note): Export.
	* cfgcleanup.c (rest_of_handle_jump2): Do not call
	expected_value_to_br_prob.
	* cfglayout.c (duplicate_insn_chain): Do not deal with removed notes.
	* rtl.h (add_reg_br_prob_note): Declare.

From-SVN: r118696
2006-11-11 16:54:57 +00:00
J"orn Rennecke 24a7799ea4 re PR other/28251 (dumped addresses makes diffing dumps unusable)
gcc:
	PR other/28251
	* tree.h (dump_addr): Declare.
	* print-tree.c (dump_addr): New function.
	(print_node_brief, print_node): Use it.
	* print-rtl.c (print_rtx): Likewise.
	* common.opt (-fdump-noaddr): New option.
	* doc/invoke.texi (-fdump-noaddr): Document.
	* loop-unroll.c (si_info_hash): Make hash independent of addresses.
	(ve_info_hash): Likewise.
gcc/testsuite:
	PR other/28251
	gcc.c-torture/unsorted/dump-noaddr.c: New test.
	gcc.c-torture/unsorted/dump-noaddr.x: New driver.

From-SVN: r115519
2006-07-17 15:44:48 +01:00
Kaveh R. Ghazi 06145cb9b4 aclocal.m4 (gcc_AC_FUNC_PRINTF_PTR): Delete.
* aclocal.m4 (gcc_AC_FUNC_PRINTF_PTR): Delete.
	* configure.ac: Don't call gcc_AC_FUNC_PRINTF_PTR.
	* system.h (HOST_PTR_PRINTF): Don't define, poison it.

	* bitmap.c, c-decl.c, config/i386/i386-interix.h,
	config/iq2000/iq2000.c, mips-tfile.c, print-rtl.c, print-tree.c:
	Delete HOST_PTR_PRINTF.

	* configure, config.in: Regenerate.

cp:
	* name-lookup.c, ptree.c: Delete HOST_PTR_PRINTF.

From-SVN: r103135
2005-08-16 00:13:53 +00:00
Kelley Cook 366ccddb2b Update FSF address.
From-SVN: r101317
2005-06-25 02:02:01 +00:00
Kazu Hirata fe9565ed02 attribs.c, [...]: Update copyright.
* attribs.c, c-pragma.c, caller-save.c, cfghooks.h,
	coverage.c, cselib.h, domwalk.c, domwalk.h, errors.c,
	errors.h, gcov-dump.c, gcov-io.c, gcov-io.h, gen-protos.c,
	genattrtab.h, genextract.c, gthr-win32.h, insn-notes.def,
	integrate.c, lambda-mat.c, lambda.h, libgcov.c, local-alloc.c,
	machmode.def, mips-tfile.c, params.c, pretty-print.c,
	print-rtl.c, protoize.c, regmove.c, sched-vis.c, tree-chrec.h,
	tree-data-ref.h, vec.h, config/darwin-c.c, config/sol2-c.c,
	config/sol2.c, config/arm/arm-cores.def, config/arm/cirrus.md,
	config/arm/symbian.h, config/c4x/c4x.c, config/c4x/c4x.h,
	config/i386/cygming.h, config/i386/djgpp.h,
	config/i386/lynx.h, config/i386/netware.c,
	config/i386/winnt.c, config/ia64/ia64-c.c,
	config/iq2000/iq2000.c, config/m32r/little.h,
	config/m68k/m68k-protos.h, config/m68k/m68k.h,
	config/m68k/m68k.md, config/mcore/mcore.c,
	config/mcore/mcore.h, config/mmix/mmix.c, config/mmix/mmix.md,
	config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c,
	config/mn10300/mn10300.h, config/ns32k/netbsd.h,
	config/ns32k/ns32k.c, config/ns32k/ns32k.h,
	config/pa/pa-hpux11.h, config/pdp11/pdp11.c,
	config/pdp11/pdp11.h, config/rs6000/darwin.h,
	config/rs6000/default64.h, config/rs6000/rs6000-c.c,
	config/s390/2064.md, config/s390/2084.md,
	config/s390/s390-modes.def, config/s390/s390-protos.h,
	config/s390/tpf.h, config/sh/sh.h, config/sh/symbian.c,
	config/stormy16/stormy16.c, config/vax/vax-protos.h,
	config/vax/vax.c, config/vax/vax.h,
	config/xtensa/lib1funcs.asm, config/xtensa/xtensa.md: Update
	copyright.

From-SVN: r98914
2005-04-28 05:38:50 +00:00
Nathan Sidwell 0e61db61a0 lambda.h (lambda_vector_min_nz): Likewise.
* lambda.h (lambda_vector_min_nz): Likewise.
	* langhooks.h (struct lang_hooks_for_types,
	struct lang_hooks): Likewise.
	* output.h (assemble_integer, this_is_asm_operands): Likewise.
	* tree.h: Likewise.
	* vec.h: Likewise.
	* tree-flow-inline.h (relink_imm_use): Use gcc_assert.

	* optabs.c (prepare_cmp_insn, emit_cmp_and_jump_insns): Reword
	comments to avoid 'abort'.  Use gcc_assert as necessary.
	* opts.c (common_handle_option): Likewise.
	* pretty-print.c (pp_base_format_text): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* read-rtl.c (read_rtx_filename, read_rtx_1): Likewise.
	* regmove.c (try_auto_increment): Likewise.
	* reload.c (find_valid_class, find_reloads_toplev,
	find_equiv_reg): Likewise.
	* reload1.c (reload, forget_old_reloads_1, function_invariant_p,
	merge_assigned_reloads): Likewise.
	* tree-inline.c (inline_forbidden_p_1,
	estimate_num_insns_1): Likewise.
	* tree-optimize.c (execute_todo): Likewise.
	* tree-outof-ssa.c (eliminate_phi): Likewise.
	* tree-ssa-alias.c (add_pointed_to_expr): Likewise.
	* tree-ssa-ccp.c (maybe_fold_stmt_indirect): Likewise.
	* tree-ssa-operands.c (parse_ssa_operands,
	get_indirect_ref_operands, create_ssa_artficial_load_stmt): Likewise.
	* tree-ssa-pre.c (find_or_generate_expression): Likewise.
	* tree-ssanames.c (release_ssa_name): Likewise.
	* tree.c (int_bit_position, int_byte_position, tree_low_cst,
	walk_tree): Likewise.

	* tree-ssa-operands.c (verify_abort): Fold into ..
	(verify_imm_links): ... here.

From-SVN: r98519
2005-04-21 18:05:34 +00:00
Nathan Sidwell e16acfcd14 params.c (set_param_value): Use gcc_assert & gcc_unreachable.
* params.c (set_param_value): Use gcc_assert & gcc_unreachable.
	* passes.c (open_dump_file, rest_of_handle_final): Likewise.
	* postreload-gcse.c (expr_equiv_p, oprs_unchanged_p,
	hash_scan_set, reg_set_between_after_reload_p,
	reg_used_between_after_reload_p, get_avail_load_store_reg,
	eliminate_partially_redundant_load): Likewise.
	* postreload.c (reload_cse_simplify_set,
	reload_combine_note_use): Likewise.
	* predict.c (predict_insn, expected_value_to_br_prob,
	propagate_freq, expensive_function_p): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* profile.c (instrument_edges, instrument_values,
	compute_branch_probabilities, branch_prob, union_groups,
	tree_register_profile_hooks, rtl_register_profile_hooks): Likewise.
	* protoize.c (in_system_include_dir, file_could_be_converted,
	file_normally_convertible, gen_aux_info_file, seek_to_line,
	do_cleaning): Likewise.
	* tree-ssa-alias.c (collect_points_to_info_r): Likewise.
	* tree-ssa-ccp.c (execute_fold_all_builtins): Likewise.
	* tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise.

From-SVN: r97485
2005-04-03 10:27:51 +00:00
Caroline Tice 87c8b4bed3 Fix problems with hot/cold partitioning optimization.
From-SVN: r97322
2005-03-31 06:59:59 -08:00
Dorit Naishlos 7ccf35ed17 tree.def (ALIGN_INDIRECT_REF, [...]): New tree-codes.
2004-09-23  Dorit Naishlos <dorit@il.ibm.com>

        * tree.def (ALIGN_INDIRECT_REF, MISALIGNED_INDIRECT_REF):
        New tree-codes.
        * tree.h (REF_ORIGINAL): Consider ALIGN_INDIRECT_REF and
        MISALIGNED_INDIRECT_REF.
        * alias.c (get_alias_set, nonoverlapping_memrefs_p): Likewise.
        * emit-rtl.c (mem_expr_equal_p, set_mem_attributes_minus_bitpos):
        Likewise.
        * expr.c (safe_from_p, expand_expr_real_1, rewrite_address_base)
        (find_interesting_uses_address): Likewise.
        * fold-const.c (non_lvalue, operand_equal_p): Likewise.
        (build_fold_addr_expr_with_type): Likewise.
        * gimplify.c (gimplify_addr_expr, gimplify_expr): Likewise.
        * print-rtl.c (print_mem_expr): Likewise.
        * tree-dump.c (dequeue_and_dump): Likewise.
        * tree-eh.c (tree_could_trap_p): Likewise.
        * tree-gimple.c (is_gimple_addressable, get_base_address): Likewise.
        * tree-pretty-print.c (op_prio, op_symbol, dump_generic_node): Likewise.
        * tree-ssa-alias.c (find_ptr_dereference, ptr_is_dereferenced_by):
        Likewise.
        * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
        * tree-ssa-dom.c (record_equivalences_from_stmt): Likewise.
        * tree-ssa-loop-im.c (for_each_index, is_call_clobbered_ref): Likewise.
        * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Likewise.
        (add_address_candidates, rewrite_address_base): Likewise.
        * tree-ssa-operands.c (get_expr_operands, get_indirect_ref_operands):
        Likewise.
        * tree.c (staticp, build1_stat): Likewise.

        * tree.def (REALIGN_LOAD_EXPR, REALIGN_STORE_EXPR): New tree-codes.
        * tree-pretty-print.c (dump_generic_node): Consider REALIGN_LOAD_EXPR.
        * tree-ssa-operands.c (get_expr_operands): Likewise.
        * expr.c (expand_expr_real_1): Likewise.

        * optabs.h (vec_realign_store_optab, vec_realign_load_optab): New
        optabs.
        (OTI_vec_realign_store, OTI_vec_realign_load): New optab_index values
        for the new optabs.
        (expand_ternary_op): New function.
        * genopinit.c (optabs): Handle the new optabs.
        * optabs.c (optab_for_tree_code): Add cases for the new tree-codes.
        (init_optabs): Initialize vec_realign_load_optab.
        (expand_ternary_op): New functions.

        * target-def.h (TARGET_VECTORIZE): New member for struct gcc_target.
        (TARGET_VECTORIZE_MISALIGNED_MEM_OK): New member for targetm.vectorize.
        (TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD): Likewise.
        (TARGET_VECTORIZE_BUILTIN_MASK_FOR_STORE): Likewise.
        * target.h (struct vectorize): New member for struct gcc_target.
        (misaligned_mem_ok): New member for targetm.vectorize.
        (builtin_mask_for_load): Likewise.
        (builtin_mask_for_store): Likewise.
        * targethooks.c (default_vect_misaligned_mem_ok): New function.
        * targethooks.h (default_vect_misaligned_mem_ok): New function.

        * config/rs6000/altivec.md (build_vector_mask_for_load): New
        define_expand.
        (vec_realign_load_v4si, vec_realign_load_v4sf, vec_realign_load_v8hi)
        (vec_realign_load_v16qi): New define_insn.
        * config/rs6000/rs6000.h (ALTIVEC_BUILTIN_MASK_FOR_LOAD):
        (ALTIVEC_BUILTIN_MASK_FOR_STORE): New target builtins.
        * config/rs6000/rs6000.c (altivec_builtin_mask_for_load):
        (altivec_builtin_mask_for_store): New variables.
        (rs6000_builtin_mask_for_load): New function. Implements
        TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD.
        (rs6000_builtin_mask_for_store): New function. Implements
        TARGET_VECTORIZE_BUILTIN_MASK_FOR_STORE.
        (rs6000_expand_builtin): Expand the target builtins
        builtin_mask_for_load and builtin_mask_for_store.
        (altivec_init_builtins): Initialize the new target builtins.
        * config/i386/i386.c (ix86_misaligned_mem_ok): New function.
        Implements the target hook TARGET_VECTORIZE_MISALIGNED_MEM_OK.

        * tree-vectorizer.c (vect_create_data_ref): Renamed to
        vect_create_data_ref_ptr. Returns a pointer instead of an array-ref.
        (vect_create_addr_base_for_vector_ref): Additional argument (offset).
        (vectorizable_store): Call vect_create_data_ref_ptr with additional
        arguments, and create an indirect_ref with its return value data_ref.
        Check aligned_access_p.
        (vectorizable_load): Handle misaligned loads, using software-pipelined
        scheme with REALIGN_LOAD_EXPR and ALIGN_INDIRECT_REF if
        vec_realign_load_optab is supported, or using a scheme without
        software-pipelining with MISALIGNED_INDIRECT_REF if the target hook
        misaligned_mem_ok is supported.

        (vect_finish_stmt_generation): Typo.
        (vect_enhance_data_refs_alignment): Rename loop_vinfo to loop_info.
        (vect_analyze_data_refs_alignment): Don't fail vectorization in the
        presence of misaligned loads.
        (vect_analyze_data_ref_access): Add check for constant init.
        (vect_get_symbl_and_dr): Remove duplicate line.
        * tree-vectorizer.h (DR_MISALIGNMENT): Add comment.

From-SVN: r87948
2004-09-23 14:34:35 +00:00
Zack Weinberg 52c5701b4e reg-notes.def (REG_DEP_TRUE): New entry, place first so it gets value 0.
* reg-notes.def (REG_DEP_TRUE): New entry, place first so it
	gets value 0.
	* print-rtl.c (print_rtx): Print the name of a REG_NOTE even
	if it has value 0.

From-SVN: r87821
2004-09-21 20:34:43 +00:00
Richard Henderson 21076c8ec3 print-rtl.c (print_decl_name): New.
* print-rtl.c (print_decl_name): New.
        (print_mem_expr): Use it.

From-SVN: r87395
2004-09-12 10:27:04 -07:00
Zack Weinberg 45c8116dff Makefile.in (BUILD_PREFIX, [...]): Delete.
* Makefile.in (BUILD_PREFIX, BUILD_PREFIX_1): Delete.
	(BUILD_RTL, BUILD_PRINT, BUILD_ERRORS, BUILD_VARRAY): Update.
	(genobjs): Add build-rtl.o, build-print-rtl.o, build-varray.o.
	(genobjs static pattern rule): Remove %.c dependency.
	($(BUILD_PREFIX_1)rtl.o, print-rtl.o, $(BUILD_PREFIX_1)varray.o):
	Rename rules; delete commands; fix dependencies.
	(mostlyclean): Do not delete temporary source copies.
	* configure.ac: Delete all references to BUILD_PREFIX and
	BUILD_PREFIX_1.
	* configure: Regenerate.

	* print-rtl.c: Include bconfig.h #ifdef GENERATOR_FILE.
	Do not include tree.h, real.h, flags.h, hard-reg-set.h, or
	basic-block.h #ifdef GENERATOR_FILE.  Surround some more code
	with #ifndef GENERATOR_FILE so that nothing from those headers
	is used.

	* rtl.c, varray.c: Include bconfig.h #ifdef GENERATOR_FILE.

From-SVN: r86083
2004-08-16 23:05:04 +00:00
Zack Weinberg 7e7ec48e73 Makefile.in (RTL_BASE_H, RTL_H): Correct.
* Makefile.in (RTL_BASE_H, RTL_H): Correct.
	(BUILD_RTL): Remove $(BUILD_PREFIX) from ggc-none.o.
	(genobjs): Add errors.o, ggc-none.o, and min-insn-modes.o.
	(read-rtl.o, gensupport.o, genconfig.o, genflags.o, gencodes.o)
	(genconstants.o, genemit.o, genopinit.o, genrecog.o, genextract.o)
	(genpeep.o, genattr.o, genattrtab.o, genautomata.o, genoutput.o)
	(genconditions.o): Depend on $(RTL_BASE_H) not $(RTL_H).
	(ggc-none.o, errors.o): Move rule to generators section;
	correct dependencies.
	(min-insn-modes.o): Move rule to generators section; remove
	unnecessary explicit command; correct dependencies.
	(print-rtl.o, print-rtl1.o): Correct dependencies.
	($(BUILD_PREFIX_1)errors.o. $(BUILD_PREFIX_1)ggc-none.o): Delete rule.
	(mostlyclean): Update.

	* errors.c: Include bconfig.h not config.h.  Correct comment.
	* gengtype.c, genpreds.c: Don't define NO_GENRTL_H.
	* ggc-none.c: Include bconfig.h; not config.h or tm.h.
	* print-rtl.c: Don't include tm_p.h.

	* rtl.h: Move forward-decl of struct function down where it's
	needed.  Include genrtl.h #ifndef GENERATOR_FILE, not
	#ifndef NO_GENRTL_H.  Remove unnecessary #ifdef BUFSIZ statements.

From-SVN: r85574
2004-08-04 20:55:08 +00:00
Zack Weinberg 30678c3e48 print-rtl.c (print_rtx <case 'b'>): Don't attempt to print bitmap contents if GENERATOR_FILE is defined.
* print-rtl.c (print_rtx <case 'b'>): Don't attempt to print
	bitmap contents if GENERATOR_FILE is defined.
	* Makefile.in (BUILD_RTL): Remove $(BUILD_PREFIX)bitmap.o.
	($(BUILD_PREFIX_1)bitmap.o): Delete rule.

From-SVN: r85095
2004-07-23 21:15:45 +00:00
Steven Bosscher 07a236b612 rtl.h (insn_note): Remove NOTE_INSN_PREDICTION.
* rtl.h (insn_note): Remove NOTE_INSN_PREDICTION.
	* rtl.c (note_insn_name): Likewise.
	* print-rtl.c (print_rtx): Don't print it.
	* cfgrtl.h (can_delete_note_p): Don't handle it.
	(rtl_delete_block): Likewise.
	* passes.c (rest_of_handle_guess_branch_prob): Remove.
	(rest_of_compilation): Don't call it.
	* predict.c (process_note_predictions, process_note_prediction,
	note_prediction_to_br_prob): Remove.
	* basic-block.c (note_prediction_to_br_prob): Remove prototype.
	* stmt.c (return_prediction): Remove.
	(expand_value_return): Don't call it.  Don't add prediction
	notes for return statements.

From-SVN: r85016
2004-07-21 18:57:09 +00:00
Jerry Quinn 4b4bf9414f alias.c (nonlocal_mentioned_p, [...]): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P.
2004-07-08  Jerry Quinn  <jlquinn@optonline.net>

	* alias.c (nonlocal_mentioned_p, nonlocal_referenced_p,
	nonlocal_set_p, init_alias_analysis): Use, LABEL_P, JUMP_P, CALL_P,
	NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P.
	* bb-reorder.c (mark_bb_for_unlikely_executed_section,
	add_labels_and_missing_jumps, find_jump_block,
	fix_crossing_unconditional_branches, add_reg_crossing_jump_notes):
	Likewise.
	* bt-load.c (btr_referenced_p, compute_defs_uses_and_gen,
	link_btr_uses, move_btr_def): Likewise.
	* builtins.c (expand_builtin_longjmp, expand_builtin_nonlocal_goto,
	expand_builtin_expect_jump): Likewise.
	* caller-save.c (save_call_clobbered_regs, insert_one_insn): Likewise.
	* calls.c (expand_call, emit_library_call_value_1): Likewise.
	* cfganal.c (forwarder_block_p): Likewise.
	* cfgbuild.c (inside_basic_block_p, count_basic_blocks,
	make_label_edge, rtl_make_eh_edge, make_edges, find_basic_blocks_1,
	find_bb_boundaries): Likewise.
	* cfgcleanup.c (try_simplify_condjump, try_forward_edges,
	merge_blocks_move_predecessor_nojumps,
	merge_blocks_move_successor_nojumps, insns_match_p,
	flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge,
	try_optimize_cfg): Likewise.
	* cfgexpand.c (expand_block, construct_exit_block): Likewise.
	* cfglayout.c (skip_insns_after_block, label_for_bb,
	record_effective_endpoints, insn_locators_initialize,
	fixup_reorder_chain, update_unlikely_executed_notes): Likewise.
	* cfgmainloop.c (create_loop_notes): Likewise.
	* cfgrtl.c (delete_insn, delete_insn_chain,
	create_basic_block_structure, rtl_delete_block, free_bb_for_insn,
	update_bb_for_insn, rtl_merge_blocks, rtl_can_merge_blocks,
	block_label, try_redirect_by_replacing_jump, last_loop_beg_note,
	redirect_branch_edge, force_nonfallthru_and_redirect,
	rtl_tidy_fallthru_edge, back_edge_of_syntactic_loop_p,
	rtl_split_edge, commit_one_edge_insertion, print_rtl_with_bb,
	update_br_prob_note, rtl_verify_flow_info_1, rtl_verify_flow_info,
	purge_dead_edges, cfg_layout_redirect_edge_and_branch,
	cfg_layout_delete_block, cfg_layout_can_merge_blocks_p,
	cfg_layout_merge_blocks, rtl_block_ends_with_call_p,
	need_fake_edge_p, rtl_flow_call_edges_add): Likewise.
	* combine.c (combine_instructions, can_combine_p, try_combine,
	find_split_point, record_dead_and_set_regs, reg_dead_at_p,
	distribute_notes, distribute_links, insn_cuid): Likewise.
	* cse.c (fold_rtx, cse_insn, cse_around_loop,
	invalidate_skipped_block, cse_set_around_loop,
	cse_end_of_basic_block, cse_main, cse_basic_block,
	cse_condition_code_reg): Likewise.
	* cselib.c (cselib_process_insn): Likewise.
	* ddg.c (create_ddg): Likewise.
	* df.c (df_insn_refs_record, df_bb_rd_local_compute, df_insns_modify):
	Likewise.
	* dwarf2out.c (dwarf2out_stack_adjust, dwarf2out_frame_debug,
	gen_label_die, dwarf2out_var_location): Likewise.
	* emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn,
	next_insn, previous_insn, next_nonnote_insn, prev_nonnote_insn,
	last_call_insn, active_insn_p, next_label, prev_label,
	link_cc0_insns, next_cc0_user, try_split, add_insn_after,
	add_insn_before, remove_insn, add_function_usage_to,
	reorder_insns, find_line_note, remove_unnecessary_notes,
	emit_insn_after_1, classify_insn): Likewise.
	* except.c (convert_from_eh_region_ranges_1, emit_to_new_bb_before,
	connect_post_landing_pads, sjlj_mark_call_sites,
	sjlj_emit_function_enter, sjlj_emit_function_exit, reachable_handlers,
	can_throw_internal, can_throw_external, set_nothrow_function_flags,
	convert_to_eh_region_ranges): Likewise.
	* explow.c (optimize_save_area_alloca): Likewise.
	* expr.c (expand_expr_real): Likewise.
	* final.c (insn_current_reference_address, compute_alignments,
	shorten_branches, final, scan_ahead_for_unlikely_executed_note,
	final_scan_insn, output_asm_label, leaf_function_p): Likewise.
	* flow.c (first_insn_after_basic_block_note, delete_dead_jumptables,
	propagate_block_delete_insn, propagate_one_insn,
	init_propagate_block_info, propagate_block, libcall_dead_p,
	mark_set_1, attempt_auto_inc, find_auto_inc, try_pre_increment):
	Likewise.
	* function.c (instantiate_virtual_regs,	reorder_blocks_1,
	expand_function_start, expand_function_end, contains,
	thread_prologue_and_epilogue_insns,
	reposition_prologue_and_epilogue_notes): Likewise.
	* gcse.c (constprop_register, bypass_conditional_jumps,
	insert_insn_end_bb, gcse_after_reload): Likewise.
	* genemit.c (gen_expand, gen_split): Likewise.
	* genpeep.c (gen_peephole, main): Likewise.
	* global.c (build_insn_chain): Likewise.
	* graph.c (node_data, print_rtl_graph_with_bb): Likewise.
	* haifa-sched.c (unlink_other_notes, unlink_line_notes,
	get_block_head_tail, no_real_insns_p, rm_line_notes, save_line_notes,
	restore_line_notes, rm_redundant_line_notes, rm_other_notes,
	ok_for_early_queue_removal, set_priorities, sched_init): Likewise.
	* ifcvt.c (count_bb_insns, first_active_insn, last_active_insn,
	cond_exec_process_insns, end_ifcvt_sequence, noce_process_if_block,
	merge_if_block, block_jumps_and_fallthru_p, find_if_block,
	dead_or_predicable): Likewise.
	* integrate.c (try_constants): Likewise.
	* jump.c (rebuild_jump_labels, cleanup_barriers,
	purge_line_number_notes, init_label_info, mark_all_labels,
	squeeze_notes, get_label_before, get_label_after,
	reversed_comparison_code_parts, simplejump_p, pc_set,
	returnjump_p, onlyjump_p, follow_jumps, mark_jump_label,
	delete_barrier, delete_prior_computation, delete_computation,
	delete_related_insns, delete_for_peephole, redirect_jump):
	Likewise.
	* lcm.c (optimize_mode_switching): Likewise.
	* local-alloc.c (validate_equiv_mem, update_equiv_regs, block_alloc):
	Likewise.
	* loop-doloop.c (doloop_valid_p, doloop_optimize): Likewise.
	* loop-invariant.c (find_exits, find_invariants_bb): Likewise.
	* loop-iv.c (simplify_using_assignment): Likewise.
	* loop.c (compute_luids, loop_optimize, scan_loop, libcall_other_reg,
	libcall_benefit, skip_consec_insns, move_movables, prescan_loop,
	find_and_verify_loops, labels_in_range_p, for_each_insn_in_loop,
	loop_bivs_init_find, strength_reduce, check_insn_for_bivs,
	check_insn_for_givs, check_final_value, update_giv_derive,
	basic_induction_var, product_cheap_p, check_dbra_loop,
	loop_insn_first_p, last_use_this_basic_block,
	canonicalize_condition, get_condition, loop_regs_scan, load_mems,
	try_copy_prop, LOOP_BLOCK_NUM, loop_dump_aux): Likewise.
	* modulo-sched.c (doloop_register_get, find_line_note, sms_schedule,
	sms_schedule_by_order): Likewise.
	* optabs.c (emit_no_conflict_block, emit_libcall_block): Likewise.
	* postreload.c (reload_cse_simplify_operands, reload_combine,
	reload_cse_move2add): Likewise.
	* predict.c (can_predict_insn_p, estimate_probability,
	expected_value_to_br_prob, process_note_predictions): Likewise.
	* print-rtl.c (print_rtx, print_rtl, print_rtl_single): Likewise.
	* profile.c (branch_prob): Likewise.
	* ra-build.c (live_out_1, livethrough_conflicts_bb,
	detect_webs_set_in_cond_jump): Likewise.
	* ra-debug.c (ra_print_rtx_object, ra_debug_insns,
	ra_print_rtl_with_bb): Likewise.
	* ra-rewrite.c (insert_stores, rewrite_program2): Likewise.
	* recog.c (next_insn_tests_no_inequality, find_single_use,
	split_all_insns, peephole2_optimize, if_test_bypass_p): Likewise.
	* reg-stack.c (next_flags_user, record_label_references,
	emit_swap_insn, swap_rtx_condition, subst_stack_regs,
	compensate_edge, convert_regs_1): Likewise.
	* regclass.c (scan_one_insn): Likewise.
	* regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2,
	regmove_optimize, fixup_match_1, single_set_for_csa,
	combine_stack_adjustments_for_block): Likewise.
	* regrename.c (build_def_use, copyprop_hardreg_forward_1): Likewise.
	* reload.c (find_reloads, find_reloads_address_1, subst_reloads,
	find_equiv_reg): Likewise.
	* reload1.c (reload, calculate_needs_all_insns, set_label_offsets,
	reload_as_needed, emit_input_reload_insns, do_output_reload,
	delete_output_reload, delete_address_reloads_1, fixup_abnormal_edges):
	Likewise.
	* reorg.c (find_end_label, emit_delay_sequence,
	delete_from_delay_slot, delete_scheduled_jump, optimize_skip,
	get_jump_flags, rare_destination, mostly_true_jump,
	try_merge_delay_insns, redundant_insn, own_thread_p,
	fill_simple_delay_slots, fill_slots_from_thread,
	fill_eager_delay_slots, relax_delay_slots, make_return_insns,
	dbr_schedule): Likewise.
	* resource.c (find_basic_block, next_insn_no_annul,
	find_dead_or_set_registers, mark_target_live_regs): Likewise.
	* rtl.h (RTX_PREV): Likewise.
	* rtlanal.c (global_reg_mentioned_p, no_labels_between_p,
	no_jumps_between_p, reg_used_between_p, reg_referenced_between_p,
	reg_set_p, find_last_value, dead_or_set_regno_p, find_reg_fusage,
	find_regno_fusage, pure_call_p, replace_label, rtx_referenced_p_1,
	tablejump_p, computed_jump_p, insns_safe_to_move_p,
	find_first_parameter_load, can_hoist_insn_p): Likewise.
	* sched-deps.c (get_condition, add_dependence, sched_analyze_2,
	sched_analyze_insn, sched_analyze, add_forward_dependence): Likewise.
	* sched-ebb.c (fix_basic_block_boundaries, add_deps_for_risky_insns,
	schedule_ebbs): Likewise.
	* sched-rgn.c (is_cfg_nonregular, find_conditional_protection,
	is_conditionally_protected, can_schedule_ready_p,
	add_branch_dependences, debug_dependencies): Likewise.
	* stmt.c (emit_nop, expand_start_case, emit_jump_if_reachable):
	Likewise.
	* unroll.c (unroll_loop, copy_loop_body, back_branch_in_range_p,
	reg_dead_after_loop, loop_find_equiv_value, loop_iterations,
	set_dominates_use, ujump_to_loop_cont): Likewise.
	* var-tracking.c (prologue_stack_adjust, vt_initialize): Likewise.
	* varasm.c (output_constant_pool_1): Likewise.

From-SVN: r84341
2004-07-09 03:29:35 +00:00
Per Bothner 6773e15fa5 Conditionally compile support for --enable-mapped_location.
* cfgexpand.c:  Handle USE_MAPPED_LOCATION case for function_end_locus.
	* cfglayout.c (insn_locators_initialize):  Const cleanup.  New macros.
	* cfgrtl.c (delete_insn):  Use new NOTE_DELETED_LABEL_NAME macro.
	* print-rtl.c (print_rtx):  Likewise.
	* emit-rtl.c:  Don't clear NOTE_SOURCE_FILE if USE_MAPPED_LOCATION.
	* combine.c:  Use new SET_INSN_DELETED macro.
	* flow.c:  Likewise.
	* haifa-sched.c:  Likewise.
	* ifcvt.c:  Likewise.
	* recog.c:  Likewise.
	* reload1.c:  Likewise.
	* diagnostic.c:  Use expand_location macro.
	* pretty-print.c (pp_base_format_text):  Likewise.
	* profile.c:  Likewise.
 	* dwarf2out.c:  Likewise.  Also use expand_location, DECL_IS_BUILTIN.
 	* dwarf2out.c (dwarf2out_decl:  Use BUILTINS_LOCATION.
	* emit-rtl.c (emit_line_note):  Simplify if USE_MAPPED_LOCATION.
	(force_next_line_note, insn_emit):  Handle USE_MAPPED_LOCATION case.
	* final.c (final):  Likewise.
	* haifa-sched.c:  Likewise.
	* integrate.c:  Likewise.
	* jump.c:  Likewise.
	* rtl-error.c:  Likewise.
	* stmt.c (check_seenlabel):  Likewise.
	* tree-pretty-print.c:  Likewise.

From-SVN: r83921
2004-06-30 11:18:01 -07:00
Jerry Quinn f8cfc6aa07 alias.c (record_set, [...]): Use REG_P.
2004-06-15  Jerry Quinn  <jlquinn@optonline.net>

	* alias.c (record_set, record_base_value, canon_rtx, get_addr,
	nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P.
	* bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set):
	Likewise.
	* builtins.c (expand_builtin_setjmp, expand_builtin_apply,
	expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp,
	expand_builtin_strcmp, expand_builtin_strncmp,
	expand_builtin_frame_address): Likewise.
	* caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs,
	insert_one_insn): Likewise.
	* calls.c (prepare_call_address, precompute_register_parameters,
	precompute_arguments, expand_call, emit_library_call_value_1): Likewise.
	* cfganal.c (flow_active_insn_p): Likewise.
	* combine.c (set_nonzero_bits_and_sign_copies, can_combine_p,
	combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P,
	subst, combine_simplify_rtx, simplify_if_then_else, simplify_set,
	make_extraction, recog_for_combine, gen_lowpart_for_combine,
	simplify_comparison, record_dead_and_set_regs_1,
	record_dead_and_set_regs, record_promoted_value,
	check_promoted_subreg, get_last_value_validate, get_last_value,
	reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes,
	unmentioned_reg_p_1): Likewise.
	* conflict.c (mark_reg): Likewise.
	* cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost,
	mention_regs, insert_regs, lookup, lookup_for_remove, insert,
	merge_equiv_classes, flush_hash_table, invalidate,
	remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg,
	invalidate_for_call, use_related_value, canon_hash, exp_equiv_p,
	cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant,
	record_jump_cond, cse_insn, addr_affects_sp_p,
	invalidate_from_clobbers, cse_process_notes, cse_around_loop,
	cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode,
	cse_cc_succs, cse_condition_code_reg): Likewise.
	* cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p,
	cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx,
	cselib_record_set, cselib_record_sets): Likewise.
	* dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms,
	dbxout_block): Likewise.
	* df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise.
	* dojump.c (do_jump): Likewise.
	* dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg,
	is_based_loc, rtl_for_decl_location): Likewise.
	* emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl,
	set_decl_incoming_rtl, mark_user_reg): Likewise.
	* explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg,
	copy_to_suggested_reg, allocate_dynamic_stack_space,
	probe_stack_range, hard_function_value): Likewise.
	* expmed.c (store_bit_field, store_fixed_bit_field,
	store_split_bit_field, extract_bit_field, extract_fixed_bit_field,
	extract_split_bit_field, expand_divmod, emit_store_flag_force):
	Likewise.
	* expr.c (convert_move, convert_modes,
	block_move_libcall_safe_for_call_parm, emit_group_load, use_reg,
	use_group_regs, emit_move_insn, emit_move_insn_1,
	compress_float_constant, push_block, emit_single_push_insn,
	emit_push_insn, get_subtarget, expand_assignment, store_expr,
	store_constructor, store_field, force_operand, safe_from_p,
	expand_expr_real_1, expand_increment, do_store_flag, do_tablejump):
	Likewise.
	* final.c (profile_function, final_scan_insn, alter_subreg,
	get_mem_expr_from_op, output_asm_operand_names, output_operand,
	only_leaf_regs_used, leaf_renumber_regs_insn): Likewise.
	* flow.c (verify_wide_reg_1, mark_regs_live_at_end,
	find_regno_partial, propagate_one_insn, init_propagate_block_info,
	insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond,
	attempt_auto_inc, find_auto_inc, mark_used_regs,
	count_or_remove_death_notes_bb): Likewise.
	* function.c (find_temp_slot_from_address, update_temp_slot_address,
	preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn,
	fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof,
	put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk,
	purge_single_hard_subreg_set, instantiate_decl,
	instantiate_virtual_regs_1, aggregate_value_p, assign_parms,
	promoted_input_arg, setjmp_vars_warning, setjmp_args_warning,
	setjmp_protect, setjmp_protect_args, fix_lexical_addr,
	expand_function_start, diddle_return_value, clobber_return_register,
	expand_function_end, keep_stack_depressed, handle_epilogue_set,
	update_epilogue_consts): Likewise.
	* genemit.c (gen_exp, gen_insn): Likewise.
	* genrecog.c (make_insn_sequence): Likewise.
	* global.c (global_conflicts, expand_preferences, mark_reg_store,
	mark_reg_conflicts, set_preference, reg_becomes_live,
	build_insn_chain, mark_reg_change): Likewise.
	* haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight):
	Likewise.
	* ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block):
	Likewise.
	* integrate.c (copy_rtx_and_substitute, try_constants,
	subst_constants, mark_stores, allocate_initial_values): Likewise.
	* jump.c (reversed_comparison_code_parts, delete_prior_computation,
	delete_computation, rtx_renumbered_equal_p, true_regnum,
	reg_or_subregno): Likewise.
	* lcm.c (reg_dies, reg_becomes_live): Likewise.
	* local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem,
	update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set,
	wipe_dead_reg, no_conflict_p): Likewise.
	* loop-iv.c (simple_reg_p, simple_set_p, kill_sets,
	iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered,
	simple_rhs_p, simplify_using_assignment, implies_p): Likewise.
	* loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p,
	move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p,
	find_single_use_in_loop, count_one_set, loop_bivs_init_find,
	loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs,
	valid_initial_value_p, simplify_giv_expr, consec_sets_giv,
	loop_regs_update, check_dbra_loop, maybe_eliminate_biv,
	maybe_eliminate_biv_1, record_initial, update_reg_last_use,
	canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop,
	try_swap_copy_prop): Likewise.
	* optabs.c (expand_binop, expand_vector_binop, expand_vector_unop,
	expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float):
	Likewise.
	* postreload.c (reload_cse_simplify, reload_cse_simplify_set,
	reload_cse_simplify_operands, reload_combine,
	reload_combine_note_store, reload_combine_note_use,
	reload_cse_move2add, move2add_note_store): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* ra-build.c (copy_insn_p, remember_move, init_one_web_common,
	contains_pseudo, handle_asm_insn): Likewise.
	* ra-debug.c (ra_print_rtx_object, dump_constraints,
	dump_static_insn_cost): Likewise.
	* ra-rewrite.c (slots_overlap_p, emit_colors,
	remove_suspicious_death_notes): Likewise.
	* recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use,
	register_operand, scratch_operand, nonmemory_operand,
	constrain_operands): Likewise.
	* reg-stack (check_asm_stack_operands, remove_regno_note,
	emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat,
	subst_asm_stack_regs): Likewise.
	* regclass.c (scan_one_insn, record_reg_classes, copy_cost,
	record_address_regs, reg_scan_mark_refs): Likewise.
	* regmove.c (discover_flags_reg, replacement_quality,
	copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize,
	fixup_match_1): Likewise.
	* regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value,
	kill_set_value, copyprop_hardreg_forward_1): Likewise.
	* reload.c (MATCHES, push_secondary_reload, find_reusable_reload,
	reload_inner_reg_of_subreg, can_reload_into, push_reload,
	combine_reloads, find_dummy_reload, hard_reg_set_here_p,
	operands_match_p, decompose, find_reloads, find_reloads_toplev,
	find_reloads_address, subst_indexed_address, find_reloads_address_1,
	find_reloads_subreg_address, find_replacement,
	refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p,
	refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise.
	* reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns,
	find_reg, delete_dead_insn, alter_reg, eliminate_regs,
	elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs,
	forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs,
	emit_input_reload_insns, emit_output_reload_insns, do_input_reload,
	do_output_reload, emit_reload_insns, gen_reload,
	delete_address_reloads_1, inc_for_reload): Likewise.
	* reorg.c (update_reg_dead_notes, fix_reg_dead_note,
	update_reg_unused_notes, fill_slots_from_thread): Likewise.
	* resource.c (update_live_status, mark_referenced_resources,
	mark_set_resources, mark_target_live_regs): Likewise.
	* rtlanal.c (nonzero_address_p, get_jump_table_offset,
	global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p,
	reg_set_p, set_noop_p, find_last_value, refers_to_regno_p,
	note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note,
	find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in,
	parms_set, find_first_parameter_load, keep_with_call_p,
	hoist_test_store, hoist_update_store, address_cost, nonzero_bits1,
	num_sign_bit_copies1): Likewise.
	* rtlhooks.c (gen_lowpart_general): Likewise.
	* sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn,
	sched_analyze): Likewise.
	* sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1):
	Likewise.
	* sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise.
	* simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation,
	simplify_binary_operation, simplify_const_relational_operation,
	simplify_subreg): Likewise.
	* stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands,
	expand_end_stmt_expr, expand_return, expand_decl,
	expand_anon_union_decl): Likewise.
	* unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body,
	find_splittable_regs, find_splittable_givs, find_common_reg_term,
	loop_iterations): Likewise.
	* var-tracking.c (variable_union, variable_part_different_p,
	variable_different_p, count_uses, add_uses, add_stores,
	compute_bb_dataflow, set_variable_part, delete_variable_part,
	emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters):
	Likewise.
	* varasm.c (assemble_variable): Likewise.

From-SVN: r83195
2004-06-15 18:02:40 +00:00
Steven Bosscher 6ce2bcb71c basic-block.c (tail_recursion_label_list): Don't declare.
* basic-block.c (tail_recursion_label_list): Don't declare.
	(CLEANUP_PRE_SIBCALL): Remove.  Renumber the other CLEANUP_*
	accordingly.
	* cfgbuild.c (find_label_refs): Remove.
	(find_basic_blocks_1): Don't handle CALL_PLACEHOLDER insns.
	* cfgcleanup.c (tail_recursion_label_p): Remove.
	(merge_blocks_move): Do not check for tail recursion.
	(try_optimize_cfg): Likewise.
	(cleanup_cfg): Never handle CLEANUP_PRE_SIBCALL.
	* cfgrtl.c (tail_recursion_label_list): Remove.
	* except.c (remove_unreachable_regions): Don't handle
	CALL_PLACEHOLDER insns.
	(convert_from_eh_region_ranges_1, can_throw_internal,
	can_throw_external): Likewise.
	* function.c (free_after_compilation): Don't clear
	x_tail_recursion_label.
	(fixup_var_refs_insns): Don't handle CALL_PLACEHOLDER insns.
	(identify_blocks_1): Don't recurse for CALL_PLACEHOLDER insns.
	(reorder_blocks_1): Likewise.
	* function.h (struct function): Remove x_tail_recursion_label
	member.  Don't define tail_recursion_label.
	* jump.c (mark_all_labels): Don't handle CALL_PLACEHOLDER insns.
	* print-rtl.c (print_rtx): Likewise.
	* rtl.def (CALL_PLACEHOLDER): Remove.
	* rtl.h (sibcall_use_t): Remove enum.
	(optimize_sibling_and_tail_recursive_calls,
	replace_call_placeholder): Remove function prototypes.
	* stmt.c (tail_recursion_args): Remove.
	(optimize_tail_recursion): Remove.
	(expand_return): Don't check for possible tail recursion.
	* tree.h (optimize_tail_recursion): Remove prototype.

From-SVN: r82597
2004-06-03 12:07:47 +00:00
Diego Novillo 6de9cd9a88 Merge tree-ssa-20020619-branch into mainline.
From-SVN: r81764
2004-05-13 02:41:07 -04:00
Caroline Tice 750054a2ee basic-block.h (struct edge_def): Add new field, crossing_edge.
2004-04-09  Caroline Tice  <ctice@apple.com>

        * basic-block.h (struct edge_def):  Add new field, crossing_edge.
        (struct basic_block_def):  Add new field, partition.
        (UNPARTITIONED, HOT_PARTITION, COLD_PARTITION):  New constant macro
        definitions.
        (partition_hot_cold_basic_blocks): Add extern function
        declaration.
        * bb-reorder.c (function.h, obstack.h, expr.h, regs.h):  Add four new
        include statements.
        (N_ROUNDS): Increase the maximum number of rounds by 1.
        (branch_threshold): Add array value for new round.
        (exec_threshold): Add array value for new round.
        (push_to_next_round_p): New function.
        (add_unlikely_executed_notes): New function.
        (find_rarely_executed_basic_blocks_and_crossing_edges): New function.
        (mark_bb_for_unlikely_executed_section): New function.
        (add_labels_and_missing_jumps): New function.
        (add_reg_crossing_jump_notes): New function.
        (fix_up_fall_thru_edges): New function.
        (find_jump_block): New function.
        (fix_crossing_conditional_branches): New function.
        (fix_crossing_unconditional_branches): New function.
        (fix_edges_for_rarely_executed_code): New function.
        (partition_hot_cold_basic_blocks): New function.
        (find_traces):  Add an extra round for partitioning hot/cold
        basic blocks.
        (find_traces_1_round): Add a parameter.  Modify to push all cold blocks,
        and only cold blocks, into the last (extra) round of collecting traces.
        (better_edge_p): Add a parameter.  Modify to favor non-crossing edges
        over crossing edges.
        (bb_to_key):  Add code to correctly identify cold blocks when
        doing partitioning.
        (connect_traces): Modify to connect all the non-cold traces first, then
        go back and connect up all the cold traces.
        (reorder_basic_blocks):  Add call to add_unlikely_executed_notes.
        * cfg.c (entry_exit_blocks): Add initialization for partition field in
        entry and exit blocks.
        * cfgbuild.c (make_edges): Update current_function_has_computed_jump
        if we are doing hot/cold partitioning.
        * cfgcleanup.c (cfglayout.h): Add new include statement.
        (try_simplify_condjump): Modify to not attempt on blocks with jumps
        that cross section boundaries.
        (try_forward_edges): Likewise.
        (merge_blocks_move_predecessor_nojumps): Likewise.
        (merge_blocks_move_successor_nojumps): Likewise.
        (merge_blocks_move): Likewise.
        (try_crossjump_to_edge): Modify to not attempt after we have done
        the block partitioning.
        (try_crossjump_bb): Modify to not attempt on blocks with jumps that
        cross section boundaries.
        (try_optimize_cfg): Likewise.
        * cfghooks.c (tidy_fallthru_edges): Modify to not remove indirect
        jumps that cross section boundaries.
        * cfglayout.c (flags.h): Add new include statement.
        (update_unlikely_executed_notes):  New function.
        (fixup_reorder_chain):  Add code so when a new jumping basic block is
        added, it's UNLIKELY_EXECUTED_CODE and REG_CROSSING_JUMP notes are
        updated appropriately.
        (duplicate_insn_chain):  Add code to duplicate the new NOTE insn
        introduced by this optimization.
        * cfglayout.h (scan_ahead_for_unlikely_executed_note):  Add new
        extern function declaration.
        * cfgrtl.c (can_delete_note_p):  Add NOTE_INSN_UNLIKELY_EXECUTED_CODE to
        list of notes that can be deleted.
        (create_basic_block_structure):  Add initialization for partition field.
        (rtl_can_merge_blocks):  Modify to test blocks for jumps that cross
        section boundaries.
        (try_redirect_by_replacing_jump):  Modify to not attempt on jumps that
        cross section boundaries.
        (commit_one_edge_insertion): Add code so newly created basic block
        ends up in correct (hot or cold) section.  Modify to disallow
        insertions before NOTE_INSN_UNLIKELY_EXECUTED_CODE notes.
        (rtl_verify_flow_info_1):  Add code to verify that no fall_thru edge
        crosses section boundaries.
        (cfg_layout_can_merge_blocks_p): Modify to test blocks for jumps that
        cross section boundaries.
        (force_nonfallthru_and_redirect): Modify to make sure new basic block
        ends up in correct section, with correct notes attached.
        * common.opt (freorder-blocks-and-partition):  Add new flag for this
        optimization.
        * dbxout.c (dbx_function_end):  Add code to make sure scope labels at
        the end of functions are written into the correct (hot or cold)
        section.
        (dbx_source_file): Add code so writing debug file information
        doesn't incorrectly change sections.
        * defaults.h (NORMAL_TEXT_SECTION_NAME): New constant macro, for use
        in partitioning hot/cold basic blocks into separate sections.
        (SECTION_FORMAT_STRING): New constant macro, for linux/i386 hot/cold
        section partitioning.
        (HAS_LONG_COND_BRANCH): New constant macro, indicating whether or not
        conditional branches can span all of memory.
        (HAS_LONG_UNCOND_BRANCH): New constant macro, indicationg whether or not
        unconditional branches can span all of memory.
        * final.c (scan_ahead_for_unlikely_executed_note):  New function.
        (final_scan_insn):  Add code to check for NOTE instruction indicating
        whether basic block belongs in hot or cold section, and to make sure
        the current basic block is being written to the appropriate section.
        Also added code to ensure that jump table basic blocks end up in the
        correct section.
        * flags.h (flag_reorder_blocks_and_partition):  New flag.
        * ifcvt.c (find_if_case_1):  Modify to not attempt if conversion if
        one of the branches has a jump that crosses between sections.
        (find_if_case_2): Likewise.
        (ifcvt): Modify to not attempt to mark loop exit edges after
        hot/cold partitioning has occurred.
        * opts.c (decode_options): Code to handle new flag,
        flag_reorder_blocks_and_partition; also to turn it off if
        flag_exceptions is on.
        (common_handle_option): Code to handle new flag,
        flag_reorder_blocks_and_partition.
        * output.h (unlikely_text_section): New extern function declaration.
        (in_unlikely_text_section): New extern function declaration.
        * passes.c (rest_of_handle_stack_regs):  Add
        flag_reorder_blocks_and_partition as an 'or' condition for calling
        reorder_basic_blocks.
        (rest_of_handle_reorder_blocks):  Add flag_reorder_blocks_and_partition
        as an 'or' condition for calling reorder_basic_blocks.
        (rest_of_compilation):  Add call to partition_hot_cold_basic_blocks.
        * print-rtl.c (print_rtx): Add code for handling new note,
        NOTE_INSN_UNLIKELY_EXECUTED_CODE
        * rtl.c  (NOTE_INSN_UNLIKELY_EXECUTED_CODE): New note insn (see below).
        (REG_CROSSING_JUMP): New kind of reg_note, to mark jumps that
        cross between section boundaries.
        * rtl.h (NOTE_INSN_UNLIKELY_EXECUTED_CODE):  New note instruction,
        indicating the basic block containing it belongs in the cold section.
        (REG_CROSSING_JUMP): New type of reg_note, to mark jumps that cross
        between hot and cold sections.
        * toplev.c (flag_reorder_blocks_and_partition):  Add code to
        initialize this flag, and to tie it to the command-line option
        freorder-blocks-and-partition.
        * varasm.c (cfglayout.h):  Add new include statement.
        (unlikely_section_label_printed):  New global variable, used for
        determining when to output section name labels for cold sections.
        (in_section):  Add in_unlikely_executed_text to enum data structure.
        (text_section):  Modify code to use SECTION_FORMAT_STRING and
        NORMAL_TEXT_SECTION_NAME macros.
        (unlikely_text_section):  New function.
        (in_unlikely_text_section):  New function.
        (function_section):  Add code to make sure beginning of function is
        written into correct section (hot or cold).
        (assemble_start_function):  Add code to make sure stuff is written to
        the correct section.
        (assemble_zeros):  Add in_unlikely_text_section as an 'or' condition
        to an if statement that was checking 'in_text_section'.
        (assemble_variable):  Add 'in_unlikely_text_section' as an 'or'
        condition to an if statement that was checking 'in_text_section'.
        (default_section_type_flags_1):  Add check: if in cold section
        flags = SECTION_CODE.
        * config/darwin.c (darwin_asm_named_section):  Modify to use
        SECTION_FORMAT_STRING if we are partitioning hot/cold blocks.
        * config/i386/i386.h (HAS_LONG_COND_BRANCH): Defined this macro
        specifically for the i386.
        (HAS_LONG_UNCOND_BRANCH):  Defined this macro specifically for the i386.
        * config/rs6000/darwin.h (UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Change
        text string to something more informative.
        (NORMAL_TEXT_SECTION_NAME): Add new definition.
        (SECTION_FORMAT_STRING):  Add new definition.
        * config/rs6000/rs6000.c (rs6000_assemble_integer):  Add
        '!in_unlikely_text_section' as an 'and' condition to an if statement
        that was already checking '!in_text_section'.
        * config/rs6000/sysv4.h (HOT_TEXT_SECTION_NAME,NORMAL_TEXT_SECTION_NAME,
        UNLIKELY_EXECUTED_TEXT_SECTION_NAME,SECTION_FORMAT_STRING): Make
        sure these are properly defined for linux on ppc.
        * doc/invoke.texi  (freorder-blocks-and-partition): Add documentation
        for this new flag.
        * doc/rtl.texi (REG_CROSSING_JUMP):  Add documentation for new
        reg_note.
        * doc/tm.texi (NORMAL_TEXT_SECTION_NAME, SECTION_FORMAT_STRING,
        HAS_LONG_COND_BRANCH, HAS_LONG_UNCOND_BRANCH): Add documentation for
        these new macros.

From-SVN: r80564
2004-04-09 12:57:47 -07:00
Kazu Hirata 0ea5865c17 c-ppoutput.c, [...]: Update copyright.
gcc/
	* c-ppoutput.c, cfganal.c, diagnostic.h, print-rtl.c,
	config/darwin.c, config/darwin.h, config/ia64/ia64-c.c,
	config/m32r/linux.h, config/rs6000/ppc64-fp.c,
	config/sparc/openbsd.h, doc/makefile.texi, doc/passes.texi:
	Update copyright.

	cp/
	* rtti.c: Update copyright.

From-SVN: r77449
2004-02-07 14:14:54 +00:00
Josef Zlomek 014a1138d6 Josef Zlomek <zlomekj@suse.cz>
Josef Zlomek  <zlomekj@suse.cz>
	* Makefile.in (var-tracking.o): New.
	* common.opt (fvar-tracking): New.
	* flags.h (flag_var_tracking): New.
	* gengtype.c (adjust_field_rtx_def): NOTE_INSN_VAR_LOCATION was added.
	* opts.c (common_handle_option): Add OPT_fvar_tracking.
	* print-rtl.c (print_rtx): NOTE_INSN_VAR_LOCATION was added.
        * rtl.c (note_insn_name): Likewise.
        * rtl.def (VAR_LOCATION): New.
        * rtl.h (NOTE_VAR_LOCATION): New.
        (NOTE_VAR_LOCATION_DECL): New.
        (NOTE_VAR_LOCATION_LOC): New.
        (enum insn_note): NOTE_INSN_VAR_LOCATION was added.
        (variable_tracking_main): New exported function.
        * timevar.def (TV_VAR_TRACKING): New.
        * toplev.c (enum dump_file_index): Added DFI_vartrack.
        (dump_file): "vartrack" was added (-dV).
        (flag_var_tracking): New.
        (f_options): "var-tracking" was added.
	(rest_of_handle_variable_tracking): New function.
        (rest_of_compilation): Run variable tracking.
	(process_options): If user has not specified flag_var_tracking set it
	according to optimize, debug_info_level and debug_hooks.
	* tree.h (frame_base_decl): New.
        * var-tracking.c: New file.
	* config/ia64/ia64.c (ia64_flag_var_tracking): New variable.
	(ia64_override_options): Set flags to run variable tracking in machine
	dependent reorg instead of toplev.c.
	(ia64_reorg): Run variable tracking if wanted.
        * doc/invoke.texi: Mention variable tracking in -dV,
	add and -fvar-tracking.
        * doc/passes.texi: Added variable tracking pass.

	Daniel Berlin <dberlin@dberlin.org>
	* debug.h (struct gcc_debug_hooks): Added var_location debug hook.
	* dbxout.c (dbx_debug_hooks): Likewise.
	(xcoff_debug): Likewise.
	* debug.c (do_nothing_debug_hooks): Likewise.
	* dwarf2out.c (dwarf2_debug_hooks): Likewise.
	* dwarfout.c (dwarf_debug_hooks): Likewise.
	* sdbout.c (sdb_debug_hooks): Likewise.
	* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
	* final.c (final_scan_insn): Call var_location debug hook for each
	NOTE_INSN_VAR_LOCATION.

Co-Authored-By: Daniel Berlin <dberlin@dberlin.org>

From-SVN: r77418
2004-02-06 20:03:45 +00:00
Richard Kenner a55f448128 print-rtl.c (print_rtx): For hard register...
* print-rtl.c (print_rtx): For hard register, write out register
	number and register name instead of calling PRINT_REG.
	* defaults.h (PRINT_REG): Deleted.
	* config/i386/i386.c (print_reg): Remove handling of CODE of -1.
	Move comments here from i386.h.
	(print_operand, print_operand_address): Call print_reg directly.
	* config/i386/i386.h (PRINT_REG): Deleted.

From-SVN: r75282
2003-12-31 18:02:44 -05:00
Zack Weinberg 9a623a652b print-rtl.c (print_rtx): Call PRINT_REG with second argument -1.
* print-rtl.c (print_rtx): Call PRINT_REG with second argument -1.
	* config/i386/i386.c (print_reg): Abort on a virtual register
	if code != -1; not if file == asm_out_file.
	* config/i386/i386.h (PRINT_REG): Document meaning of CODE == -1.
	(DEBUG_PRINT_REG): Delete, unused.

From-SVN: r73203
2003-11-02 19:47:57 +00:00
Zack Weinberg 94134f429f Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o.
* Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o
	with min-insn-modes.o.
	(STAGESTUFF): Add min-insn-modes.c.
	(genobjs): Add genmodes.o.
	(print-rtl.o, print-rtl1.o): Depend on $(TM_P_H).
	(insn-modes.o): Depend on $(TM_H) not $(GTM_H); also real.h.
	(min-insn-modes.c, min-insn-modes.o): New rules.
	(s-modes): Also generate min-insn-modes.c.
	($(BUILD_PREFIX_1)insn-modes.o): Kill.
	* genmodes.c (struct mode_data): Add format field.
	(blank_mode, validate_mode, complete_mode): Update to match.
	(make_scalar_mode): Separate into make_int_mode and make_float_mode.
	(_SCALAR_MODE): Kill.
	(FLOAT_MODE, FRACTIONAL_FLOAT_MODE): Add format argument.
	(emit_insn_modes_c_header): Adjust.
	(emit_min_insn_modes_c_header, emit_real_format_for_mode)
	(emit_min_insn_modes_c): New functions.
	(emit_insn_modes_c): Call emit_real_format_for_mode.
	(main): Add -m option to generate min-insn-modes.c.
	* machmode.h: Update documentation.  Add format argument to
	all uses of FLOAT_MODE.
	* real.c: Don't define real_format_for_mode here.

	* dwarfout.c: Move default definition of PRINT_REG...
	* defaults.h: ...here.
	* print-rtl.c: Include tm_p.h.
	(DEBUG_PRINT_REG, DEBUG_REGISTER_NAMES, debug_reg_names, reg_names):
	Kill.
	(print_rtx): Use PRINT_REG, not DEBUG_PRINT_REG.  But surround
	this entire block with #ifndef GENERATOR_FILE.
	* regclass.c: Unconditionally define reg_names.
	* config/mips/mips.h, config/rs6000/rs6000.h, config/sh/sh.h
	Don't define DEBUG_REGISTER_NAMES.
	* config/rs6000/darwin.h: Don't use DEBUG_REGISTER_NAMES in
	redefinition of REGISTER_NAMES.
	* config/i386/i386.h: Don't define DEBUG_PRINT_REG.

	* combine.c: Change all preprocessor conditionals on
	EXTRA_CC_MODES to use SELECT_CC_MODE instead; rearrange a bit
	for clarity.
	* genopinit.c: Remove mention of EXTRA_CC_MODES in comment.
	* configure.in: Don't define EXTRA_CC_MODES.
	* configure, config.in: Regenerate.
	* doc/tm.texi: Remove documentation of EXTRA_CC_MODES.

	* config/arc/arc.c, config/m32r/m32r.c, config/sparc/sparc.c:
	May assume that GET_MODE_CLASS is accurate for extra CC modes
	at all times.

	* config/i860/i860.h (INIT_CUMULATIVE_ARGS): Pass correct
	number of arguments to aggregate_value_p.

	* genmodes.c (RESET_FLOAT_FORMAT, reset_float_format): New.
	* machmode.def: Explain ARCH-modes.def.  Document
	RESET_FLOAT_FORMAT.  Improve commentary on various mode
	clusters.  Do not define OI, PQI, PHI, PSI, PDI, QF, HF, TQF,
	XF, or TF modes here.  Remove backward-compatibility
	definition of CC.

	* config/alpha/alpha-modes.def: New file; define TF mode.
	* config/arc/arm-modes.def: Define XF mode.
	* config/c4x/c4x-modes.def: Define QF and HF modes.  Unset
	float format for SF and DF modes.
	* config/dsp16xx/dsp16xx-modes.def: New file; define HF mode.
	* config/i386/i386-modes.def: Define XF and TF modes.
	* config/i960/i960-modes.def: Define TF mode.
	* config/ia64/ia64-modes.def: Define TF and OI modes.
	* config/m68k/m68k-modes.def: New file; define XF mode.
	* config/mips/mips-modes.def: New file; define TF mode, reset
	formats for SF and DF modes.
	* config/pa/pa-modes.def: Define TF mode.
	* config/rs6000/rs6000.c: Define TF and PSI modes.
	* config/s390/s390-modes.def: Define OI mode.
	* config/sh/sh-modes.def: New file; define PSI mode.
	* config/sparc/sparc-modes.def: Define TF mode.
	* config/vax/vax-modes.def: New file; reset formats for SF and
	DF modes.

	* config/c4x/c4x.c (c4x_override_options): No need to mess
	with real_format_for_mode or set REAL_MODE_FORMATs.
	(c4x_immed_int_constant): Don't apply GET_MODE_CLASS to rtx
	variable.
	* config/i386/i386.c (override_options): No need to set
	REAL_MODE_FORMATs here.
	* config/i960/i960.c (i960_initialize): Likewise.
	* config/m68k/m68k.c (m68k_override_options): Likewise.
	* config/ia64/ia64.c (ia64_override_options): Set REAL_MODE_FORMAT
	for TFmode only if not the default.
	* config/mips/mips.c (override_options): Likewise.
	* config/vax/vax.c (override_optionms): Set REAL_MODE_FORMAT for
	DFmode only if not the default.

	* config/i370/i370.h (RET_REG): Don't consider TFmode.
	* config/m68hc11/m68hc11.c (print_operand): Don't consider XFmode.
	* config/dsp16xx/dsp16xx.c (hard_regno_mode_ok): #if 0 out use
	of modes that don't appear anywhere in the machine description.

	* config/arc/arc-modes.def, config/arm/arm-modes.def
	* config/c4x/c4x-modes.def, config/frv/frv-modes.def
	* config/i386/i386-modes.def, config/i960/i960-modes.def
	* config/ia64/ia64-modes.def, config/mmix/mmix-modes.def
	* config/pa/pa-modes.def, config/pdp11/pdp11-modes.def
	* config/rs6000/rs6000-modes.def, config/s390/s390-modes.def
	* config/sparc/sparc-modes.def: Convert to new style for
	declaring extra CC modes.

From-SVN: r72440
2003-10-13 21:16:33 +00:00
Kaveh R. Ghazi 75b6f3fd3a bitmap.c (debug_bitmap_file): Merge uses of HOST_PTR_PRINTF with adjacent stdio calls.
gcc:
	* bitmap.c (debug_bitmap_file): Merge uses of HOST_PTR_PRINTF with
	adjacent stdio calls.
	* c-decl.c (c_print_identifier): Likewise.
	* mips-tfile.c (write_varray, write_object, allocate_cluster): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* print-tree.c (print_node_brief, print_node): Likewise.
	* system.h (HOST_PTR_PRINTF): Ensure we have a literal string.

	* configure.in (AC_COMPILE_CHECK_SIZEOF): Check for `void *'.
	* config.in, configure: Regenerated.

cp:
	* decl.c (print_binding_level, print_other_binding_stack,
	print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
	stdio calls.
	* ptree.c (cxx_print_decl, cxx_print_binding): Likewise.

From-SVN: r69061
2003-07-08 00:35:52 +00:00
Andreas Jaeger 0c20a65f04 jump.c: Convert prototypes to ISO C90.
* jump.c: Convert prototypes to ISO C90.
	* langhooks-def.h: Likewise.  Add extern to prototypes.
	* langhooks.c: Likewise.
	* langhooks.h: Likewise.
	* lcm.c: Likewise.
	* local-alloc.c: Likewise.
	* loop-init.c: Likewise.
	* loop-unroll.c: Likewise.
	* loop-unswitch.c: Likewise.
	* loop.c: Likewise.
	* loop.h: Likewise. Add extern to prototypes.
	* machmode.h: Likewise.
	* main.c: Likewise.
	* mbchar.c: Likewise.
	* mbchar.h: Likewise.
	* mkdeps.c: Likewise.
	* mkdeps.h: Likewise.
	* optabs.c: Likewise.
	* optabs.h: Likewise.
	* output.h: Likewise.
	* gccspec.c: Likwise.
	* postreload.c: Likewise.
	* prefix.c: Likewise.
	* prefix.h: Likewise.
	* print-rtl.c: Likewise.
	* print-tree.c: Likewise.
	* profile.c: Likewise.
	* read-rtl.c: Likewise.
	* real.c: Likewise.
	* real.h: Likewise.
	* recog.c: Likewise.
	* recog.h: Likewise.
	* reg-stack.c: Likewise.
	* regclass.c: Likewise.
	* regmove.c: Likewise.
	* regrename.c: Likewise.
	* regs.h: Likewise.
	* reload.c: Likewise.
	* reload.h: Likewise.
	* reload1.c: Likewise.
	* reorg.c: Likewise.
	* resource.c: Likewise.
	* resource.h: Likewise.
	* rtl-error.c: Likewise.
	* rtl.c: Likewise.
	* rtl.h: Likewise.
	* rtlanal.c: Likewise.

From-SVN: r68998
2003-07-06 11:56:09 +02:00
Kazu Hirata 735e8085f7 gcse.c (compute_ld_motion_mems): Use INSN_P instead of its definition.
* gcse.c (compute_ld_motion_mems): Use INSN_P instead of its
	definition.
	(store_killed_in_insn): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* config/frv/frv.c (frv_final_prescan_insn): Likewise.
	* config/m68hc11/m68hc11.c (dead_register_here): Likewise.
	(m68hc11_reassign_regs): Likewise.
	(m68hc11_reorg): Likewise.

From-SVN: r68640
2003-06-28 14:56:24 +00:00
Nathanael Nerode 5e6908ea23 convert.c, [...]: Replace overly specific references to "GNU C" and "GNU C Compiler" with...
* convert.c, dwarf2out.c, dwarfout.c, emit-rtl.c, function.c,
	lists.c, print-rtl.c, print-tree.c, read-rtl.c, rtl-error.c,
	stmt.c, toplev.c, integrate.h, loop.h, machmode.h, rtl.h,
	ssa.h, tree.def: Replace overly specific references to "GNU C"
	and "GNU C Compiler" with references to "GCC".

From-SVN: r68004
2003-06-16 11:30:25 +00:00
Jan Hubicka 0435312e38 cfglayout.c (insn_scope): New static function
* cfglayout.c (insn_scope): New static function
	(block_locators_*, line_locators*, file_locators*): New static varrays.
	(scope_to_insns_initialize): Use them.
	(insn_line, insn_file): New functions.
	(scope_to_insns_finalize): Use insn_scope.
	(prologue_locator, epilogue_locator): New global variables.
	* emit-rt.c (try_split, make_insn_raw, make_jump_insn_raw,
	make_call_insn_raw, emit_copy_of_insn_after): Use locators.
	(emit_insn_after_scope, emit_insn_before_scope
	emit_jump_insn_after_scope, emit_jump_insn_before_scope
	emit_call_insn_after_scope, emit_call_insn_before_scope): Rename to...
	(emit_insn_after_setloc, emit_insn_before_setloc
	emit_jump_insn_after_setloc, emit_jump_insn_before_setloc
	emit_call_insn_after_setloc, emit_call_insn_before_setloc): ... these;
	use locators.
	* final.c (notice_source_line): Use locators.
	(final_start_function): Set initial source file and line.
	(final_scan_insn): Use locators.
	* ifcvt.c (noce_try_store_flag, noce_try_store_flag_constants,
	noce_try_addcc, noce_try_store_flag_mask, noce_try_cmove,
	noce_try_cmove_arith, noce_try_minmax, noce_try_abs,
	noce_process_if_block, find_cond_trap): Likewise.
	* integrate.c (copy_insn_list): Likewise.
	* jump.c (duplicate_loop_exit_test): LIkewise.
	* print-rtl.c (print_rtx): Print locators.
	* recog.c (peephole2_optimize): Likewise.
	* rtl.h (INSN_SCOPE): Remove.
	(emit_insn_after_scope, emit_insn_before_scope
	emit_jump_insn_after_scope, emit_jump_insn_before_scope
	emit_call_insn_after_scope, emit_call_insn_before_scope): Rename to...
	(emit_insn_after_setloc, emit_insn_before_setloc
	emit_jump_insn_after_setloc, emit_jump_insn_before_setloc
	emit_call_insn_after_setloc, emit_call_insn_before_setloc): ... these;
	(insn_file, insn_line, prologue_locator, epilogue_locator): Declare.
	* unroll.c (copy_loop_body): Use locators.
	* function.c (set_insn_locators): New function.
	(thread_prologue_and_epilogue_insns): Set the locators accordingly.

From-SVN: r67637
2003-06-08 19:35:54 +00:00
Kaveh R. Ghazi 90ff44cfd6 cfgloopanal.c (test_for_iteration): Use string concatentation on HOST_WIDE_INT_PRINT_* format specifier to collapse...
gcc:
	* cfgloopanal.c (test_for_iteration): Use string concatentation on
	HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
	function calls into one.
	* dbxout.c (dbxout_symbol): Likewise.
	* defaults.h (ASM_OUTPUT_SIZE_DIRECTIVE): Likewise.
	* dwarf2asm.c (dw2_asm_output_data_uleb128,
	dw2_asm_output_data_sleb128): Likewise.
	* genrecog.c (debug_decision_2): Likewise.
	* loop.c (emit_prefetch_instructions): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* print-tree.c (print_node_brief, print_node): Likewise.
	* ra-debug.c (dump_igraph, dump_graph_cost,
	dump_static_insn_cost): Likewise.
	* ra-rewrite.c (dump_cost): Likewise.
	* sdbout.c (PUT_SDB_INT_VAL, PUT_SDB_SIZE): Likewise.
	* sreal.c (dump_sreal): Likewise.
	* unroll.c (unroll_loop, precondition_loop_p): Likewise.
	* varasm.c (assemble_vtable_entry): Likewise.

cp:
	* ptree.c (cxx_print_type, cxx_print_xnode): Use string
	concatentation on HOST_WIDE_INT_PRINT_* format specifier to
	collapse multiple function calls into one.
	* tree.c (debug_binfo): Likewise.

java:
	* parse.y (print_int_node): Use string concatentation on
	HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
	function calls into one.

From-SVN: r66900
2003-05-17 01:40:45 +00:00
Richard Henderson 52859c77e9 rtl.def (SYMBOL_REF): Add two 0 fields.
* rtl.def (SYMBOL_REF): Add two 0 fields.
        * gengtype.c (adjust_field_rtx_def): Handle them.
        * print-rtl.c (print_rtx): Print them.
        * rtl.h (SYMBOL_REF_DECL, SYMBOL_REF_FLAGS): New.
        (SYMBOL_FLAG_FUNCTION, SYMBOL_REF_FUNCTION_P): New.
        (SYMBOL_FLAG_LOCAL, SYMBOL_REF_LOCAL_P): New.
        (SYMBOL_FLAG_SMALL, SYMBOL_REF_SMALL_P): New.
        (SYMBOL_FLAG_TLS_SHIFT, SYMBOL_REF_TLS_MODEL): New.
        (SYMBOL_FLAG_EXTERNAL, SYMBOL_REF_EXTERNAL_P): New.
        (SYMBOL_FLAG_MACH_DEP): New.
        * optabs.c (init_one_libfunc): Zap fake SYMBOL_REF_DECL.
        * varasm.c (make_decl_rtl): Set SYMBOL_REF_DECL.
        (assemble_static_space): Set SYMBOL_REF_FLAGS.
        (assemble_trampoline_template): Likewise.
        (output_constant_def, force_const_mem): Likewise.
        (default_encode_section_info): New.
        * output.h: Declare it.
        * target-def.h (TARGET_ENCODE_SECTION_INFO): Use it.

From-SVN: r65479
2003-04-11 14:15:36 -07:00
Alexandre Oliva 6ebd2ef442 print-rtl.c (print_rtx): Don't print MEM details in GENERATOR_FILEs.
* print-rtl.c (print_rtx): Don't print MEM details in
GENERATOR_FILEs.

From-SVN: r61822
2003-01-26 08:59:54 +00:00
Jan Hubicka a560d4d4d9 emit-rtl.c (reg_attrs_htab): New static variable.
* emit-rtl.c (reg_attrs_htab): New static variable.
	(reg_attrs_htab_hash, reg_attrs_htab_eq, get_reg_attrs): New static
	functions.
	(reg_rtx): Do not maintain regno_decl.
	(gen_rtx_REG_offset, set_reg_attrs_from_mem, set_delc_rtx,
	set_mem_attrs_from_reg): New global function.
	(init_emit): Do not initialize regno_decl.
	(init_emit_once): initialize reg_attrs_htab.
	* final.c (alter_subreg): Do not replace REG by SUBREG.
	(gen_mem_expr_from_op): Improve output.
	(output_asm_operands): Likewise.
	* function.c (assign_params): Do not set REGNO_DECL.
	* function.h (struct function): Kill regno_decl.
	(REGNO_DECL): Kill.
	* gengtype.c (adjust_field_rtx_def): Handle new field of reg.
	* print_rtl.c (print_rtx): Output REG information.
	* regclass.c (reg_scan_mark_refs): Update attrs.
	* reload1.c (alter_reg): Likewise.
	* simplify_rtx.c (simplify_subreg): Likewise.
	* stmt.c (expand_decl): Likewise.
	* rtl.def (REG): Add new field.
	* rtl.h (struct reg_attrs): New.
	(rtunion_def): At rtreg.
	(X0MEMATTR): Add checking.
	(X0REGATTR, REG_ATTRS, REG_EXPR, REG_OFFSET): New macro.
	(set_reg_attrs_from_mem, set_mem_attrs_from_reg, gen_rtx_REG_offset):
	Declare.
	* tree.h (SET_DECL_RTL): Call set_decl_rtl.

From-SVN: r61741
2003-01-24 22:45:58 +00:00
Zack Weinberg 4977bab6ed Merge basic-improvements-branch to trunk
From-SVN: r60174
2002-12-16 18:23:00 +00:00
Richard Henderson da6eec72f5 real.c (real_to_decimal): Accept BUF_SIZE and CROP_TRAILING_ZEROS as arguments.
gcc/
        * real.c (real_to_decimal): Accept BUF_SIZE and CROP_TRAILING_ZEROS
        as arguments.  Bound DIGITS by the available buffer size.
        (real_to_hexadecimal): Likewise.
        * real.h (real_to_decimal, real_to_hexadecimal): Update prototypes.
        (REAL_VALUE_TO_DECIMAL): Remove.
        * c-common.c, c-pretty-print.c, print-rtl.c, print-tree.c,
        sched-vis.c, config/arc/arc.c, config/c4x/c4x.c, config/fr30/fr30.c,
        config/i370/i370.h, config/i386/i386.c, config/i960/i960.c,
        config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c,
        config/m68k/hp320.h, config/m68k/m68k.h, config/m68k/sun2o4.h,
        config/m68k/sun3.h, config/mips/mips.c, config/ns32k/ns32k.c,
        config/pdp11/pdp11.h, config/vax/vax.h: Update all callers to
        use real_to_decimal directly, and with the proper arguments.
        * doc/tm.texi (REAL_VALUE_TO_DECIMAL): Remove.

gcc/cp/
        * error.c (dump_expr): Use real_to_decimal directly, and with
        the new arguments.

gcc/f/
        * target.h (ffetarget_print_real1, ffetarget_print_real2): Use
        real_to_decimal directly, and with the new arguments.

From-SVN: r58187
2002-10-15 17:40:39 -07:00
Jan Hubicka 4fdbcfb2c4 Tue Oct 8 16:50:10 CEST 2002 Jan Hubicka <jh@suse.cz>
* print-rtl.c (print_rtx): Increase buffer size for real numbers.

From-SVN: r57925
2002-10-08 14:50:58 +00:00
Richard Henderson 69bd00e681 real.c (real_to_decimal): Crop trailing zeros for DIGITS < 0.
* real.c (real_to_decimal): Crop trailing zeros for DIGITS < 0.
        (real_to_hexadecimal): Likewise.
        * print-rtl.c (print_rtx): If we are linked with real.c, don't
        dump the XWINT fields of a floating point CONST_DOUBLE.

From-SVN: r57719
2002-10-01 19:38:02 -07:00
Richard Henderson 4d2d910c10 Makefile.in (HOST_PRINT): Use print-rtl1.o
* Makefile.in (HOST_PRINT): Use print-rtl1.o
        (print-rtl.o): Don't define GENERATOR_FILE.
        (print-rtl1.o): Rename from $(BUILD_PREFIX_1)print-rtl.o.
        * print-rtl.c (print_rtx): Include CONST_DOUBLE fp decimal output
        unless GENERATOR_FILE.

From-SVN: r57092
2002-09-12 23:28:21 -07:00
Richard Henderson 4b67a27441 real.c (ereal_to_decimal): Add digits parameter.
* real.c (ereal_to_decimal): Add digits parameter.
	* real.h (REAL_VALUE_TO_DECIMAL): Remove format; add digits parameter.
	* c-pretty-print.c (pp_c_real_literal): Update call.
	* print-rtl.c (print_rtx): Likewise.
	* print-tree.c (print_node_brief, print_node): Likewise.
	* sched-vis.c (print_value): Likewise.
	* config/arc/arc.c (arc_print_operand): Likewise.
	* config/c4x/c4x.c (c4x_print_operand): Likewise.
	* config/i370/i370.h (PRINT_OPERAND): Likewise.
	* config/i386/i386.c (print_operand): Likewise.
	* config/i960/i960.c (i960_print_operand): Likewise.
	* config/ip2k/ip2k.c (asm_output_float): Likewise.
	* config/m32r/m32r.c (m32r_print_operand): Likewise.
	* config/m68hc11/m68hc11.c (print_operand): Likewise.
	* config/m68k/hp320.h (PRINT_OPERAND, ASM_OUTPUT_FLOAT_OPERAND,
	ASM_OUTPUT_DOUBLE_OPERAND, ASM_OUTPUT_LONG_DOUBLE_OPERAND): Likewise.
	* config/m68k/m68k.h (ASM_OUTPUT_FLOAT_OPERAND,
	ASM_OUTPUT_DOUBLE_OPERAND, ASM_OUTPUT_LONG_DOUBLE_OPERAND): Likewise.
	* config/m68k/sun2o4.h (ASM_OUTPUT_FLOAT_OPERAND,
	ASM_OUTPUT_DOUBLE_OPERAND): Likewise.
	* config/m68k/sun3.h (ASM_OUTPUT_FLOAT_OPERAND,
	ASM_OUTPUT_DOUBLE_OPERAND): Likewise.
	* config/mips/mips.c (print_operand): Likewise.
	* config/ns32k/ns32k.c (print_operand): Likewise.
	* config/pdp11/pdp11.h (PRINT_OPERAND): Likewise.
	* config/vax/vax.h (PRINT_OPERAND): Likewise.
	* doc/tm.texi (REAL_VALUE_TO_DECIMAL): Update docs.

        * f/target.h (ffetarget_print_real1, ffetarget_print_real2): Update
        call to REAL_VALUE_TO_DECIMAL.

From-SVN: r56798
2002-09-04 09:24:24 -07:00
Richard Henderson c67a1cf6a8 emit-rtl.c (set_mem_attributes): Preserve indirection of PARM_DECL when flag_argument_noalias == 2.
* emit-rtl.c (set_mem_attributes): Preserve indirection of PARM_DECL
        when flag_argument_noalias == 2.
        * alias.c (nonoverlapping_memrefs_p): Handle that.
        * print-rtl.c (print_mem_expr): Likewise.

From-SVN: r55633
2002-07-21 17:23:47 -07:00
Zack Weinberg 0dc36574af rtl.def (CODE_LABEL): Remove slot 8.
* rtl.def (CODE_LABEL): Remove slot 8.
	* rtl.h (struct rtx_def): Document new uses of jump and call fields.
	(LABEL_ALTERNATE_NAME): Delete.
	(LABEL_KIND, SET_LABEL_KIND, LABEL_ALT_ENTRY_P): New.
	* defaults.h: Remove default for ASM_OUTPUT_ALTERNATE_LABEL_NAME.

	* final.c (output_alternate_entry_point): New.
	(final_scan_insn): Use it instead of
	ASM_OUTPUT_ALTERNATE_LABEL_NAME.  Do not consider possibility
	of a case label being an alternate entry point.

	* cfgbuild.c (make_edges, find_bb_boundaries): Use LABEL_ALT_ENTRY_P.
	* emit-rtl.c (gen_label_rtx): Adjust call to gen_rtx_CODE_LABEL.
	Do not clear LABEL_NUSES (unnecessary) or LABEL_ALTERNATE_NAME
	(field deleted).
	* print-rtl.c, ra-debug.c: Update code to output CODE_LABELs.

	* doc/rtl.texi: Document LABEL_KIND, SET_LABEL_KIND, and
	LABEL_ALT_ENTRY_P; not LABEL_ALTERNATE_NAME.
	* doc/tm.texi: Delete documentation of
	ASM_OUTPUT_ALTERNATE_LABEL_NAME.

From-SVN: r55597
2002-07-19 23:11:19 +00:00
Richard Henderson 32c36ac87a print-rtl.c (print_rtx): Adjust NOTE argument numbers for 2002-06-02 change.
* print-rtl.c (print_rtx): Adjust NOTE argument numbers for
        2002-06-02 change.

From-SVN: r54762
2002-06-18 13:12:13 -07:00
Andreas Schwab 7f11f1f9ac print-rtl.c (print_rtx): Print space before vector, not after.
* print-rtl.c (print_rtx): Print space before vector, not after.
	(debug_rtx): Clear sawclose before printing.
	(debug_rtx_list): Print newline after each list element.
	(debug_rtx_range): Likewise.

From-SVN: r54712
2002-06-17 19:13:46 +00:00
Jakub Jelinek 50f30e6b07 re PR c/6809 (GCC 3.1 cc1 crashes if -fverbose-asm is specified)
PR c/6809
	* print-rtl.c (print_mem_expr): Don't crash on unnamed fields.

	* gcc.dg/20020530-1.c: New test.

From-SVN: r54463
2002-06-10 23:50:10 +02:00
Jan Hubicka 63f4a88e28 Tue Jun 4 19:29:42 CEST 2002 Jan Hubicka <jh@suse.cz>
* cfglayout.c (duplicate_insn_chain): Kill NOTE_INSN_RANGE notes.
	* final.c (final_scan_insn): Likewise.
	* ggc-common.c (ggc_mark_rtx_children_1): Likewise; use
	NOTE_EXPECTED_VALUE instead of NOTE_RANGE.
	* haifa-sched.c (unlink_other_notes): Likeewise.
	(reemit_notes): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* sched-deps (sched-analyze): Likewise.
	* rtl.c (note_insn_name): Likewise.
	* rtl.h (NOTE_RANGE_INFO, NOTE_LIVE_INFO): Kill.
	(enum insn_note): Kill NOTE_INSN_RANGE_*, NOTE_INSN_LIVE.
	(RANGE_*): Kill.

From-SVN: r54250
2002-06-04 17:32:59 +00:00
Jan Hubicka ba4f7968b5 loop.c (emit_prefetch_instructions): Properly place the address computation.
* loop.c (emit_prefetch_instructions): Properly place the address computation.


	* basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill.
	(set_block_for_insn): Turn into macro.
	* cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn.
	* cfglayout.c (insn_scopes): Kill.
	(scope_to_insns_initialize): Do not use insn_scopes.
	(scope_to_insns_finalize): Likewise.
	(duplicate_insn_chain): Likewise.
	(cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes.
	* cfgrtl.c (basic_block_for_insn): Kill.
	(delete_insn_and_edges, delete_insn_chain_and_edges): Simplify.
	(create_basic_block_structure): Use reorder_insns.
	(compute_bb_for_insn): Do not use basic_block_for_insn.
	(merge_blocks_nomove): Likewise.
	(update_bb_for_insn): Likewise.
	(verify_flow_info): Likewise.
	(set_block_for_insn): Kill.
	* combine.c (try_combine): Update gen_rtx_INSN call.
	* emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call.
	(mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear
	scopes and BBs.
	(add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify.
	(emit_note_before, emit_note_after, emit_line_note_after, emit_note):
	Clear BB.
	(emit_insns_after): Simplify.
	(emit_copy_of_insn_after): Copy scope.
	* final.c (final_start_function): Lower scopes.
	* flow.c (check_function_return_warnings): Do not rely on deleted insn.
	* integrate.c (copy_insn_list): Cope scopes.
	* jump.c (duplicate_loop_exit_test): LIkewise; simplify.
	* loop.c (loop_optimize): Do not care block notes.
	* print-rtl.c (print_rtx): Print BB.
	* recog.c (apply_change_group): Simplify.
	* rtl.c (copy_rtx): Handle 'B'.
	* rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields.
	* rtl.h (Field accessors): Update indexes.
	* sched-ebb.c (schedule_ebbs): Do not lower notes.
	* sched-rgn.c (schedule_insns): Likewise.
	* toplev.c (rest_of_compilation): Lower notes.
	* unroll.c (unroll_loop): Do not care scoping notes.
	(copy_loop_body): Copy scopes.

From-SVN: r54188
2002-06-02 21:09:54 +00:00
Kazu Hirata 6a4d67604e params.c: Fix formatting.
* params.c: Fix formatting.
	* params.h: Likewise.
	* predict.c: Likewise.
	* prefix.c: Likewise.
	* print-rtl.c: Likewise.
	* print-tree.c: Likewise.
	* profile.c: Likewise.

From-SVN: r53670
2002-05-20 18:06:55 +00:00
Richard Henderson 0b17ab2f5b Revert "Basic block renumbering removal", and two followup patches.
From-SVN: r53537
2002-05-16 19:31:56 -07:00