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]

Inline heuristic 4/4


Hi,
this is last part of the heuristics fixes.  It bumps up early-inlining-insns to 10.
This is primarily targeted to eliminate regression on tramp3d.  There are minor
slowdowns on other C++ benchamrks too without this change.

This is not surprise, since early-inlining-insns was tuned to be just good enough for
tramp3d that is most sensitive benchmark on this argument I know. By updating the
cost metric to be more conservative about optimizations from SRA we need to increase
it little bit.

Since early optimization is stronger and we can work out more of IP stuff than
inlining now, late inliner got better on tramp3d (we now get only 100% slowdown
for disabling early inlining) but still we rely on abstraction to be eliminated
in some cases.

Bootstrapped/regtested x86_64-linux, comitted.

	* doc/invoke.texi (early-inlining-insns): Update default.
	* params.def (early-inlining-insns): Default to 10.
Index: doc/invoke.texi
===================================================================
*** doc/invoke.texi	(revision 166652)
--- doc/invoke.texi	(working copy)
*************** whose probability exceeds given threshol
*** 8334,8340 ****
  
  @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
--- 8334,8340 ----
  
  @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 10.
  
  @item max-early-inliner-iterations
  @itemx max-early-inliner-iterations
Index: params.def
===================================================================
*** params.def	(revision 166633)
--- params.def	(working copy)
*************** DEFPARAM(PARAM_IPCP_UNIT_GROWTH,
*** 197,203 ****
  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",
--- 197,203 ----
  DEFPARAM(PARAM_EARLY_INLINING_INSNS,
  	 "early-inlining-insns",
  	 "Maximal estimated growth of function body caused by early inlining of single call",
! 	 10, 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]