Source-Changes archive

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

CVS commit: src/usr.bin/make



Module Name:    src
Committed By:   rillig
Date:           Sat Sep 26 16:18:44 UTC 2020

Modified Files:
        src/usr.bin/make: targ.c

Log Message:
make(1): inline Targ_FindNodeImpl

The 3 callers of this function passed different flags, and these flags
led to code paths that almost did not overlap.

It's a bit strange that GCC 5 didn't get that, and even marking the
function as inline did not produce much smaller code, even though the
conditions inside that function were obviously constant.  Clang 9 did a
better job here.

But even for human readers, inlining the function and then throwing away
the dead code leads to much easier code.

This pattern of squeezing completely different code into a single
function has already occurred in a different part of make, though I
don't remember where exactly.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/usr.bin/make/targ.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index