__attribute__((leafify))

Joseph S. Myers jsm28@cam.ac.uk
Tue Jun 3 21:27:00 GMT 2003


On Tue, 3 Jun 2003, Richard Guenther wrote:

> So what is this __attribute__((leafify))? Its a way to tell gcc to make
> the marked function a leaf of the cfg, i.e. to inline every call made in
> this function ignoring all inlining limits. A patch for mainline was
> posted at
> http://gcc.gnu.org/ml/gcc-patches/2003-05/msg01662.html

Your patch doesn't have testcases.  They should include:

* That correct uses of the attribute are accepted, and incorrect ones 
rejected.

* That a proper warning is given (at least with -Winline) if for some 
reason the function can't be made into a leaf.

* That the attribute does indeed work.  This could be tricky but you
should be able e.g. to check for the names of static functions in the
assembler output, where those functions would only be inlined when the
attribute is given.

-- 
Joseph S. Myers
jsm28@cam.ac.uk



More information about the Gcc mailing list