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]

[PATCH] Fix PR 18231, not inlining sibling nested functions


We were not marking a function decl's address as invariant because
staticp was returning false for nested functions.  Since we unnest
the nested functions and create trampoline on the tree level, we
can just return true for staticp.

This patch fixes two problems not inlining and causing much worse
code on sibling nested functions, both problems are regressions.

OK? Bootstrapped and tested on powerpc-darwin (with a fix for the
boostrap failure on powerpc-darwin) with no regressions.

Thanks,
Andrew Pinski


ChangeLog:


	* tree.c (staticp) <case FUNCTION_DECL>: Nested functions are static
	also.


Attachment: temp.diff.txt
Description: Text document


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