Commit Graph

75 Commits

Author SHA1 Message Date
DJ Delorie 7acf4da6f9 MAINTAINERS: Add myself as mep maintainer.
[toplevel]

	* MAINTAINERS: Add myself as mep maintainer.

[gcc]

	Add MeP port.
	* config.gcc: Add mep support.
	* recog.c: Resurrect validate_replace_rtx_subexp().
	* recog.h: Likewise.
	* config/mep/: Add new port:
	* config/mep/constraints.md: New file.
	* config/mep/default.h: New file.
	* config/mep/intrinsics.h: New file.
	* config/mep/intrinsics.md: New file.
	* config/mep/ivc2-template.h: New file.
	* config/mep/mep-c5.cpu: New file.
	* config/mep/mep-core.cpu: New file.
	* config/mep/mep-default.cpu: New file.
	* config/mep/mep-ext-cop.cpu: New file.
	* config/mep/mep-intrin.h: New file.
	* config/mep/mep-ivc2.cpu: New file.
	* config/mep/mep-lib1.asm: New file.
	* config/mep/mep-lib2.c: New file.
	* config/mep/mep-pragma.c: New file.
	* config/mep/mep-protos.h: New file.
	* config/mep/mep-tramp.c: New file.
	* config/mep/mep.c: New file.
	* config/mep/mep.cpu: New file.
	* config/mep/mep.h: New file.
	* config/mep/mep.md: New file.
	* config/mep/mep.opt: New file.
	* config/mep/predicates.md: New file.
	* config/mep/t-mep: New file.

[gcc/testsuite]

	Add MeP port.
	* lib/target-supports.exp: Add mep support (no profiling).

[libgcc]

	Add MeP port.
	* config.host: Add mep support.

[libstdc++-v3]

	Add MeP port.
	* configure.host: Add mep support.

From-SVN: r148890
2009-06-24 00:16:25 -04:00
Jakub Jelinek eca72963aa re PR inline-asm/39058 (ICE with double in inline-asm)
PR inline-asm/39058
	* recog.h (asm_operand_ok): Add constraints argument.
	* recog.c (asm_operand_ok): Likewise.  If it is set, for digits
	recurse on matching constraint.
	(check_asm_operands): Pass constraints as 3rd argument to
	asm_operand_ok.  Don't look up matching constraint here.
	* stmt.c (expand_asm_operands): Pass NULL as 3rd argument
	to asm_operand_ok.

	* gcc.target/i386/pr39058.c: New test.

From-SVN: r143867
2009-02-02 14:23:43 +01:00
Andrey Belevantsev e855c69d16 sel-sched.h, [...]: New files.
2008-08-31  Andrey Belevantsev  <abel@ispras.ru>
        Dmitry Melnik  <dm@ispras.ru>
        Dmitry Zhurikhin  <zhur@ispras.ru>
        Alexander Monakov  <amonakov@ispras.ru>
        Maxim Kuvyrkov  <maxim@codesourcery.com>

	* sel-sched.h, sel-sched-dump.h, sel-sched-ir.h, sel-sched.c,
	sel-sched-dump.c, sel-sched-ir.c: New files.
	* Makefile.in (OBJS-common): Add selective scheduling object
	files.
	(sel-sched.o, sel-sched-dump.o, sel-sched-ir.o): New entries.
	(SEL_SCHED_IR_H, SEL_SCHED_DUMP_H): New entries.
	(sched-vis.o): Add dependency on $(INSN_ATTR_H).
	* cfghooks.h (get_cfg_hooks, set_cfg_hooks): New prototypes.
	* cfghooks.c (get_cfg_hooks, set_cfg_hooks): New functions.
	(make_forwarder_block): Update loop latch if we have redirected
	the loop latch edge.
	* cfgloop.c (get_loop_body_in_custom_order): New function.
	* cfgloop.h (LOOPS_HAVE_FALLTHRU_PREHEADERS): New enum field.
	(CP_FALLTHRU_PREHEADERS): Likewise.
	(get_loop_body_in_custom_order): Declare.
	* cfgloopmanip.c (has_preds_from_loop): New.
	(create_preheader): Honor CP_FALLTHRU_PREHEADERS.
	Assert that the preheader edge will be fall thru when it is set.
	* common.opt (fsel-sched-bookkeeping, fsel-sched-pipelining,
	fsel-sched-pipelining-outer-loops, fsel-sched-renaming,
	fsel-sched-substitution, fselective-scheduling): New flags.
    	* cse.c (hash_rtx_cb): New.
	(hash_rtx): Use it.
	* dbgcnt.def (sel_sched_cnt, sel_sched_region_cnt,
	sel_sched_insn_cnt): New counters. 
	* final.c (compute_alignments): Export.  Free dominance info after loop_optimizer_finalize.
	* genattr.c (main): Output maximal_insn_latency prototype.
	* genautomata.c (output_default_latencies): New. Factor its code from ...
	(output_internal_insn_latency_func): ... here.
	(output_internal_maximal_insn_latency_func): New.
	(output_maximal_insn_latency_func): New.
	* hard-reg-set.h (UHOST_BITS_PER_WIDE_INT): Define unconditionally.
	(struct hard_reg_set_iterator): New.
	(hard_reg_set_iter_init, hard_reg_set_iter_set,
	hard_reg_set_iter_next): New functions.
	(EXECUTE_IF_SET_IN_HARD_REG_SET): New macro.
	* lists.c (remove_free_INSN_LIST_node,
	remove_free_EXPR_LIST_node): New functions.
	* loop-init.c (loop_optimizer_init): When LOOPS_HAVE_FALLTHRU_PREHEADERS,
	set CP_FALLTHRU_PREHEADERS when calling create_preheaders.
	(loop_optimizer_finalize): Do not verify flow info after reload.
	* recog.c (validate_replace_rtx_1): New parameter simplify.
	Default it to true.  Update all uses.  Factor out simplifying
	code to ...
	(simplify_while_replacing): ... this new function.
	(validate_replace_rtx_part,
	validate_replace_rtx_part_nosimplify): New.
	* recog.h (validate_replace_rtx_part,
	validate_replace_rtx_part_nosimplify): Declare.
	* rtl.c (rtx_equal_p_cb): New.
	(rtx_equal_p): Use it.
	* rtl.h (rtx_equal_p_cb, hash_rtx_cb): Declare.
	(remove_free_INSN_LIST_NODE, remove_free_EXPR_LIST_node,
	debug_bb_n_slim, debug_bb_slim,    print_rtl_slim): Likewise.
	* vecprim.h: Add a vector type for unsigned int. 
	* haifa-sched.c: Include vecprim.h and cfgloop.h.
	(issue_rate, sched_verbose_param, note_list, dfa_state_size,
	ready_try, cycle_issued_insns, spec_info): Make global.
	(readyp): Initialize.
	(dfa_lookahead): New global variable.
	(old_max_uid, old_last_basic_block): Remove.
	(h_i_d): Make it a vector.
	(INSN_TICK, INTER_TICK, QUEUE_INDEX, INSN_COST): Make them work
	through HID macro.
	(after_recovery, adding_bb_to_current_region_p):
	New variables to handle correct insertion of the recovery code.
	(struct ready_list): Move declaration to sched-int.h.
	(rgn_n_insns): Removed.
	(rtx_vec_t): Move to sched-int.h.
	(find_insn_reg_weight): Remove.
	(find_insn_reg_weight1): Rename to find_insn_reg_weight.
	(haifa_init_h_i_d, haifa_finish_h_i_d):
	New functions to initialize / finalize haifa instruction data.
	(extend_h_i_d, init_h_i_d): Rewrite.
	(unlink_other_notes): Move logic to add_to_note_list.  Handle
	selective scheduler.
	(ready_lastpos, ready_element, ready_sort, reemit_notes,
	find_fallthru_edge): Make global, remove static prototypes.
	(max_issue): Make global.  Add privileged_n and state parameters.  Use
	them.  
	(extend_global, extend_all): Removed.
	(init_before_recovery): Add new param.  Fix the handling of the case
	when we insert a recovery code before the EXIT which has a predecessor
	with a fallthrough edge to it.
	(create_recovery_block): Make global.  Rename to
	sched_create_recovery_block.  Update.
	(change_pattern): Rename to sched_change_pattern.  Make global.
	(speculate_insn): Rename to sched_speculate_insn.  Make global.
	Split haifa-specific functionality into ...
	(haifa_change_pattern): New static function.
	(sched_extend_bb): New static function.
	(sched_init_bbs): New function.
	(current_sched_info): Change type to struct haifa_sched_info.
	(insn_cost): Adjust for selective scheduling.
	(dep_cost_1): New function.  Move logic from ...
	(dep_cost): ... here.
	(dep_cost): Use dep_cost_1.
	(contributes_to_priority_p): Use sched_deps_info instead of
	current_sched_info.
	(priority): Adjust to work with selective scheduling.  Process the
	corner case when all dependencies don't contribute to priority.
	(rank_for_schedule): Use ds_weak instead of dep_weak.
	(advance_state): New function.  Move logic from ...
	(advance_one_cycle): ... here.
	(add_to_note_list, concat_note_lists): New functions.
	(rm_other_notes): Make static.  Adjust for selective scheduling.
	(remove_notes, restore_other_notes): New functions.
	(move_insn): Add two arguments.  Update assert.  Don't call
	reemit_notes.
	(choose_ready): Remove lookahead variable, use dfa_lookahead.
	Remove more_issue, max_points.  Move the code to initialize
	max_lookahead_tries to max_issue.
	(schedule_block): Remove rgn_n_insns1 parameter.  Don't allocate
	ready.  Adjust use of move_insn.  Call restore_other_notes.
	(luid): Remove.
	(sched_init, sched_finish): Move Haifa-specific initialization/
	finalization to ...
	(haifa_sched_init, haifa_sched_finish): ... respectively.
	New functions.
	(setup_sched_dump): New function.
	(haifa_init_only_bb): New static function.
	(haifa_speculate_insn): New static function.
	(try_ready): Use haifa_* instead of speculate_insn and
	change_pattern.
	(extend_ready, extend_all): Remove.
	(sched_extend_ready_list, sched_finish_ready_list): New functions.
	(create_check_block_twin, add_to_speculative_block): Use
	haifa_insns_init instead of extend_global.  Update to use new
	initialization functions.  Change parameter.  Factor out code from
	create_check_block_twin to ...
	(sched_create_recovery_edges) ... this new function.
	(add_block): Remove.
	(sched_scan_info): New.
	(extend_bb): Use sched_scan_info.
	(init_bb, extend_insn, init_insn, init_insns_in_bb, sched_scan): New
	static functions for walking through scheduling region.
	(sched_luids): New vector variable to replace uid_to_luid.
	(luids_extend_insn): New function.
	(sched_max_luid): New variable.
	(luids_init_insn): New function.
	(sched_init_luids, sched_finish_luids): New functions.
	(insn_luid): New debug function.
	(sched_extend_target): New function.
	(haifa_init_insn): New static function.
	(sched_init_only_bb): New hook.
	(sched_split_block): New hook.
	(sched_split_block_1): New function.
	(sched_create_empty_bb): New hook.
	(sched_create_empty_bb_1): New function.	
	(common_sched_info, ready): New global variables.
	(current_sched_info_var): Remove.
	(move_block_after_check): Use common_sched_info.		
	(haifa_luid_for_non_insn): New static function.	
	(init_before_recovery): Use haifa_init_only_bb instead of
	add_block.
	(increase_insn_priority): New.
	* modulo-sched.c: (issue_rate): Remove static declaration.
	(sms_sched_info): Change type to haifa_sched_info.
	(sms_sched_deps_info, sms_common_sched_info): New variables.
	(setup_sched_infos): New.
	(sms_schedule): Initialize them.  Call haifa_sched_init/finish.
	Do not call regstat_free_calls_crossed.
	(sms_print_insn): Use const_rtx.
	* params.def (PARAM_MAX_PIPELINE_REGION_BLOCKS,
	PARAM_MAX_PIPELINE_REGION_INSNS, PARAM_SELSCHED_MAX_LOOKAHEAD,
	PARAM_SELSCHED_MAX_SCHED_TIMES, PARAM_SELSCHED_INSNS_TO_RENAME,
	PARAM_SCHED_MEM_TRUE_DEP_COST): New.
	* sched-deps.c (sched_deps_info): New.  Update all relevant uses of
	current_sched_info to use it.
	(enum reg_pending_barrier_mode): Move to sched-int.h.
	(h_d_i_d): New variable. Initialize to NULL.
	({true, output, anti, spec, forward}_dependency_cache): Initialize
	to NULL.
	(estimate_dep_weak): Remove static declaration.
	(sched_has_condition_p): New function.  Adjust users of
	sched_get_condition to use it instead.
	(conditions_mutex_p): Add arguments indicating which conditions are
	reversed.  Use them.
	(sched_get_condition_with_rev): Rename from sched_get_condition.  Add
	argument to indicate whether returned condition is reversed.  Do not
	generate new rtx when condition should be reversed; indicate it by
	setting new argument instead.
	(add_dependence_list_and_free): Add deps parameter.
	Update all users.  Do not free dependence list when
	deps context is readonly.
	(add_insn_mem_dependence, flush_pending_lists): Adjust for readonly
	contexts.
	(remove_from_dependence_list, remove_from_both_dependence_lists): New.
	(remove_from_deps): New. Use the above functions.	
	(cur_insn, can_start_lhs_rhs_p): New static variables.
	(add_or_update_back_dep_1): Initialize present_dep_type.
	(haifa_start_insn, haifa_finish_insn, haifa_note_reg_set,
	haifa_note_reg_clobber, haifa_note_reg_use, haifa_note_mem_dep,
	haifa_note_dep): New functions implementing dependence hooks for
	the Haifa scheduler.
	(note_reg_use, note_reg_set, note_reg_clobber, note_mem_dep,
	note_dep): New functions.
	(ds_to_dt, extend_deps_reg_info, maybe_extend_reg_info_p): New
	functions.
	(init_deps): Initialize last_reg_pending_barrier and deps->readonly.
	(free_deps): Initialize deps->reg_last.
	(sched_analyze_reg, sched_analyze_1, sched_analyze_2,
	sched_analyze_insn): Update to use dependency hooks infrastructure
	and readonly contexts.
	(deps_analyze_insn): New function.  Move part of logic from ...
	(sched_analyze): ... here.  Also move some logic to ...
	(deps_start_bb): ... here.  New function.
	(add_forw_dep, delete_forw_dep): Guard use of INSN_DEP_COUNT with
	sel_sched_p.
	(sched_deps_init): New function.  Move code from ...
	(init_dependency_caches): ... here.  Remove.
	(init_deps_data_vector): New.
	(sched_deps_finish): New function.  Move code from ...
	(free_dependency_caches): ... here.  Remove.
	(init_deps_global, finish_deps_global): Adjust for use with
	selective scheduling.
	(get_dep_weak): Move logic to ...
	(get_dep_weak_1): New function.
	(ds_merge): Move logic to ...
	(ds_merge_1): New static function.
	(ds_full_merge, ds_max_merge, ds_get_speculation_types): New functions.
	(ds_get_max_dep_weak): New function.
	* sched-ebb.c (sched_n_insns): Rename to sched_rgn_n_insns.
	(n_insns): Rename to rgn_n_insns.
	(debug_ebb_dependencies): New function.
	(init_ready_list): Use it.
	(begin_schedule_ready): Use sched_init_only_bb.
	(ebb_print_insn): Indicate when an insn starts a new cycle.
	(contributes_to_priority, compute_jump_reg_dependencies,
	add_remove_insn, fix_recovery_cfg): Add ebb_ prefix to function names.
	(add_block1): Remove to ebb_add_block.
	(ebb_sched_deps_info, ebb_common_sched_info): New variables.
	(schedule_ebb): Initialize them.  Use remove_notes instead of
	rm_other_notes.  Use haifa_local_init/finish.
	(schedule_ebbs): Use haifa_sched_init/finish.
	* sched-int.h: Include vecprim.h, remove rtl.h.
	(struct ready_list): Delete declaration.
	(sched_verbose_param, enum sched_pass_id_t,
	bb_vec_t, insn_vec_t, rtx_vec_t): New.
	(struct sched_scan_info_def): New structure.
	(sched_scan_info, sched_scan, sched_init_bbs,
	sched_init_luids, sched_finish_luids, sched_extend_target,
	haifa_init_h_i_d, haifa_finish_h_i_d): Declare.
	(struct common_sched_info_def): New.
	(common_sched_info, haifa_common_sched_info,
	sched_emulate_haifa_p): Declare.
	(sel_sched_p): New.
	(sched_luids): Declare.
	(INSN_LUID, LUID_BY_UID, SET_INSN_LUID): Declare.
	(sched_max_luid, insn_luid): Declare.
	(note_list, remove_notes, restore_other_notes, bb_note): Declare.
	(sched_insns_init, sched_insns_finish, xrecalloc, reemit_notes,
	print_insn, print_pattern, print_value, haifa_classify_insn,
	sel_find_rgns, sel_mark_hard_insn, dfa_state_size, advance_state,
	setup_sched_dump, sched_init, sched_finish,
	sel_insn_is_speculation_check): Export.
	(struct ready_list): Move from haifa-sched.c.
	(ready_try, ready, max_issue): Export.
	(ebb_compute_jump_reg_dependencies, find_fallthru_edge,
	sched_init_only_bb, sched_split_block, sched_split_block_1,
	sched_create_empty_bb, sched_create_empty_bb_1,
	sched_create_recovery_block, sched_create_recovery_edges): Export.
	(enum reg_pending_barrier_mode): Export.
	(struct deps): New fields `last_reg_pending_barrier' and `readonly'.
	(deps_t): New.
	(struct sched_info): Rename to haifa_sched_info.  Use const_rtx for
	print_insn field.  Move add_block and fix_recovery_cfg to
	common_sched_info_def.  Move compute_jump_reg_dependencies, use_cselib  ...
	(struct sched_deps_info_def): ... this new structure.
	(sched_deps_info): Declare.
	(struct spec_info_def): Remove weakness_cutoff, add
	data_weakness_cutoff and control_weakness_cutoff.
	(spec_info): Declare.
	(struct _haifa_deps_insn_data): Split from haifa_insn_data.  Add
	dep_count field.
	(struct haifa_insn_data): Rename to struct _haifa_insn_data.
	(haifa_insn_data_def, haifa_insn_data_t): New typedefs.
	(current_sched_info): Change type to struct haifa_sched_info.
	(haifa_deps_insn_data_def, haifa_deps_insn_data_t): New typedefs.
	(h_d_i_d): New variable.
	(HDID): New accessor macro.
	(h_i_d): Change type to VEC (haifa_insn_data_def, heap) *.
	(HID): New accessor macro.  Rewrite h_i_d accessor macros through HID
	and HDID.
	(IS_SPECULATION_CHECK_P): Update for selective scheduler.
	(enum SCHED_FLAGS): Update for selective scheduler.
	(enum SPEC_SCHED_FLAGS): New flag SEL_SCHED_SPEC_DONT_CHECK_CONTROL.
	(init_dependency_caches, free_dependency_caches): Delete declarations.
	(deps_analyze_insn, remove_from_deps, get_dep_weak_1,
	estimate_dep_weak, ds_full_merge, ds_max_merge, ds_weak,
	ds_get_speculation_types, ds_get_max_dep_weak, sched_deps_init,
	sched_deps_finish, haifa_note_reg_set, haifa_note_reg_use,
	haifa_note_reg_clobber, maybe_extend_reg_info_p, deps_start_bb,
	ds_to_dt): Export.
	(rm_other_notes): Delete declaration.
	(schedule_block): Remove one argument.
	(cycle_issued_insns, issue_rate, dfa_lookahead, ready_sort,
	ready_element, ready_lastpos, sched_extend_ready_list,
	sched_finish_ready_list, sched_change_pattern, sched_speculate_insn,
	concat_note_lists): Export.
	(struct region): Move from sched-rgn.h.
	(nr_regions, rgn_table, rgn_bb_table, block_to_bb, containing_rgn,
	RGN_NR_BLOCKS, RGN_BLOCKS, RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB,
	BLOCK_TO_BB, CONTAINING_RGN): Export.
	(ebb_head, BB_TO_BLOCK, EBB_FIRST_BB, EBB_LAST_BB, INSN_BB): Likewise.
	(current_nr_blocks, current_blocks, target_bb): Likewise.
	(dep_cost_1, sched_is_disabled_for_current_region_p, sched_rgn_init,
	sched_rgn_finish, rgn_setup_region, sched_rgn_compute_dependencies,
	sched_rgn_local_init, extend_regions,
	rgn_make_new_region_out_of_new_block, compute_priorities,
	debug_rgn_dependencies, free_rgn_deps, contributes_to_priority,
	extend_rgns, deps_join rgn_setup_common_sched_info,
	rgn_setup_sched_infos, debug_regions, debug_region, dump_region_dot,
	dump_region_dot_file, haifa_sched_init, haifa_sched_finish): Export.
	(get_rgn_sched_max_insns_priority, sel_add_to_insn_priority, 
	increase_insn_priority): Likewise.
	* sched-rgn.c: Include sel-sched.h.
	(ref_counts): New static variable.  Use it ...
	(INSN_REF_COUNT): ... here.  Rewrite and move closer to uses.
	(FED_BY_SPEC_LOAD, IS_LOAD_INSN): Rewrite to use HID accessor macro.
	(sched_is_disabled_for_current_region_p): Delete static declaration.
	(struct region): Move to sched-int.h.
	(nr_regions, rgn_table, rgn_bb_table, block_to_bb, containing_rgn,
	ebb_head): Define and initialize.
	(RGN_NR_BLOCKS, RGN_BLOCKS, RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB,
	BLOCK_TO_BB, CONTAINING_RGN, debug_regions, extend_regions,
	BB_TO_BLOCK, EBB_FIRST_BB, EBB_LAST_BB): Move to
	sched-int.h.
	(find_single_block_region): Add new argument to indicate that EBB
	regions should be constructed.
	(debug_live): Delete declaration.
	(current_nr_blocks, current_blocks, target_bb): Remove static qualifiers.
	(compute_dom_prob_ps, check_live, update_live, set_spec_fed): Delete
	declaration.
	(init_regions): Delete declaration.
	(debug_region, bb_in_region_p, dump_region_dot_file, dump_region_dot,
	rgn_estimate_number_of_insns): New.
	(too_large): Use estimate_number_of_insns.
	(haifa_find_rgns): New. Move the code from ...
	(find_rgns): ... here.  Call either sel_find_rgns or haifa_find_rgns.
	(free_trg_info): New.
	(compute_trg_info): Allocate candidate tables here instead of ...
	(init_ready_list): ... here.
	(rgn_print_insn): Use const_rtx.
	(contributes_to_priority, extend_regions): Delete static declaration.
	(add_remove_insn, fix_recovery_cfg): Add rgn_ to function names.
	(add_block1): Rename to rgn_add_block.
	(debug_rgn_dependencies): Delete static qualifier.
	(new_ready): Use sched_deps_info.  Simplify.
	(rgn_common_sched_info, rgn_const_sched_deps_info,
	rgn_const_sel_sched_deps_info, rgn_sched_deps_info, rgn_sched_info): New.
	(region_sched_info): Rename to rgn_const_sched_info.
	(deps_join): New, extracted from ...
	(propagate_deps): ... here.
	(compute_block_dependences, debug_dependencies): Update for selective
	scheduling.
	(free_rgn_deps, compute_priorities): New functions.
	(sched_rgn_init, sched_rgn_finish, rgn_setup_region,
	sched_rgn_compute_dependencies): New functions.
	(schedule_region): Use them.
	(sched_rgn_local_init, sched_rgn_local_free, sched_rgn_local_finish,
	rgn_setup_common_sched_info, rgn_setup_sched_infos):
	New functions.
	(schedule_insns): Call new functions that were split out.
	(rgn_make_new_region_out_of_new_block): New.
	(get_rgn_sched_max_insns_priority): New.
	(rest_of_handle_sched, rest_of_handle_sched2): Call selective
	scheduling when appropriate.
	* sched-vis.c: Include insn-attr.h.
	(print_value, print_pattern): Make global.
	(print_rtl_slim, debug_bb_slim, debug_bb_n_slim): New functions.
	* target-def.h (TARGET_SCHED_ADJUST_COST_2,
	TARGET_SCHED_ALLOC_SCHED_CONTEXT, TARGET_SCHED_INIT_SCHED_CONTEXT,
	TARGET_SCHED_SET_SCHED_CONTEXT, TARGET_SCHED_CLEAR_SCHED_CONTEXT,
	TARGET_SCHED_FREE_SCHED_CONTEXT, TARGET_SCHED_GET_INSN_CHECKED_DS,
	TARGET_SCHED_GET_INSN_SPEC_DS, TARGET_SCHED_SKIP_RTX_P): New target
	hooks.  Initialize them to 0.
	(TARGET_SCHED_GEN_CHECK): Rename to TARGET_SCHED_GEN_SPEC_CHECK.
	* target.h (struct gcc_target): Add them.  Rename gen_check field to
	gen_spec_check.
	* flags.h (sel_sched_switch_set): Declare.
	* opts.c (sel_sched_switch_set): New variable.
	(decode_options): Unset flag_sel_sched_pipelining_outer_loops if
	pipelining is disabled from command line.
	(common_handle_option): Record whether selective scheduling is
	requested from command line.
	* doc/invoke.texi: Document new flags and parameters.
	* doc/tm.texi: Document new target hooks.
	* config/ia64/ia64.c (TARGET_SCHED_GEN_SPEC_CHECK): Define to ia64_gen_check.
	(dfa_state_size): Do not declare locally.
	* config/ia64/ia64.opt (msched-ar-data-spec): Default to 0.
	* config/rs6000/rs6000.c (rs6000_init_sched_context,
	rs6000_alloc_sched_context, rs6000_set_sched_context,
	rs6000_free_sched_context): New functions.
	(struct _rs6000_sched_context): New.
	(rs6000_sched_reorder2): Do not modify INSN_PRIORITY for selective
	scheduling.
	(rs6000_sched_finish): Do not run for selective scheduling. 

Co-Authored-By: Alexander Monakov <amonakov@ispras.ru>
Co-Authored-By: Dmitry Melnik <dm@ispras.ru>
Co-Authored-By: Dmitry Zhurikhin <zhur@ispras.ru>
Co-Authored-By: Maxim Kuvyrkov <maxim@codesourcery.com>

From-SVN: r139854
2008-09-01 12:57:00 +04:00
Andreas Krebbel 7ac28727fb reload.c: (find_reloads): Skip alternatives according to the "enabled" attribute.
2008-05-27  Andreas Krebbel  <krebbel1@de.ibm.com>

	* reload.c: (find_reloads): Skip alternatives according to the
	"enabled" attribute. Constify the constraint variable.
	* recog.c (get_attr_enabled): Add default implementation.
	(extract_insn): Set the alternative_enabled_p array
	in the recog_data struct.
	(preprocess_constraints, constrain_operands): Skip
	alternatives according to the "enabled" attribute
	* recog.h (struct recog_data): New field alternative_enabled_p.
	(skip_alternative): New inline function.
	* regclass.c: (record_operand_costs): Check the "enabled"
	attribute.
	(record_reg_classes): Skip alternative according to the
	"enabled" attribute.

	* doc/md.texi: Add documention for the "enabled" attribute.

From-SVN: r136012
2008-05-27 11:46:45 +00:00
Andreas Krebbel a4edaf8359 defaults.h (TARGET_MEM_CONSTRAINT): New target macro added.
2008-05-27  Andreas Krebbel  <krebbel1@de.ibm.com>

	* defaults.h (TARGET_MEM_CONSTRAINT): New target macro added.
	* postreload.c (reload_cse_simplify_operands): Replace 'm'
	constraint with TARGET_MEM_CONSTRAINT.
	* recog.c (asm_operand_ok, preprocess_constraints,
	constrain_operands): Likewise.
	* regclass.c (record_reg_classes): Likewise.
	* reload.c (find_reloads, alternative_allows_const_pool_ref):
	Likewise.
	* reload1.c (maybe_fix_stack_asms): Likewise.
	* stmt.c (parse_output_constraint, parse_input_constraint):
	Likewise.
	* recog.h: Adjust comment.
	* genpreds.c (generic_constraint_letters): Remove 'm' constraint.
	* genoutput.c (note_constraint): Don't emit error for 'm'
	constraint.
	* doc/md.texi: Add a note to description of 'm' constraint.
	* doc/tm.texi: Document the new TARGET_MEM_CONSTRAINT macro.

From-SVN: r136011
2008-05-27 11:41:10 +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
Jan Hubicka 95e88efd10 fwprop.c (try_fwprop_subst): Use validate_unshare_change.
* fwprop.c (try_fwprop_subst): Use validate_unshare_change.
	* postreload.c (reload_cse_simplify_set): Instead of copying the rtx
	early use validate_unshare_change.
	(reload_combine): Likewise.
	* recog.c (change_t): New field unshare.
	(validate_change_1): Rename from validate_change; add argument unshare.
	(validate_change): Turn into wrapper of validate_change_1; update
	prototype for bools.
	(validate_unshare_change): New.
	(confirm_change_group): Unshare changes if asked for; avoid unnecesary
	calls of df_insn_rescan.
	* recog.h (validate_change): Replace ints by bools.
	(validate_unshare_change): Declare.

From-SVN: r126050
2007-06-27 01:21:13 +00:00
Daniel Berlin 6fb5fa3cbc Merge dataflow branch into mainline
From-SVN: r125624
2007-06-11 18:02:15 +00:00
Paolo Bonzini a52b023a5f fwprop.c: New file.
2006-11-03  Paolo Bonzini  <bonzini@gnu.org>
            Steven Bosscher  <stevenb.gcc@gmail.com>

        * fwprop.c: New file.
        * Makefile.in: Add fwprop.o.
        * tree-pass.h (pass_rtl_fwprop, pass_rtl_fwprop_with_addr): New.
        * passes.c (init_optimization_passes): Schedule forward propagation.
        * rtlanal.c (loc_mentioned_in_p): Support NULL value of the second
        parameter.
        * timevar.def (TV_FWPROP): New.
        * common.opt (-fforward-propagate): New.
        * opts.c (decode_options): Enable forward propagation at -O2.
        * gcse.c (one_cprop_pass): Do not run local cprop unless touching jumps.
        * cse.c (fold_rtx_subreg, fold_rtx_mem, fold_rtx_mem_1, find_best_addr,
        canon_for_address, table_size): Remove.
        (new_basic_block, insert, remove_from_table): Remove references to
        table_size.
        (fold_rtx): Process SUBREGs and MEMs with equiv_constant, make
        simplification loop more straightforward by not calling fold_rtx
        recursively.
        (equiv_constant): Move here a small part of fold_rtx_subreg,
        do not call fold_rtx.  Call avoid_constant_pool_reference
        to process MEMs.
        * recog.c (canonicalize_change_group): New.
        * recog.h (canonicalize_change_group): New.

        * doc/invoke.texi (Optimization Options): Document fwprop.
        * doc/passes.texi (RTL passes): Document fwprop.


Co-Authored-By: Steven Bosscher <stevenb.gcc@gmail.com>

From-SVN: r118475
2006-11-04 08:36:45 +00:00
Razya Ladelsky 8cd37d0b6c [multiple changes]
2006-05-04  Leehod Baruch  <leehod@il.ibm.com>

        * see.c: New file.
        * Makefile.in (OBJS-common): Add see.o.
        (see.o): Add dependencies.
        * common.opt (fsee): New flag for the see optimization was added.
        * opts.c (flag_see): Initialized.
        * passes.c (init_optimization_passes, pass_see): New pass.
        * rtl.h (see_main): Declaration as extern.
        * timevar.def (TV_SEE): New.
        * tree-pass.h (pass_see): Declaration as extern.
        * invoke.texi (-fsee): Document.
        * recog.c (validate_simplify_insn): New function.
        * recog.h (validate_simplify_insn): Declaration as extern.
        * df-problems.c (df_chain_dump): Check for NULL.

2006-05-04  Kenneth Zadeck <zadeck@naturalbridge.com>
            Daniel Berlin  <dberlin@dberlin.org>

        * cfgrtl.c (insert_insn_bb_end_new): New function.
        * basic-block.h (insert_insn_bb_end_new): Declaration as extern.

2006-05-04  Leehod Baruch  <leehod.baruch@weizmann.ac.il>

        * df.h (struct web_entry): Moved from web.c.
        (union_defs): Declaration as extern.
        (unionfind_root): Likewise.
        (unionfind_union): Likewise.
        * web.c (struct web_entry): Moved to df.h.
        (unionfind_root): Remove static declaration.
        (unionfind_union): Likewise.
        (union_defs): Likewise and generalize to use callback function.
        (web_main): Update arguments for union_defs function call.

From-SVN: r113518
2006-05-04 09:19:02 +00:00
Kazu Hirata d42ee77ad0 recog.c (volatile_mem_p, [...]): Remove.
* recog.c (volatile_mem_p, validate_change_maybe_volatile):
	Remove.
	* recog.h: Remove the prototype for
	validate_change_maybe_volatile.

From-SVN: r111731
2006-03-05 06:01:33 +00:00
Kazu Hirata 4b5ddfbe97 recog.c (validate_replace_rtx_subexp): Remove.
* recog.c (validate_replace_rtx_subexp): Remove.
	* recog.h: Remove the prototype for
	validate_replace_rtx_subexp.

From-SVN: r110335
2006-01-28 22:03:00 +00:00
Kazu Hirata e94aab95ee recog.c (peephole2_optimize): Make it static.
* recog.c (peephole2_optimize): Make it static.
	* recog.h: Remove the prototype for peephole2_optimize.

From-SVN: r110327
2006-01-28 15:17:22 +00:00
Alan Modra 425de7399f reload.c (find_reloads): Fix comment typo.
* reload.c (find_reloads): Fix comment typo.
	* recog.h (recog_memoized): Correct comment.

From-SVN: r108627
2005-12-16 16:44:17 +10:30
J"orn Rennecke 7d22e8989c PR rtl-optimization/20070 / part1
PR rtl-optimization/20070 / part1
	* flow.c (update_life_info): If PROP_POST_REGSTACK is set, call
	count_or_remove_death_notes with kill == -1.
	(mark_set_1): Don't add REG_DEAD / REG_UNUSED notes for stack
	registers if PROP_POST_REGSTACK is set.
	(mark_used_reg): Likewise.
	(count_or_remove_death_notes): If kill is -1, don't remove REG_DEAD /
	REG_UNUSED notes for stack regs.
	* cfgcleanup.c (condjump_equiv_p): Change parameters and processing
	to match rtx_equiv_p machinery.  Change caller.
	(outgoing_edges_match): Likewise.
	(try_crossjump_to_edge): Use struct_equiv_block_eq
	instead of flow_find_cross_jump.
	* basic-block.h (PROP_POST_REGSTACK, STRUCT_EQUIV_START): Define.
	(STRUCT_EQUIV_RERUN, STRUCT_EQUIV_FINAL): Likewise.
	(STRUCT_EQUIV_NEED_FULL_BLOCK, STRUCT_EQUIV_MATCH_JUMPS): Likewise.
	(STRUCT_EQUIV_MAX_LOCAL): Likewise.
	(struct struct_equiv_checkpoint, struct equiv_info): Likewise.
	(insns_match_p): Update prototype.
	(flow_find_cross_jump): Remove prototype.
	(struct_equiv_block_eq, struct_equiv_init): Declare.
	(rtx_equiv_p, condjump_equiv_p): Likewise.
	* struct-equiv.c: Include reload.h.
	(IMPOSSIBLE_MOVE_FACTOR): Define.
	(assign_reg_reg_set, struct_equiv_make_checkpoint): New functions.
	(struct_equiv_improve_checkpoint): Likewise.
	(struct_equiv_restore_checkpoint, rtx_equiv_p): Likewise.
	(set_dest_equiv_p, set_dest_addr_equiv_p, struct_equiv_init): Likewise.
	(struct_equiv_merge, find_dying_input): Likewise.
	(resolve_input_conflict, note_local_live): Likewise.
	(death_notes_match_p): Change parameters and processing
	to match rtx_equiv_p machinery.  Change caller.
	(insns_match_p): Likewise.
	(flow_find_cross_jump): Replace with:
	(struct_equiv_block_eq).

	Back out this change:
	2005-03-07  Kazu Hirata  <kazu@cs.umass.edu>
          * recog.c (verify_changes): Make it static.
          * recog.h: Remove the corresponding prototype.

From-SVN: r108480
2005-12-13 13:04:18 +00:00
Paul Brook 0cd6c85a31 genrecog.c (enum decision_type): Add DT_num_insns.
2005-08-27  Paul Brook  <paul@codesourcery.com>

	* genrecog.c (enum decision_type): Add DT_num_insns.
	(struct decision_test): Add u.num_insns.
	(add_to_sequence): Add DT_num_insns test.
	(maybe_both_true_2, nodes_identical_1): Handle DT_num_insns.
	(write_cond, debug_decision_2): Ditto.
	(change_state): Assume peep2_next_insn never fails.
	Remove "afterward" argument.
	(write afterward, write_tree): Update to match.
	* recog.c (peep2_current_count): New variable.
	(peep2_next_insn): Check it.
	(peephole2_optimize): Set peep2_current_count.
	* recog.h (peep2_current_count): Declare.

From-SVN: r103553
2005-08-27 02:08:29 +00:00
Kelley Cook 366ccddb2b Update FSF address.
From-SVN: r101317
2005-06-25 02:02:01 +00:00
Alexandre Oliva 46382283d5 re PR target/20126 (Inlined memcmp makes one argument null on entry)
gcc/ChangeLog:
PR target/20126
* loop.c (loop_givs_rescan): If replacement of DEST_ADDR failed,
set the original address pseudo to the correct value before the
original insn, if possible, and leave the insn alone, otherwise
create a new pseudo, set it and replace it in the insn.
* recog.c (validate_change_maybe_volatile): New.
* recog.h (validate_change_maybe_volatile): Declare.
gcc/testsuite/ChangeLog:
* gcc.dg/pr20126.c: New.

From-SVN: r97939
2005-04-10 04:00:53 +00:00
Kazu Hirata 6db31844ad recog.c (verify_changes): Make it static.
* recog.c (verify_changes): Make it static.
	* recog.h: Remove the corresponding prototype.

From-SVN: r96015
2005-03-07 13:52:09 +00:00
J"orn Rennecke 0a63483247 recog.c (verify_changes, [...]): New functions, broken out of apply_change_group.
* recog.c (verify_changes, confirm_change_group): New functions,
	broken out of apply_change_group.
	(apply_change_group): Use them.
	* recog.h (verify_change, confirm_change_group): Declare.
	* rtl.h (redirect_jump_2): Declare.
	* jump.c (redirect_exp, invert_exp): Delete.
	(invert_exp_1): Take second parameter.  Return value.  Changed caller.
	(redirect_jump_2): New function, broken out of redirect_jump.
	(redirect_jump): Use redirect_jump_1 and redirect_jump_2.
	(invert_jump): Use invert_jump_1 and redirect_jump_2.
	* ifcvt.c (dead_or_predicable): Use redirect_jump_2.

From-SVN: r95813
2005-03-02 22:02:32 +00:00
Joseph Myers 9fcdd8917c re PR bootstrap/18058 (Bootstrap fails with non-GCC compilers)
config:
	* warnings.m4 (ACX_PROG_CC_WARNING_ALMOST_PEDANTIC): Don't do
	anything for non-GCC compilers.

libcpp:
	* configure: Regenerate.

gcc:
	PR bootstrap/18058
	* recog.c (recog_memoized): Don't define if GENERATOR_FILE.
	* ggc-none.c (ggc_free): Define.

From-SVN: r94123
2005-01-23 19:22:01 +00:00
Matt Austern f5523e6ded Minor back end speedup.
* recog.c (recog_memoized_1): Remove.
	* recog.h (recog_memoized_1): Remove declaration.
	(recog_memoized): Change from macro to inline function.

From-SVN: r91185
2004-11-24 18:22:27 +00:00
Zack Weinberg e543e219eb genpreds.c: Add capability to generate predicate bodies as well as function prototypes.
* genpreds.c: Add capability to generate predicate bodies as
	well as function prototypes.  Write function prototypes for
	the generic predicates too.
	(process_define_predicate, write_tm_preds_h, write_insn_preds_c)
	(write_predicate_subfunction, mark_mode_tests, add_mode_tests)
	(write_match_code, write_predicate_expr, write_one_predicate_function)
	(parse_option): New functions.
	(output_predicate_decls): Delete.
	(main): Read the machine description, process DEFINE_PREDICATE or
	DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c
	as appropriate.

	* genrecog.c (struct decision_test): Replace index with
	struct pred_data pointer.
	(next_index): Remove, unused.
	(pred_table, preds, special_mode_pred_table): Delete.
	(compute_predicate_codes, process_define_predicate): New functions.
	(validate_pattern, add_to_sequence, write_switch): Update for
	new data structures.
	(main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE.
	Check both error_count and have_error.

	* gensupport.c (in_fname, first_predicate): New globals.
	(define_pred_queue, define_pred_tail): New RTL-pattern queue.
	(predicate_table, last_predicate, old_pred_table)
	(old_special_pred_table): New statics.
	(hash_struct_pred_data, eq_struct_pred_data, lookup_predicate)
	(add_predicate, init_predicate_table): New functions.
	(process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE.
	(init_md_reader_args_cb): Use the global in_fname.  No need to zero
	it or max_include_len.  Call init_predicate_table.
	(read_rtx): Run the predicate queue after the attribute queue
	but before all the others.
	* gensupport.h (in_fname, struct pred_data, first_predicate)
	(lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare.
	* rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE)
	(DEFINE_SPECIAL_PREDICATE): New RTL codes.
	* dummy-conditions.c: Don't include bconfig.h, system.h,
	coretypes.h, tm.h, or system.h.  Do include stddef.h.
	Duplicate declaration of struct c_test from gensupport.h.

	* Makefile.in (OBJS-common): Add insn-preds.o.
	(STAGESTUFF, .PRECIOUS): Add insn-preds.c.
	(insn-preds.c, insn-preds.o): New rules.
	(s-preds): Also generate insn-preds.c.
	(dummy-conditions.o, genpreds$(build_exeext), genpreds.o):
	Update dependencies.
	(print-rtl.o, print-rtl1.o): Correct dependencies.

	* recog.h: Delete prototypes of predicate functions.

	* doc/md.texi (Predicates): New section with complete
	documentation of operand/operator predicates.  Remove some
	incomplete documentation of predicates from other places.
	* doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to
	PREDICATE_CODES; indicate that both are deprecated in favor
	of define_predicate/define_special_predicate.

	* config/ia64/ia64.c: All predicate function definitions moved
	to ia64.md, except
	(small_addr_symbolic_operand, tls_symbolic_operand): Delete.
	(ia64_expand_load_address, ia64_expand_move):
	Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand.

	* config/ia64/ia64.md: All predicates now defined here.
	(symbolic_operand): Is now a special predicate.

	* config/ia64/ia64.h: Declare ia64_section_threshold.
	(PREDICATE_CODES): Delete.

From-SVN: r85855
2004-08-12 07:49:00 +00:00
Bernardo Innocenti e3a64162f5 c-common.c: Rename all identifiers named `class' to `cl'.
* c-common.c: Rename all identifiers named `class' to `cl'.
	* c-decl.c: Likewise.
	* c-common.h: Likewise.
	* c-parse.in: Likewise.
	* c-typeck.c: Likewise.
	* genmodes.c: Likewise.
	* real.c: Likewise.
	* real.h: Likewise.
	* recog.c: Likewise.
	* recog.h: Likewise.
	* regrename.c: Likewise.
	* tree.h: Likewise.

From-SVN: r85153
2004-07-25 19:57:24 +02:00
Kazu Hirata ca0afc298b recog.c (validate_replace_src): Remove.
* recog.c (validate_replace_src): Remove.
	* recog.h: Remove the corresponding prototype.

From-SVN: r78531
2004-02-26 23:39:29 +00:00
Joseph Myers 3897f229d5 re PR c/11234 (-pedantic accepts function pointer <-> void*)
PR c/11234
	* c-typeck.c (build_c_cast): If pedantic, warn for conversions
	between function and object pointers.
	(digest_init): When comparing a pointer to function type to the
	target type, only apply TREE_TYPE once to the pointer to function
	type.
	* except.c (for_each_eh_label_1): Treat data as a pointer to a
	function pointer rather than casting it to a function pointer.
	(for_each_eh_label): Update caller.
	* recog.h (struct insn_data): Use a struct or union for output.
	* genoutput.c (output_insn_data): Update.
	* final.c (get_insn_template): Update.

testsuite:
	* gcc.dg/func-ptr-conv-1.c: New test.
	* gcc.dg/weak/weak-6.c, gcc.dg/weak/weak-7.c: Update.

From-SVN: r75595
2004-01-09 20:03:58 +00:00
Richard Henderson 7e7c843fc7 rtl.h (PUT_CODE, PUT_MODE): Remove ENUM_BITFIELD cast.
* rtl.h (PUT_CODE, PUT_MODE): Remove ENUM_BITFIELD cast.
        * tree.h (TREE_SET_CODE): Likewise.
        * recog.h (struct insn_operand_data): Move const after ENUM_BITFIELD.

From-SVN: r74170
2003-12-02 02:14:40 -08: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 8116809c60 genrecog.c (pred_table): Remove the entry for mode_independent_operand.
* genrecog.c (pred_table): Remove the entry for
	mode_independent_operand.
	* recog.c (next_insns_test_no_inequality): Remove.
	(mode_independent_operand): Likewise.
	* recog.h: Remove the prototype for mode_independent_operand.

From-SVN: r68360
2003-06-23 11:58:25 +00:00
Kaveh R. Ghazi fad205ffba decl.c, [...]: Don't use the PTR macro.
cp:
	* cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
	macro.

gcc:
	* bitmap.c, builtins.c, c-incpath.c, cgraph.c, config/frv/frv.c,
	config/mips/mips.c, cppfiles.c, cpphash.c, cppinit.c, cpplib.c,
	dwarf2out.c, dwarfout.c, except.c, expr.c, expr.h, fold-const.c,
	function.c, gcc.c, genoutput.c, gensupport.c, global.c,
	haifa-sched.c, hashtable.c, ifcvt.c, integrate.c, local-alloc.c,
	loop.c, mips-tdump.c, mips-tfile.c, mkdeps.c, protoize.c,
	read-rtl.c, recog.h, reload1.c, sbitmap.c, ssa-dce.c,
	stringpool.c, tlink.c, tree.c, varasm.c, varray.c: Don't use
	the PTR macro.

From-SVN: r68043
2003-06-16 21:41:10 +00:00
Jan Hubicka 2b773ee2c1 gcse.c (try_replace_reg): Use num_changes_pending.
2002-07-23  Jan Hubicka  <jh@suse.cz>

	* gcse.c (try_replace_reg): Use num_changes_pending.
	* recog.c (num_changes_pending): New function.
	(validate_replace_src): Use validate_repalce_src_group.
	(validate_replace_src_group): New.
	* recog.h (validate_repalce_src_group): New.
	(num_changes_pending): Likewise.

From-SVN: r55677
2002-07-23 12:08:10 +00:00
Richard Henderson b37c26149f recog.c (store_data_bypass_p, [...]): New.
* recog.c (store_data_bypass_p, if_test_bypass_p): New.
        * recog.h: Declare them.

        * config/sparc/sparc.c (ultrasparc_store_bypass_p): Remove.
        * config/sparc/sparc.md: Use store_data_bypass_p instead.
        * config/sparc/sparc-protos.h: Update.

From-SVN: r53132
2002-05-03 15:23:45 -07:00
Kaveh R. Ghazi 8b60264b0d builtins.c (expand_builtin_setjmp_receiver): Const-ify.
* builtins.c (expand_builtin_setjmp_receiver): Const-ify.
	* c-common.c (fname_var_t, c_tree_code_type, c_tree_code_length):
	Likewise.
	* c-dump.c (dump_option_value_info): Likewise.
	* c-format.c (format_length_info, format_char_info,
	format_flag_spec, format_flag_pair, format_kind_info): Likewise.
	* collect2.c (names): Likewise.
	* cppdefault.h (default_include): Likewise.
	* cppexp.c (suffix, vsuf_1, vsuf_2, vsuf_3): Likewise.
	* flow.c (life_analysis): Likewise.
	* gcc.c (dir_separator_str, modify_target, option_map,
	target_option_translations, spec_list_1, extra_specs_1,
	init_spec): Likewise.
	* gcov.c (gcov_version_string): Likewise.
	* genattr.c (write_units): Likewise.
	* genattrtab.c (make_length_attrs, write_function_unit_info): Likewise.
	* gengenrtl.c (rtx_definition, defs): Likewise.
	* genrecog.c (pred_table): Likewise.
	* global.c (global_alloc): Likewise.
	* lcm.c (optimize_mode_switching): Likewise.
	* local-alloc.c (find_free_reg): Likewise.
	* params.h (param_info): Likewise.
	* predict.c (predictor_info): Likewise.
	* protoize.c (unexpansion_struct): Likewise.
	* real.c (bmask): Likewise.
	* recog.h (insn_operand_data, insn_data): Likewise.
	* regclass.c (initial_fixed_regs, initial_call_used_regs): Likewise.
	* stmt.c (expand_nl_goto_receiver): Likewise.
	* toplev.c (da, debug_args, lang_opt, documented_lang_options,
	target_switches, target_options): Likewise.
	* tradcif.y (token, tokentab2, yylex): Likewise.
	* tree.h (attribute_spec): Likewise.

	* alpha.c (override_options, alpha_lookup_xfloating_lib_func):
	Likewise.
	* arc.c (arc_output_function_epilogue): Likewise.
	* arm.c (processors, all_cores, all_architectures,
	arm_override_options, isr_attribute_arg, isr_attribute_args,
	arm_isr_value): Likewise.
	* avr.c (mcu_type_s, reg_class_tab, order_regs_for_local_alloc):
	Likewise.
	* c4x.c (c4x_int_reglist): Likewise.
	* d30v.c (override_options): Likewise.
	* h8300.c (shift_insn): Likewise.
	* i386.c (size_cost, i386_cost, i486_cost, pentium_cost,
	pentiumpro_cost, k6_cost, athlon_cost, pentium4_cost, ix86_cost,
	ix86_expand_sse_comi, ix86_expand_sse_compare, override_options,
	builtin_description, bdesc_comi, bdesc_2arg, bdesc_1arg,
	ix86_init_mmx_sse_builtins, ix86_expand_builtin): Likewise.
	* i386.h (processor_costs, ix86_cost): Likewise.
	* m68hc11.c (m68hc11_cost, m6811_cost, m6812_cost): Likewise.
	* m68hc11.h (processor_costs, m68hc11_cost): Likewise.
	* m68k.c (codes_68881, codes_FPA): Likewise.
	* m88k.c (mode_from_align, max_from_align, all_from_align,
	best_from_align, m_options): Likewise.
	* m88k.h (ORDER_REGS_FOR_LOCAL_ALLOC): Likewise.
	* mcore.c (mode_from_align): Likewise.
	* mips/elf64.h (UNIQUE_SECTION): Likewise.
	* mips/iris6gld.h (UNIQUE_SECTION): Likewise.
	* mips.c (mips_sw_reg_names, mips_regno_to_class): Likewise.
	* mips.h (mips_regno_to_class): Likewise.
	* ns32k.c (scales): Likewise.
	* pa.c (import_string, magic_milli): Likewise.
	* rs6000.c (alt_reg_names, rs6000_override_options): Likewise.
	* sparc.c (leaf_reg_remap, sparc_override_options,
	reg_leaf_alloc_order, reg_nonleaf_alloc_order, reg_alloc_orders):
	Likewise.
	* sparc.h (sparc_cpu_select, leaf_reg_remap): Likewise.

cp:
	* class.c (build_vtable_entry_ref): Const-ify.
	* decl.c (predefined_identifier,
	initialize_predefined_identifiers): Likewise.
	* init.c (build_new_1): Likewise.
	* lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
	Likewise.

f:
	* bad.c (_ffebad_message_, ffebad_messages_): Const-ify.
	* bld.c (ffebld_arity_op_): Likewise.
	* bld.h (ffebld_arity_op_): Likewise.
	* com.c (ffecom_init_0): Likewise.
	* intdoc.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_,
	_ffeintrin_imp_, names, gens, imps, specs, cc_pair,
	cc_descriptions, cc_summaries): Likewise.
	* intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_,
	_ffeintrin_imp_, ffeintrin_names_, ffeintrin_gens_,
	ffeintrin_imps_, ffeintrin_specs_): Likewise.

java:
	* jcf-io.c (format_uint): Const-ify.
	* lang.c (java_tree_code_type, java_tree_code_length): Likewise.
	* lex.c (java_get_line_col): Likewise.
	* parse.y (build_incdec): Likewise.

From-SVN: r46062
2001-10-07 16:51:11 +00:00
Lars Brinkhoff 1322177dbd Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
	bitmap.h, builtin-types.def, builtins.c, builtins.def,
	c-aux-info.c, c-common.c, c-common.def, c-common.h,
	c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
	c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
	c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
	caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
	conditions.h, config.gcc, configure.frag, configure.in,
	conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
	cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
	dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
	doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
	dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
	emit-rtl.c, errors.c, errors.h, except.c, except.h,
	exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
	fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
	function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
	gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
	gencheck.c, gencodes.c, genconfig.c, genemit.c,
	genextract.c, genflags.c, gengenrtl.c, genmultilib,
	genopinit.c, genoutput.c, genpeep.c, genrecog.c,
	gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
	ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
	graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
	gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
	gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
	hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
	integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
	libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
	machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
	mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
	mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
	params.h, predict.c, predict.def, predict.h, prefix.c,
	prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
	read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
	regclass.c, regmove.c, regrename.c, regs.h, reload.c,
	reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
	rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
	sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
	sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
	ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
	stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
	tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
	tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
	unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
	unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
	xcoffout.h: replace "GNU CC" with "GCC".

From-SVN: r45105
2001-08-22 14:35:51 +00:00
Zack Weinberg a2b498cb8a recog.h (struct insn_operand_data): Shrink 'mode' field to 16 bits.
* recog.h (struct insn_operand_data): Shrink 'mode' field
	to 16 bits.

From-SVN: r44839
2001-08-13 04:22:58 +00:00
Richard Kenner fb0c0a1270 Makefile.in (gcse.o): Now includes ggc.h.
* Makefile.in (gcse.o): Now includes ggc.h.
	* gcse.c: Include ggc.h.
	(want_to_gcse_p): Verify expression can be in SET as valid insn.
	(try_replace_reg): Remove warning of uninitialize variable.
	(process_insert_insn): Call invalid_insn_p to validate insn.
	* recog.c (insn_invalid_p): Now global.
	See if can make valid by adding CLOBBERs of SCRATCH only and do if so.
	* recog.h (insn_invalid_p): New declaration.

From-SVN: r39857
2001-02-18 18:56:34 -05:00
Richard Kenner 751aa7cc88 rtl.h (add_clobbers): Remove duplicate declaration.
* rtl.h (add_clobbers): Remove duplicate declaration.
	* recog.h (added_clobbers_hard_reg_p): New declaration.
	* genemit.c (struct clobber_pat): New field has_hard_reg.
	(gen_insn): Record if added clobbers clobber hard reg.
	(gen_split): Avoid unused warning if number of operands is 0.
	(output_added_clobbers_hard_reg_p): New function.
	(main): Call it.

From-SVN: r39832
2001-02-18 09:34:57 -05:00
Bernd Schmidt 541f7d5629 regrename.c: Rewrite to handle multi-register modes and cond_exec instructions.
* regrename.c: Rewrite to handle multi-register modes and
        cond_exec instructions.
        * Makefile.in (regrename.o): Update dependancies.
        * recog.h (struct operand_alternative): Add is_address.
        * recog.c (preprocess_constraints) [case 'p']: Set it.

Co-Authored-By: Richard Henderson <rth@redhat.com>

From-SVN: r37089
2000-10-27 13:58:57 -07:00
Jan Hubicka 6c698a6d9b final.c (final_scan_insn): Remove extra extract_insn call; Use caching for constrain_operands.
* final.c (final_scan_insn): Remove extra extract_insn call;
	Use caching for constrain_operands.
	(cleanup_subreg_operands): Use caching for extract_insn.
	* recog.c (constrain_operands_cached): New.
	* recog.h (constrain_operands_cached): Declare.
	* i386.c (ix86_attr_length_immediate_default,
	ix86_attr_length_address_default, ix86_agi_dependant): Cache
	extract_insn call.

	* recog.c (asm_noperands): Tweak.
	(extract_insn): Do not call asm_noperads for non-asm instructions.

From-SVN: r36665
2000-09-29 11:40:24 +00:00
Jan Hubicka d90ffc8d2c i386.md (add?i_3, add?i_5): New.
* i386.md (add?i_3, add?i_5): New.
	(add?i_4): Rename from add?i_3;  Fix compare pattern.
	(sub?i_3, xor?i_3, ior?i_3): New.

	* genrecog.c (write_tree): Output code to clear insn_extract cache.
	* genattrtab.c (write_attr_case): Gen call to extract_insn_cache
	instead of extract_insn and extract_constrain_insn_cache instead of
	extract_insn and constrain_operands.
	* recog.c (extract_insn_cached, extract_constrain_insn_cached):
	New functions.
	(extract_insn): Clear which_alternative.
	(constrain_operands): Set which_alternative to -1 when failed.
	* recog.h (extract_constrain_insn_cached, extract_insn_cached):
	Declare.

From-SVN: r36342
2000-09-11 23:54:11 +00:00
Jan Hubicka e251e2a27f gcse.c (try_replace_reg): Use validate_replace_rtx_subexp instead of replace_rtx.
* gcse.c (try_replace_reg): Use validate_replace_rtx_subexp
	instead of replace_rtx.
	* recog.c (validate_replace_rtx_subexp): New function.
	* recog.h (validate_replace_rtx_subexp): Declare.

From-SVN: r35349
2000-07-30 18:44:13 +00:00
Richard Henderson 2328013936 Makefile.in (recog.o): Don't depend on resource.h.
* Makefile.in (recog.o): Don't depend on resource.h.
	* recog.c: Don't include resource.h.
	(recog_last_allowed_insn): Remove.
	(recog_next_insn): Remove.
	(struct peep2_insn_data): New.
	(peep2_insn_data, peep2_current): New.
	(peep2_next_insn): New.
	(peep2_regno_dead_p, peep2_reg_dead_p): New.
	(peep2_find_free_register): New.
	(peephole2_optimize): Track life information by insn as we go.
	* recog.h: Update declarations.
	* resource.c (find_free_register, reg_dead_p): Remove.
	* resource.h: Remove their declarations.
	* toplev.c: Include hard-reg-set.h before recog.h.

	* genconfig.c (max_insns_per_peep2): New.
	(gen_peephole2): New.
	(main): Call it.
	* genemit.c (output_peephole2_scratches): Generate calls to
	peep2_find_free_register; adjust surrounding code.
	(main): Have insn-emit.c include hard-reg-set.h before recog.h.
	* genrecog.c (change_state): Don't track last_insn.
	(write_action): Write into *_pmatch_len before accepting.
	(write_tree): Adjust peephole2_insns and subroutines to match.

	* config/i386/i386.md (all peepholes): Use peep2_regno_dead_p.

From-SVN: r34208
2000-05-27 13:23:15 -07:00
Jeff Law af841dbdcc Fix copyrights.
From-SVN: r32179
2000-02-26 07:26:24 -07:00
Zack Weinberg 706b0f603f recog.h: Remove NO_MD_PROTOTYPES ifdefs.
* recog.h: Remove NO_MD_PROTOTYPES ifdefs.
 	* genflags.c: Use the max_operand_1 logic from genemit.c to
 	calculate how many arguments gen_insn prototypes have.  Remove
 	NO_MD_PROTOTYPES ifdefs from the generated file.
 	* genoutput.c: Don't define NO_MD_PROTOTYPES in the generated
 	file.  Cast gen_insn initializers to insn_gen_fn.
 	* config/alpha/vms.h: Don't define NO_MD_PROTOTYPES.
 	* gcc.texi: Remove documentation of NO_MD_PROTOTYPES.

From-SVN: r31801
2000-02-05 04:56:11 +00:00
Kaveh R. Ghazi 0bee0290f0 recog.h (OUT_FCN): Delete.
* recog.h (OUT_FCN): Delete.

        * vax.md: Call `get_insn_template' instead of OUT_FCN.

From-SVN: r31524
2000-01-19 23:14:17 +00:00
Kaveh Ghazi 9311a396bc Update copyrights
From-SVN: r31465
2000-01-17 17:16:21 +00:00
Kaveh R. Ghazi 1353681247 machmode.h: PROTO -> PARAMS.
* machmode.h: PROTO -> PARAMS.
        * mbchar.h: Likewise.
        * mips-tdump.c: Likewise.
        * mips-tfile.c: Likewise.
        * optabs.c: Likewise.
        * output.h: Likewise.
        * prefix.c: Likewise.
        * profile.c: Likewise.
        * protoize.c: Likewise.
        * real.h: Likewise.
        * recog.c: Likewise.
        * recog.h: Likewise.
        * regclass.c: Likewise.
        * regmove.c: Likewise.
        * regs.h: Likewise.

From-SVN: r31459
2000-01-17 15:37:04 +00:00
Bernd Schmidt dfac187e9f Fix register elimination problem
From-SVN: r30134
1999-10-22 22:02:17 +00:00
Richard Henderson 556ffcc552 recog.c (pmode_register_operand): New.
* recog.c (pmode_register_operand): New.
        * recog.h: Declare it.
        * genrecog.c (pred_codes): Likewise.
        (special_mode_pred_table): Likewise.
        (validate_pattern): Don't warn no mode for address_operand.

        * print-rtl.c (print_rtx) [LABEL_REF]: Only do full subexpression
        if the operand is not insn-like.

From-SVN: r29995
1999-10-14 18:52:29 -07:00
Bernd Schmidt 19af645506 Delete !REGISTER_CONSTRAINTS code
From-SVN: r29753
1999-10-01 10:00:33 +00:00