Explorar el Código

improved check for loop

ceriel hace 35 años
padre
commit
67e5a8e7a5
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      util/opt/peephole.c

+ 2 - 1
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;