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]

Reduce early-inlining-insns


Hi,
this is first patch to trottle down the inlining limits same way as we do on
pretty-ipa.  The idea is that with stronger early optimization (we now do
aliasing, loop removal etc) and somewhat stronger IPA too, inliner should be
both more informed about what it is doing and less important.  I hope this will
make inliner to scale better for LTO.

This patch drops early inlining from 12 to 8.  I originally had to bump up the value in order to make tramp3d and dlv work.  After empty loop removal (that arrise in tramp3d from vector initialization loops) we no longer need it.
In fact tramp3d now don't care about early inlining insns much.

I tested the patch on frescobaldi tonight and didn't observed any off-noise
slowdowns except for apparent little regressions in libstdc++ benchmarks.
There are improvements in code size on i.e. cwchess, freefem and others.  Since
the libstdc++ affect just few tests and don't seem to show in geomean, I think
it is OK and I am just looking into the benchmarks if I can improve them
somehow.  Everything gets inlined there, so it more seems problem with late
optimizations not being to be able to catch everything early optimizations
does.

Bootstrapped/regtested x86_64-linux, will commit it later today if there are no
objections.

Honza

	* doc/invoke.texi (early-inlining-insns): Drop to 8 from 12.
	* params.def (early-inlining-insns): Drop to 8 from 12.
Index: doc/invoke.texi
===================================================================
*** doc/invoke.texi	(revision 151498)
--- doc/invoke.texi	(working copy)
*************** whose probability exceeds given threshol
*** 7714,7720 ****
  
  @item early-inlining-insns
  Specify growth that early inliner can make.  In effect it increases amount of
! inlining for code having large abstraction penalty.  The default value is 12.
  
  @item max-early-inliner-iterations
  @itemx max-early-inliner-iterations
--- 7714,7720 ----
  
  @item early-inlining-insns
  Specify growth that early inliner can make.  In effect it increases amount of
! inlining for code having large abstraction penalty.  The default value is 8.
  
  @item max-early-inliner-iterations
  @itemx max-early-inliner-iterations
Index: params.def
===================================================================
*** params.def	(revision 151498)
--- params.def	(working copy)
*************** DEFPARAM(PARAM_IPCP_UNIT_GROWTH,
*** 185,191 ****
  DEFPARAM(PARAM_EARLY_INLINING_INSNS,
  	 "early-inlining-insns",
  	 "maximal estimated growth of function body caused by early inlining of single call",
! 	 12, 0, 0)
  DEFPARAM(PARAM_LARGE_STACK_FRAME,
  	 "large-stack-frame",
  	 "The size of stack frame to be considered large",
--- 185,191 ----
  DEFPARAM(PARAM_EARLY_INLINING_INSNS,
  	 "early-inlining-insns",
  	 "maximal estimated growth of function body caused by early inlining of single call",
! 	 8, 0, 0)
  DEFPARAM(PARAM_LARGE_STACK_FRAME,
  	 "large-stack-frame",
  	 "The size of stack frame to be considered large",


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