+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
/* 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");
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");
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.
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));
/* 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"