genattrtab.h (INSN_ALTS_FUNC_NAME): Move it from genautomata.c.

2003-01-20  Vladimir Makarov  <vmakarov@redhat.com>

        * genattrtab.h (INSN_ALTS_FUNC_NAME): Move it from genautomata.c.

	* genautomata.c (INSN_ALTS_FUNC_NAME): Move it into genattrtab.h.

	* genattr.c (main): Output default definition of AUTOMATON_ALTS.
	Wrap up definition `insn_alts'.

	* genattrtab.c (main): Wrap up `insn_alts'.

From-SVN: r61513
This commit is contained in:
Vladimir Makarov 2003-01-20 22:49:33 +00:00 committed by Vladimir Makarov
parent 351df80413
commit d530b07f81
5 changed files with 32 additions and 5 deletions

View File

@ -1,3 +1,14 @@
2003-01-20 Vladimir Makarov <vmakarov@redhat.com>
* genattrtab.h (INSN_ALTS_FUNC_NAME): Move it from genautomata.c.
* genautomata.c (INSN_ALTS_FUNC_NAME): Move it into genattrtab.h.
* genattr.c (main): Output default definition of AUTOMATON_ALTS.
Wrap up definition of `insn_alts'.
* genattrtab.c (main): Wrap up `insn_alts'.
2003-01-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* collect2.c (ldgetname): Check HAVE_DECL_LDGETNAME before

View File

@ -361,6 +361,9 @@ main (argc, argv)
/* Output interface for pipeline hazards recognition based on
DFA (deterministic finite state automata. */
printf ("\n/* DFA based pipeline interface. */");
printf ("\n#ifndef AUTOMATON_ALTS\n");
printf ("#define AUTOMATON_ALTS 0\n");
printf ("#endif\n\n");
printf ("\n#ifndef AUTOMATON_STATE_ALTS\n");
printf ("#define AUTOMATON_STATE_ALTS 0\n");
printf ("#endif\n\n");
@ -384,10 +387,12 @@ main (argc, argv)
printf (" Use the function if bypass_p returns nonzero for\n");
printf (" the 1st insn. */\n");
printf ("extern int insn_latency PARAMS ((rtx, rtx));\n\n");
printf ("\n#if AUTOMATON_ALTS\n");
printf ("/* The following function returns number of alternative\n");
printf (" reservations of given insn. It may be used for better\n");
printf (" insns scheduling heuristics. */\n");
printf ("extern int insn_alts PARAMS ((rtx));\n\n");
printf ("#endif\n\n");
printf ("/* Maximal possible number of insns waiting results being\n");
printf (" produced by insns whose execution is not finished. */\n");
printf ("extern int max_insn_queue_index;\n\n");

View File

@ -6237,7 +6237,18 @@ from the machine description file `md'. */\n\n");
for (attr = attrs[i]; attr; attr = attr->next)
{
if (! attr->is_special && ! attr->is_const)
write_attr_get (attr);
{
int insn_alts_p;
insn_alts_p
= (attr->name [0] == '*'
&& strcmp (&attr->name [1], INSN_ALTS_FUNC_NAME) == 0);
if (insn_alts_p)
printf ("\n#if AUTOMATON_ALTS\n");
write_attr_get (attr);
if (insn_alts_p)
printf ("#endif\n\n");
}
}
/* Write out delay eligibility information, if DEFINE_DELAY present.

View File

@ -18,6 +18,10 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Name of function (attribute) to translate insn into number of insn
alternatives reservation. */
#define INSN_ALTS_FUNC_NAME "insn_alts"
/* Defined in genattrtab.c: */
extern rtx check_attr_test PARAMS ((rtx, int, int));
extern rtx make_numeric_value PARAMS ((int));

View File

@ -7577,10 +7577,6 @@ output_reserved_units_table_name (f, automaton)
/* Name of result variable in some functions. */
#define RESULT_VARIABLE_NAME "res"
/* Name of function (attribute) to translate insn into number of insn
alternatives reservation. */
#define INSN_ALTS_FUNC_NAME "insn_alts"
/* Name of function (attribute) to translate insn into internal insn
code. */
#define INTERNAL_DFA_INSN_CODE_FUNC_NAME "internal_dfa_insn_code"