This is the mail archive of the gcc@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: LTO and the inlining of functions only called once.


On Sat, Oct 10, 2009 at 1:46 PM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Sat, Oct 10, 2009 at 1:34 PM, Toon Moene <toon@moene.org> wrote:
>> Richard Guenther wrote:
>>
>>> On Sat, Oct 10, 2009 at 12:55 PM, Toon Moene <toon@moene.org> wrote:
>>
>>> Well, I think that we should try to not do this across the whole program.
>>> Simply for the reason that a gigantic main function will hit several
>>> non-linear complexity algorithms in GCC.
>>
>> But, but ... other people are talking about 30 minute "compiles" while the
>> lto1 executable doesn't even register on the radar (top) over here.
>>
>> Besides, inlining these subroutines will get rid of 200+ item argument
>> lists, a benefit on its own (think I-cache).
>>
>> In the mean time I found the --param I'll tweak:
>>
>> ?--param max-inline-insns-single=100000
>>
>> I'd like to see some fireworks, too !
>
> That's not the parameter you want to tweak ;) ?You want
>
> --param large-function-growth=10000 --param large-function-insns=1000000
> --param large-stack-frame-growth=10000 --param large-stack-frame=100000

Or rather for testing the effect of inlining all functions called once
use the following
patch:

Index: ipa-inline.c
===================================================================
--- ipa-inline.c	(revision 152615)
+++ ipa-inline.c	(working copy)
@@ -1249,8 +1249,8 @@ cgraph_decide_inlining (void)
 			   node->callers->caller->global.size);
 		}

-	      if (cgraph_check_inline_limits (node->callers->caller, node,
-					      NULL, false))
+	      if (1 || cgraph_check_inline_limits (node->callers->caller, node,
+						   NULL, false))
 		{
 		  cgraph_mark_inline (node->callers);
 		  if (dump_file)


tuning params will affect other inlining decisions as well.

Richard.


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