[x264-devel] AMD Optimization - Local Static Functions

Loren Merritt lorenm at u.washington.edu
Sat Nov 17 10:58:30 CET 2012


On Fri, 16 Nov 2012, Philip Muzzall wrote:

> I was looking at the AMD *Software Optimization Guide for AMD Family 15h
> Processors*<http://support.amd.com/us/Processor_TechDocs/47414_15h_sw_opt_guide.pdf>and
> Section 3.13 talks about local static functions. I was thinking about
> experimenting with this and was wondering if there's a list or way to find
> out which functions are not called outside their definition files.

`nm *.o | grep -w T` is a list of definitions of non-static functions.
`nm *.o | grep -w U` is a list of uses of non-static functions defined
elsewhere.
Any function on the first list and not on the second could be changed to
static without any other reorganization of code.

x264 already uses local static everywhere. (There are a few exceptions,
but they're all DSP functions called via function pointer, so static
wouldn't allow any optimizations there.)

--Loren Merritt


More information about the x264-devel mailing list