Commit d530b07f by Vladimir Makarov Committed by Vladimir Makarov

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
parent 351df804
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> 2003-01-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* collect2.c (ldgetname): Check HAVE_DECL_LDGETNAME before * collect2.c (ldgetname): Check HAVE_DECL_LDGETNAME before
......
...@@ -361,6 +361,9 @@ main (argc, argv) ...@@ -361,6 +361,9 @@ main (argc, argv)
/* Output interface for pipeline hazards recognition based on /* Output interface for pipeline hazards recognition based on
DFA (deterministic finite state automata. */ DFA (deterministic finite state automata. */
printf ("\n/* DFA based pipeline interface. */"); 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 ("\n#ifndef AUTOMATON_STATE_ALTS\n");
printf ("#define AUTOMATON_STATE_ALTS 0\n"); printf ("#define AUTOMATON_STATE_ALTS 0\n");
printf ("#endif\n\n"); printf ("#endif\n\n");
...@@ -384,10 +387,12 @@ main (argc, argv) ...@@ -384,10 +387,12 @@ main (argc, argv)
printf (" Use the function if bypass_p returns nonzero for\n"); printf (" Use the function if bypass_p returns nonzero for\n");
printf (" the 1st insn. */\n"); printf (" the 1st insn. */\n");
printf ("extern int insn_latency PARAMS ((rtx, rtx));\n\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 ("/* The following function returns number of alternative\n");
printf (" reservations of given insn. It may be used for better\n"); printf (" reservations of given insn. It may be used for better\n");
printf (" insns scheduling heuristics. */\n"); printf (" insns scheduling heuristics. */\n");
printf ("extern int insn_alts PARAMS ((rtx));\n\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 ("/* Maximal possible number of insns waiting results being\n");
printf (" produced by insns whose execution is not finished. */\n"); printf (" produced by insns whose execution is not finished. */\n");
printf ("extern int max_insn_queue_index;\n\n"); printf ("extern int max_insn_queue_index;\n\n");
......
...@@ -6237,7 +6237,18 @@ from the machine description file `md'. */\n\n"); ...@@ -6237,7 +6237,18 @@ from the machine description file `md'. */\n\n");
for (attr = attrs[i]; attr; attr = attr->next) for (attr = attrs[i]; attr; attr = attr->next)
{ {
if (! attr->is_special && ! attr->is_const) 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. /* Write out delay eligibility information, if DEFINE_DELAY present.
......
...@@ -18,6 +18,10 @@ along with GNU CC; see the file COPYING. If not, write to ...@@ -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, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ 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: */ /* Defined in genattrtab.c: */
extern rtx check_attr_test PARAMS ((rtx, int, int)); extern rtx check_attr_test PARAMS ((rtx, int, int));
extern rtx make_numeric_value PARAMS ((int)); extern rtx make_numeric_value PARAMS ((int));
......
...@@ -7577,10 +7577,6 @@ output_reserved_units_table_name (f, automaton) ...@@ -7577,10 +7577,6 @@ output_reserved_units_table_name (f, automaton)
/* Name of result variable in some functions. */ /* Name of result variable in some functions. */
#define RESULT_VARIABLE_NAME "res" #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 /* Name of function (attribute) to translate insn into internal insn
code. */ code. */
#define INTERNAL_DFA_INSN_CODE_FUNC_NAME "internal_dfa_insn_code" #define INTERNAL_DFA_INSN_CODE_FUNC_NAME "internal_dfa_insn_code"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment