Nuke an `optimization' that made source list creation O(n^2). This may cause

more memory to be used with stupid Makefiles, but it saves a fair amount of
time (~13% just for libc) with sane ones.
This commit is contained in:
mycroft 2000-06-10 13:48:48 +00:00
parent ef22daefd0
commit 83f22c12ea
1 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: parse.c,v 1.48 2000/05/11 08:22:40 sjg Exp $ */
/* $NetBSD: parse.c,v 1.49 2000/06/10 13:48:48 mycroft Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -39,14 +39,14 @@
*/
#ifdef MAKE_BOOTSTRAP
static char rcsid[] = "$NetBSD: parse.c,v 1.48 2000/05/11 08:22:40 sjg Exp $";
static char rcsid[] = "$NetBSD: parse.c,v 1.49 2000/06/10 13:48:48 mycroft Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
__RCSID("$NetBSD: parse.c,v 1.48 2000/05/11 08:22:40 sjg Exp $");
__RCSID("$NetBSD: parse.c,v 1.49 2000/06/10 13:48:48 mycroft Exp $");
#endif
#endif /* not lint */
#endif
@ -445,7 +445,11 @@ ParseLinkSrc (pgnp, cgnp)
GNode *cgn = (GNode *) cgnp;
if ((pgn->type & OP_DOUBLEDEP) && !Lst_IsEmpty (pgn->cohorts))
pgn = (GNode *) Lst_Datum (Lst_Last (pgn->cohorts));
#if 0
if (Lst_Member (pgn->children, (ClientData)cgn) == NILLNODE) {
#else
if (1) {
#endif
(void)Lst_AtEnd (pgn->children, (ClientData)cgn);
if (specType == Not) {
(void)Lst_AtEnd (cgn->parents, (ClientData)pgn);