From: ceriel Date: Mon, 30 Oct 1989 15:17:01 +0000 (+0000) Subject: improved check for loop X-Git-Tag: release-5-5~2131 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=67e5a8e7a5982f353e038fbbce3d0252cae4505a;p=ack.git improved check for loop --- diff --git a/util/opt/peephole.c b/util/opt/peephole.c index 7145629e8..2a8e5bba6 100644 --- a/util/opt/peephole.c +++ b/util/opt/peephole.c @@ -642,10 +642,11 @@ basicblock(alpp) line_p *alpp; { } if (lpp == next) { count++; - if (count > 100) { + if (count > 1000) { /* probably loop in table */ fprintf(stderr, "Warning: possible loop in patterns; call an expert\n"); next = &((*lpp)->l_next); + count = 0; } } else count = 0;