diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-22 07:31:51 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-22 07:31:51 +0000 |
commit | 84eb7376a2cd49639ceff4e44a17bb98b2fa4fe8 (patch) | |
tree | 14a2e445c6451f90f4771e977b830c691ef8ce2d /gcc/genautomata.c | |
parent | e11b48c44268bb6a231ab02c4b006487633b10b1 (diff) | |
download | gcc-84eb7376a2cd49639ceff4e44a17bb98b2fa4fe8.tar.gz |
* genautomata.c (output_internal_insn_latency_func,
output_print_reservation_func): Short circuit when there is no
automaton to generate code for.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61588 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genautomata.c')
-rw-r--r-- | gcc/genautomata.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/gcc/genautomata.c b/gcc/genautomata.c index 3fe4553d200..bb1a9d9a6c6 100644 --- a/gcc/genautomata.c +++ b/gcc/genautomata.c @@ -8920,12 +8920,19 @@ output_internal_insn_latency_func () INTERNAL_INSN_LATENCY_FUNC_NAME, INTERNAL_INSN_CODE_NAME, INTERNAL_INSN2_CODE_NAME, INSN_PARAMETER_NAME, INSN2_PARAMETER_NAME); - fprintf (output_file, "\n\tint %s;\n\tint %s;\n", + fprintf (output_file, + "\n\tint %s ATTRIBUTE_UNUSED;\n\tint %s ATTRIBUTE_UNUSED;\n", INTERNAL_INSN_CODE_NAME, INTERNAL_INSN2_CODE_NAME); fprintf (output_file, "\trtx %s ATTRIBUTE_UNUSED;\n\trtx %s ATTRIBUTE_UNUSED;\n{\n", INSN_PARAMETER_NAME, INSN2_PARAMETER_NAME); + if (DECL_INSN_RESERV (advance_cycle_insn_decl)->insn_num == 0) + { + fputs (" return 0;\n}\n\n", output_file); + return; + } + fprintf (output_file, " static const %s default_latencies[] =\n {", tabletype); @@ -9015,11 +9022,20 @@ output_print_reservation_func () decl_t decl; int i, j; - fprintf (output_file, "void\n%s (%s, %s)\n\tFILE *%s;\n\trtx %s;\n{\n", + fprintf (output_file, + "void\n%s (%s, %s)\n\tFILE *%s;\n\trtx %s ATTRIBUTE_UNUSED;\n{\n", PRINT_RESERVATION_FUNC_NAME, FILE_PARAMETER_NAME, INSN_PARAMETER_NAME, FILE_PARAMETER_NAME, INSN_PARAMETER_NAME); + if (DECL_INSN_RESERV (advance_cycle_insn_decl)->insn_num == 0) + { + fprintf (output_file, " fputs (\"%s\", %s);\n}\n\n", + NOTHING_NAME, FILE_PARAMETER_NAME); + return; + } + + fputs (" static const char *const reservation_names[] =\n {", output_file); |