Re: [PATCH] Generic dead function optimisation

From: Stefan Monnier (monnier+lists/linux/kernel/news/@RUM.CS.YALE.EDU)
Date: Fri Apr 21 2000 - 09:38:38 EST


>>>>> "Andrew" == Andrew Morton <andrewm@uow.edu.au> writes:
> I assume there's something quadratic happening in the linker. It would
> be great if the ld team could fix this, because Graham's trick would be
> useful for many more things than just the kernel. Hell, make it the
> default in gcc's specs file.

In the same spirit, I think gcc should automatically get rid of `static'
functions which are not called in the file. This should be part of
the normal "dead-code elimination".
This does not involve the linker at all. It doesn't catch as many cases
as `-ffunction-sections -Wl,--gc-sections' which also works with globally-dead
functions, but has its own advantages.

        Stefan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:19 EST