From: Andreas Jaeger Date: Tue, 3 Jul 2001 06:22:01 +0000 (+0200) Subject: Makefile.in (insn-recog.o): Add dependency on reload.h. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5b7c7046272b89c0b6e4bc9f00a61edd9e0fb57b;p=gcc.git Makefile.in (insn-recog.o): Add dependency on reload.h. * Makefile.in (insn-recog.o): Add dependency on reload.h. * genrecog.c (write_header): Include reload.h for prototypes in insn-recog.c. From-SVN: r43722 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c4e3f6f939d..47ddeaa1957 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2001-07-03 Andreas Jaeger + + * Makefile.in (insn-recog.o): Add dependency on reload.h. + + * genrecog.c (write_header): Include reload.h for prototypes in + insn-recog.c. + 2001-07-03 Neil Booth config: diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 09801e928ed..b6aaae0e255 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1619,7 +1619,7 @@ s-emit : $(md_file) genemit$(build_exeext) $(srcdir)/move-if-change insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h $(RECOG_H) \ real.h output.h flags.h $(SYSTEM_H) function.h hard-reg-set.h resource.h \ - $(TM_P_H) toplev.h + $(TM_P_H) toplev.h reload.h $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c insn-recog.c: s-recog ; @true diff --git a/gcc/genrecog.c b/gcc/genrecog.c index 00f425bc822..44be087074c 100644 --- a/gcc/genrecog.c +++ b/gcc/genrecog.c @@ -1,6 +1,6 @@ /* Generate code from machine description to recognize rtl as insns. Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1997, 1998, - 1999, 2000 Free Software Foundation, Inc. + 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. @@ -73,7 +73,7 @@ struct decision_head struct decision *first; struct decision *last; }; - + /* A single test. The two accept types aren't tests per-se, but their equality (or lack thereof) does affect tree merging so it is convenient to keep them here. */ @@ -88,7 +88,7 @@ struct decision_test { DT_mode, DT_code, DT_veclen, DT_elt_zero_int, DT_elt_one_int, DT_elt_zero_wide, DT_elt_zero_wide_safe, - DT_veclen_ge, DT_dup, DT_pred, DT_c_test, + DT_veclen_ge, DT_dup, DT_pred, DT_c_test, DT_accept_op, DT_accept_insn } type; @@ -295,7 +295,7 @@ static struct decision_head make_insn_sequence PARAMS ((rtx, enum routine_type)); static void process_tree PARAMS ((struct decision_head *, enum routine_type)); - + static void record_insn_name PARAMS ((int, const char *)); @@ -570,7 +570,7 @@ validate_pattern (pattern, insn, set, set_code) && XSTR (pattern, 2)[0] != '+') { message_with_line (pattern_lineno, - "operand %d missing output reload", + "operand %d missing output reload", XINT (pattern, 0)); error_count++; } @@ -591,7 +591,7 @@ validate_pattern (pattern, insn, set, set_code) /* A modeless MATCH_OPERAND can be handy when we can check for multiple modes in the c_test. In most other cases, it is a mistake. Only DEFINE_INSN is eligible, since SPLIT - and PEEP2 can FAIL within the output pattern. Exclude + and PEEP2 can FAIL within the output pattern. Exclude address_operand, since its mode is related to the mode of the memory not the operand. Exclude the SET_DEST of a call instruction, as that is a common idiom. */ @@ -659,7 +659,7 @@ validate_pattern (pattern, insn, set, set_code) error_count++; } - /* If only one of the operands is VOIDmode, and PC or CC0 is + /* If only one of the operands is VOIDmode, and PC or CC0 is not involved, it's probably a mistake. */ else if (dmode != smode && GET_CODE (dest) != PC @@ -1300,7 +1300,7 @@ nodes_identical_1 (d1, d2) } /* True iff the two nodes are identical (on one level only). Due - to the way these lists are constructed, we shouldn't have to + to the way these lists are constructed, we shouldn't have to consider different orderings on the tests. */ static int @@ -1336,7 +1336,7 @@ nodes_identical (d1, d2) /* A subroutine of merge_trees; given two nodes that have been declared identical, cope with two insn accept states. If they differ in the number of clobbers, then the conflict was created by make_insn_sequence - and we can drop the with-clobbers version on the floor. If both + and we can drop the with-clobbers version on the floor. If both nodes have no additional clobbers, we have found an ambiguity in the source machine description. */ @@ -1424,7 +1424,7 @@ merge_trees (oldh, addh) that tests just the same mode. If we have no match, place NEW after the closest match we found. */ - + for (old = oldh->last; old; old = old->prev) { if (nodes_identical (old, add)) @@ -1466,7 +1466,7 @@ merge_trees (oldh, addh) } } -/* Walk the tree looking for sub-nodes that perform common tests. +/* Walk the tree looking for sub-nodes that perform common tests. Factor out the common test into a new node. This enables us (depending on the test type) to emit switch statements later. */ @@ -1488,7 +1488,7 @@ factor_tests (head) if (next->tests->type != type) continue; - /* Don't want all node types, just those we can turn into + /* Don't want all node types, just those we can turn into switch statements. */ if (type != DT_mode && type != DT_code @@ -1506,7 +1506,7 @@ factor_tests (head) new->tests = first->tests->next; first->tests->next = NULL; } - + /* Crop the node tree off after our first test. */ first->next = NULL; old_last = head->last; @@ -1623,7 +1623,7 @@ find_afterward (head, real_afterward) { struct decision *p, *q, *afterward; - /* We can't propogate alternatives across subroutine boundaries. + /* We can't propogate alternatives across subroutine boundaries. This is not incorrect, merely a minor optimization loss. */ p = head->first; @@ -1636,7 +1636,7 @@ find_afterward (head, real_afterward) if (maybe_both_true (p, q, 1)) break; - /* If we reached the end of the list without finding one, + /* If we reached the end of the list without finding one, use the incoming afterward position. */ if (!q) q = afterward; @@ -1698,12 +1698,12 @@ change_state (oldpos, newpos, afterward, indent) /* We can only fail if we're moving down the tree. */ if (old_has_insn >= 0 && oldpos[old_has_insn] >= newpos[depth]) { - printf ("%stem = peep2_next_insn (%d);\n", + printf ("%stem = peep2_next_insn (%d);\n", indent, newpos[depth] - 'A'); } else { - printf ("%stem = peep2_next_insn (%d);\n", + printf ("%stem = peep2_next_insn (%d);\n", indent, newpos[depth] - 'A'); printf ("%sif (tem == NULL_RTX)\n", indent); if (afterward) @@ -1752,7 +1752,7 @@ write_afterward (start, afterward, indent) } } -/* Emit a switch statement, if possible, for an initial sequence of +/* Emit a switch statement, if possible, for an initial sequence of nodes at START. Return the first node yet untested. */ static struct decision * @@ -1786,7 +1786,7 @@ write_switch (start, depth) printf (" switch (GET_CODE (x%d))\n {\n", depth); code = p->tests->u.code; - do + do { if (p != start && p->need_label && needs_label == NULL) needs_label = p; @@ -2283,7 +2283,7 @@ write_subroutine (head, type) const char *s_or_e; char extension[32]; int i; - + s_or_e = subfunction ? "static " : ""; if (subfunction) @@ -2378,6 +2378,7 @@ write_header () #include \"hard-reg-set.h\"\n\ #include \"resource.h\"\n\ #include \"toplev.h\"\n\ +#include \"reload.h\"\n\ \n"); puts ("\n\ @@ -2660,7 +2661,7 @@ main (argc, argv) h = make_insn_sequence (desc, PEEPHOLE2); merge_trees (&peephole2_tree, &h); } - + next_index++; } @@ -2703,7 +2704,7 @@ record_insn_name (code, name) new_size = (insn_name_ptr_size ? insn_name_ptr_size * 2 : 512); insn_name_ptr = (char **) xrealloc (insn_name_ptr, sizeof(char *) * new_size); - memset (insn_name_ptr + insn_name_ptr_size, 0, + memset (insn_name_ptr + insn_name_ptr_size, 0, sizeof(char *) * (new_size - insn_name_ptr_size)); insn_name_ptr_size = new_size; } @@ -2718,9 +2719,9 @@ record_insn_name (code, name) last_real_name = new = xstrdup (name); last_real_code = code; } - + insn_name_ptr[code] = new; -} +} static void debug_decision_2 (test) @@ -2773,7 +2774,7 @@ debug_decision_2 (test) fprintf (stderr, "A_op=%d", test->u.opno); break; case DT_accept_insn: - fprintf (stderr, "A_insn=(%d,%d)", + fprintf (stderr, "A_insn=(%d,%d)", test->u.insn.code_number, test->u.insn.num_clobbers_to_add); break;