aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1999-10-13 21:07:03 -0700
committerRichard Henderson <rth@gcc.gnu.org>1999-10-13 21:07:03 -0700
commit4dc320a596bdc1f272d744f622fb935337b01954 (patch)
tree93cc3eb4893e7ca45e78b76dd977b0701cee2c08 /gcc
parentbcdaba58ffeec82ffd876d353ad94b7317cca9b7 (diff)
downloadgcc-4dc320a596bdc1f272d744f622fb935337b01954.zip
gcc-4dc320a596bdc1f272d744f622fb935337b01954.tar.gz
gcc-4dc320a596bdc1f272d744f622fb935337b01954.tar.bz2
genrecog.c (maybe_both_true_2): Don't compare modes of two DT_pred tests.
* genrecog.c (maybe_both_true_2): Don't compare modes of two DT_pred tests. (process_tree): Elide peephole2_insns. Invoke simplify_tests after find_afterward. (debug_decision_1): Dump next and afterward codes. Co-Authored-By: Jim Wilson <wilson@cygnus.com> From-SVN: r29958
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/genrecog.c29
2 files changed, 29 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 96088dd..7d80cd3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+Wed Oct 13 21:04:45 1999 Richard Henderson <rth@cygnus.com>
+ Jim Wilson <wilson@cygnus.com>
+
+ * genrecog.c (maybe_both_true_2): Don't compare modes of
+ two DT_pred tests.
+ (process_tree): Elide peephole2_insns. Invoke simplify_tests
+ after find_afterward.
+ (debug_decision_1): Dump next and afterward codes.
+
Wed Oct 13 20:35:16 1999 Richard Henderson <rth@cygnus.com>
* rtl.c (dump_and_abort): Remove.
diff --git a/gcc/genrecog.c b/gcc/genrecog.c
index 0be5558..251e5e9 100644
--- a/gcc/genrecog.c
+++ b/gcc/genrecog.c
@@ -837,12 +837,10 @@ maybe_both_true_2 (d1, d2)
if (d1->u.pred.mode != d2->u.mode)
return 0;
}
- else if (d2->type == DT_pred)
- {
- if (d2->u.pred.mode != VOIDmode
- && d1->u.pred.mode != d2->u.pred.mode)
- return 0;
- }
+ /* Don't check two predicate modes here, because if both predicates
+ accept CONST_INT, then both can still be true even if the modes
+ are different. If they don't accept CONST_INT, there will be a
+ separate DT_mode that will make maybe_both_true_1 return 0. */
}
if (d1->u.pred.index >= 0)
@@ -2270,17 +2268,28 @@ process_tree (head, subroutine_type)
struct decision_head *head;
enum routine_type subroutine_type;
{
- if (head->first != NULL)
+ if (head->first == NULL)
+ {
+ /* We can elide peephole2_insns, but not recog or split_insns. */
+ if (subroutine_type == PEEPHOLE2)
+ return;
+ }
+ else
{
factor_tests (head);
- simplify_tests (head);
next_subroutine_number = 0;
break_out_subroutines (head, 1);
find_afterward (head, NULL);
+ /* We run this after find_afterward, because find_afterward needs
+ the redundant DT_mode tests on predicates to determine whether
+ two tests can both be true or not. */
+ simplify_tests(head);
+
write_subroutines (head, subroutine_type);
}
+
write_subroutine (head, subroutine_type);
}
@@ -2527,7 +2536,9 @@ debug_decision_1 (d, indent)
debug_decision_2 (test);
}
}
- fprintf (stderr, "} %d\n", d->number);
+ fprintf (stderr, "} %d n %d a %d\n", d->number,
+ (d->next ? d->next->number : -1),
+ (d->afterward ? d->afterward->number : -1));
}
static void