This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][C] Fix GNU extern inline heuristic again (fix C++ memory usage regression)


Ian Lance Taylor wrote:
Paolo Bonzini <bonzini@gnu.org> writes:

Richard, the patch is OK.
I think we should add a note to the manual that GNU "extern inline"
functions are always inlined.

By my reading, the documentation already says that. Where you thinking of a specific place to change?

Looking at 4.2 documentation, it never mentioned different inlining policies for "GNU extern inline" vs. other inline functions.


I was thinking that, where it says "The definition in the header file will cause most calls to the function to be inlined.", we could add "because `extern inline' functions are always inlined independent of the usual heuristics to limit code growth and of optimization being enabled."

At the end of the paragraph, where "always_inline" is documented, it says "GCC does not inline any functions when not optimizing unless you specify the `always_inline' attribute". We should say, "When not optimizing, GCC only inlines functions that use the GNU `extern inline' extension, or that specify the `always_inline' attribute".

Also, Richi, does your patch change the behavior of GCC with respect to recursive `extern inline' functions?

Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]