Commit Graph

62 Commits

Author SHA1 Message Date
Vladimir Makarov
dceb2b7510 genautomata.c (reserv_sets_hash_value): Define hash_value as set_el_t.
2002-05-21  Vladimir Makarov  <vmakarov@redhat.com>

	* genautomata.c (reserv_sets_hash_value): Define hash_value as
	set_el_t.  Transform the hash value into unsigned.
	(output_cycle_reservs): Fix bug with output of repeated `nothing'.
	(transform_3): Add code to process `(A,B)+(D,E)'.

From-SVN: r53709
2002-05-21 23:11:57 +00:00
Vladimir Makarov
317638a809 genautomata.c (transform_3): Add code for transformation `(A,B,...)+C -> A+C,B,...'.
2002-05-14  Vladimir Makarov  <vmakarov@redhat.com>

	* genautomata.c (transform_3): Add code for transformation
	`(A,B,...)+C -> A+C,B,...'.

From-SVN: r53459
2002-05-14 16:16:18 +00:00
Andreas Jaeger
e2ff6ceeae genautomata.c (output_internal_min_issue_delay_func): Add ATTRIBUTE_UNUSED to avoid warning with empty dfa.
* genautomata.c (output_internal_min_issue_delay_func): Add
	ATTRIBUTE_UNUSED to avoid warning with empty dfa.
	(output_internal_trans_func): Likewise.

From-SVN: r53266
2002-05-07 21:07:46 +02:00
Vladimir Makarov
83e0be551c genautomata.c (form_the_same_automaton_unit_lists_from_regexp): Fix typo in usage of allof instead of unit.
2002-05-06  Vladimir Makarov  <vmakarov@redhat.com>

	* genautomata.c (form_the_same_automaton_unit_lists_from_regexp):
	Fix typo in usage of allof instead of unit.

From-SVN: r53235
2002-05-06 20:14:32 +00:00
Vladimir Makarov
30cc9d0061 genautomata.c (initiate_states): Add additional guard to initialize `units_array'.
2002-05-05  Vladimir Makarov  <vmakarov@redhat.com>

	* genautomata.c (initiate_states): Add additional guard to
	initialize `units_array'.

From-SVN: r53188
2002-05-05 18:28:24 +00:00
Vladimir Makarov
deb09eff2d genautomata.c (form_the_same_automaton_unit_lists_from_regexp, [...]): New prototypes and functions.
2002-05-05  Vladimir Makarov  <vmakarov@redhat.com>

	* genautomata.c (form_the_same_automaton_unit_lists_from_regexp,
	process_unit_to_form_the_same_automaton_unit_lists,
	form_the_same_automaton_unit_lists
	check_unit_distributions_to_automata): New prototypes and
	functions.
	(check_automata): Rename it into `check_automata_insn_issues'.
	(unit_decl): New fields `the_same_automaton_unit' and
	`the_same_automaton_message_reported_p'.
	(unit_decl_t): New typedef.
	(the_same_automaton_lists): New gloval variable.
	(unit_regexp, unit_set_el, units_array, units_cmp,
	output_get_cpu_unit_code_func): Use the typedef.
	(evaluate_max_reserv_cycles): Increment
	`description->max_insn_reserv_cycles'.
	(initiate_states): Don't increment `max_cycles_num'.
	(transform_insn_regexps): Move code around transformation of
	regexps from `generate'.
	(generate): Remove call of `transform_insn_regexps'.
	(expand_automata): Call `transform_insn_regexps' and
	`check_unit_distributions_to_automata'.  Check errors before
	`generate'.

	* config/sparc/ultra3.md (us3_a0, us3_a1): Move the units into
	automaton `ultrasparc3_1'.

From-SVN: r53187
2002-05-05 17:40:16 +00:00
Vladimir Makarov
0b2fb0d735 genautomata.c (min_issue_delay_pass_states): Change return type in the prototype.
2002-05-03  Vladimir Makarov  <vmakarov@redhat.com>

	* genautomata.c (min_issue_delay_pass_states): Change return type
	in the prototype.
	(min_issue_delay_pass_states): Change the algorithm.
	(min_issue_delay): Set up min_insn_issue_delay for the state.
	(output_min_issue_delay_table): Interchange the nested loops and
	and initiate min_insn_issue_delay for states.

From-SVN: r53130
2002-05-03 21:13:25 +00:00
Kazu Hirata
e0a2f70599 combine.c: Fix comment formatting.
* combine.c: Fix comment formatting.
	* expr.c: Likewise.
	* genautomata.c: Likewise.
	* stmt.c: Likewise.
	* tree.h: Likewise.

From-SVN: r53044
2002-05-02 13:55:35 +00:00
Vladimir Makarov
fae15c9379 2002-04-29 Vladimir Makarov <vmakarov@redhat.com>
Merging code from dfa-branch:

From-SVN: r52915
2002-04-29 22:34:36 +00:00
Vladimir Makarov
b8ec576419 rtl.def: Undo my patch commited 2001-08-27.
2001-08-30  Vladimir Makarov  <vmakarov@redhat.com>

	* rtl.def: Undo my patch commited 2001-08-27.

	* genattrtab.c: Ditto.

	* rtl.h: Ditto.

	* sched-int.h: Ditto.

	* target-def.h: Ditto.

	* target.h: Ditto.

	* haifa-sched.c: Ditto.

	* sched-rgn.c: Ditto.

	* sched-vis.c: Ditto.

	* Makefile.in: Ditto.

	* doc/md.texi: Ditto.

	* doc/tm.texi: Ditto.

	* doc/contrib.texi: Ditto.

	* doc/gcc.texi: Ditto.

	* genattrtab.h: Remove it.

	* genautomata.c: Remove it.

	* genattr.c: Undo my patch and Richard Henderson's patch commited
	2001-08-27.

From-SVN: r45297
2001-08-30 20:44:51 +00:00
Richard Henderson
ce4a5723b6 * genautomata.c (expand_automata): Always create a description.
From-SVN: r45211
2001-08-27 13:48:57 -07:00
Vladimir Makarov
acd7baf729 rtl.def (DEFINE_CPU_UNIT, [...]): New RTL constructions.
2001-08-27  Vladimir Makarov  <vmakarov@touchme.toronto.redhat.com>

        * rtl.def (DEFINE_CPU_UNIT, DEFINE_QUERY_CPU_UNIT, EXCLUSION_SET,
	PRESENCE_SET, ABSENCE_SET, DEFINE_BYPASS, DEFINE_AUTOMATON,
	AUTOMATA_OPTION, DEFINE_RESERVATION, DEFINE_INSN_RESERVATION): New
	RTL constructions.

	* genattr.c (main): New variable num_insn_reservations.  Increase
	it if there is DEFINE_INSN_RESERVATION.  Output automaton based
	pipeline hazard recognizer interface.

	* genattrtab.h: New file.

	* genattrtab.c: Include genattrtab.h.
	(attr_printf, check_attr_test, make_internal_attr,
	make_numeric_value): Move protypes into genattrtab.h.  Define them
	as external.
	(num_dfa_decls): New global variable.
	(main): Process DEFINE_CPU_UNIT, DEFINE_QUERY_CPU_UNIT,
	DEFINE_BYPASS, EXCLUSION_SET, PRESENCE_SET, ABSENCE_SET,
	DEFINE_AUTOMATON, AUTOMATA_OPTION, DEFINE_RESERVATION,
	DEFINE_INSN_RESERVATION.  Call expand_automata and write_automata.

	* genautomata.c: New file.

	* rtl.h (LINK_COST_ZERO, LINK_COST_FREE): Remove them.

        * sched-int.h: (curr_state): Add the external definition for
	automaton pipeline interface.
	(haifa_insn_data): Add comments for members blockage and units.

	* target-def.h (TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE,
	TARGET_SCHED_INIT_DFA_PRE_CYCLE_INSN,
	TARGET_SCHED_DFA_PRE_CYCLE_INSN,
	TARGET_SCHED_INIT_DFA_POST_CYCLE_INSN,
	TARGET_SCHED_DFA_POST_CYCLE_INSN,
	TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD,
	TARGET_SCHED_INIT_DFA_BUBBLES, TARGET_SCHED_DFA_BUBBLE): New
	macros.
	(TARGET_SCHED): Use the new macros.

	* target.h (use_dfa_pipeline_interface, init_dfa_pre_cycle_insn,
	dfa_pre_cycle_insn, init_dfa_post_cycle_insn, dfa_post_cycle_insn,
	first_cycle_multipass_dfa_lookahead, init_dfa_bubbles,
	dfa_bubble): New members in gcc_target.sched.

        * haifa-sched.c (insert_schedule_bubbles_p): New variable.
	(MAX_INSN_QUEUE_INDEX): New macro for automaton interface.
	(insn_queue): Redefine it as pointer to array.
	(NEXT_Q, NEXT_Q_AFTER): Use MAX_INSN_QUEUE_INDEX instead of
	INSN_QUEUE_SIZE.
	(max_insn_queue_index_macro_value): New variable.
	(curr_state, dfa_state_size, ready_try): New varaibles for
	automaton interface.
	(ready_element, ready_remove, max_issue): New function prototypes
	for automaton interface.
	(choose_ready): New function prototype.
	(insn_unit, blockage_range): Add comments.
	(unit_last_insn, unit_tick, unit_n_insns): Define them for case
	FUNCTION_UNITS_SIZE == 0.
	(insn_issue_delay, actual_hazard_this_instance, schedule_unit,
	actual_hazard, potential_hazard): Add comments.
	(insn_cost): Use cost -1 as undefined value.  Remove
	LINK_COST_ZERO and LINK_COST_FREE.  Add new code for automaton
	pipeline interface.
	(ready_element, ready_remove): New functions for automaton
	interface.
	(schedule_insn): Add new code for automaton pipeline interface.
	(queue_to_ready): Add new code for automaton pipeline interface.
	Use MAX_INSN_QUEUE_INDEX instead of INSN_QUEUE_SIZE.
	(debug_ready_list): Print newline when the queue is empty.
	(max_issue): New function for automaton pipeline interface.
	(choose_ready): New function.
	(schedule_block): Add new code for automaton pipeline interface.
	Print ready list before scheduling each insn.
	(sched_init): Add new code for automaton pipeline interface.
	Initiate insn cost by -1.
	(sched_finish): Free the current automaton state and finalize
	automaton pipeline interface.

	* sched-rgn.c: Include target.h.
	(init_ready_list, new_ready, debug_dependencies): Add new code for
	automaton pipeline interface.

	* sched-vis.c: Include target.h.
	(get_visual_tbl_length): Add code for automaton interface.
	(target_units, print_block_visualization):  Add comments.

        * Makefile.in (GETRUNTIME, HASHTAB, HOST_GETRUNTIME, HOST_HASHTAB,
	USE_HOST_GETRUNTIME, USE_HOST_HASHTAB, HOST_VARRAY): New variables.
	(sched-rgn.o, sched-vis.o): Add new dependency file target.h.
	(getruntime.o, genautomata.o): New entries.
	(genattrtab.o): Add new dependency file genattrtab.h.
	(genattrtab): Add new dependencies.  Link it with `libm.a'.
	(getruntime.o, hashtab.o): New entries for canadian cross.

	* doc/md.texi: Description of automaton based model.

	* doc/tm.texi (TARGET_SCHED_ISSUE_RATE, TARGET_SCHED_ADJUST_COST):
	Add comments.
	(TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE,
	TARGET_SCHED_DFA_PRE_CYCLE_INSN,
	TARGET_SCHED_INIT_DFA_PRE_CYCLE_INSN,
	TARGET_SCHED_DFA_POST_CYCLE_INSN,
	TARGET_SCHED_INIT_DFA_POST_CYCLE_INSN,
	TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD,
	TARGET_SCHED_INIT_DFA_BUBBLES, TARGET_SCHED_DFA_BUBBLE): The new
	hook descriptions.
	(TRADITIONAL_PIPELINE_INTERFACE, DFA_PIPELINE_INTERFACE,
	MAX_DFA_ISSUE_RATE): New macro descriptions.

	* doc/contrib.texi: Add dfa based scheduler contribution.

	* doc/gcc.texi: Add more information about genattrtab.

From-SVN: r45202
2001-08-27 18:13:42 +00:00