make-alpha
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: secondary expansion changes


From: Boris Kolpackov
Subject: Re: secondary expansion changes
Date: Fri, 25 Sep 2009 21:40:35 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Paul,

Paul D. Smith <address@hidden> writes:

> >  %.o: CFLAGS := -g
> >  %.o: CFLAGS := -g
> >  %.o: CFLAGS := -g
> > 
> >  All three assignments will end up in the list. I wonder if we can
> >  be smarter here?]
> 
> Do you mean there are three instances of the "%.o" pattern rule?

I mean that there will be three identical entries in the 
variables.c:pattern_vars list. I don't think we even need to keep
identical variables with different values. For example:

%.o: CFLAGS := -g
%.o: CFLAGS := -O3

Here we only need to keep the last assignment in pattern_vars
since the first one will never be used.


> Sure, we can fix this, at a bit of performance cost (well, "a bit"
> depends on how many pattern-specific variables you have).  We have to
> preserve the order because, just like pattern rules, they are searched
> in order.  Either we could just linearly search them to see if we
> already have one, or we could create a look-aside hash for them if a
> linear search was too slow.

Yes, we can try this. Though this is all just guessing. What I am 
planning to do later is fire up oprofile and really find out where 
all this time is spent.


> > http://www.codesynthesis.com/~boris/tmp/make-valgrind.log
> 
> Oops:
> 
>         You don't have permission to
>         access /~boris/tmp/make-valgrind.log on this server.

Sorry, fixed now.

Boris




reply via email to

[Prev in Thread] Current Thread [Next in Thread]