* invoke.texi (large-unit-insns): Document.
* ipa-inline.c (cgraph_decide_inlining): Use large-unit-insns param.
* params.def (large-unit-insns): New param.
* gcc.dg/winline-5.c: Add large-unit-insns limit.
From-SVN: r106948
+2005-11-15 Jan Hubicka <jh@suse.cz>
+
+ * invoke.texi (large-unit-insns): Document.
+ * ipa-inline.c (cgraph_decide_inlining): Use large-unit-insns param.
+ * params.def (large-unit-insns): New param.
+
2005-11-15 Hans-Peter Nilsson <hp@axis.com>
PR target/24869
The default value is 100 which limits large function growth to 2.0 times
the original size.
+@item large-unit-insns
+The limit specifying large translation unit. Growth caused by inlining of
+units larger than this limit is limited by @option{--param inline-unit-growth}.
+For small units this might be too tight (consider unit consisting of function A
+that is inline and B that just calls A three time. If B is small relative to
+A, the growth of unit is 300\% and yet such inlining is very sane. For very
+large units consisting of small inlininable functions however the overall unit
+growth limit is needed to avoid exponential explosion of code size. Thus for
+smaller units, the size is increased to @option{--param large-unit-insns}
+before aplying @option{--param inline-unit-growth}. The default is 10000
+
@item inline-unit-growth
Specifies maximal overall growth of the compilation unit caused by inlining.
This parameter is ignored when @option{-funit-at-a-time} is not used.
overall_insns = initial_insns;
gcc_assert (!max_count || (profile_info && flag_branch_probabilities));
- max_insns = ((HOST_WIDEST_INT) overall_insns
+ max_insns = overall_insns;
+ if (max_insns < PARAM_VALUE (PARAM_LARGE_UNIT_INSNS))
+ max_insns = PARAM_VALUE (PARAM_LARGE_UNIT_INSNS);
+
+ max_insns = ((HOST_WIDEST_INT) max_insns
* (100 + PARAM_VALUE (PARAM_INLINE_UNIT_GROWTH)) / 100);
nnodes = cgraph_postorder (order);
"large-function-growth",
"Maximal growth due to inlining of large function (in percent)",
100, 0, 0)
+DEFPARAM(PARAM_LARGE_UNIT_INSNS,
+ "large-unit-insns",
+ "The size of translation unit to be considered large",
+ 10000, 0, 0)
DEFPARAM(PARAM_INLINE_UNIT_GROWTH,
"inline-unit-growth",
"how much can given compilation unit grow because of the inlining (in percent)",
+2005-11-15 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/winline-5.c: Add large-unit-insns limit.
+
2005-11-14 David Edelsohn <edelsohn@gnu.org>
* g++.dg/eh/simd-2.C: XFAIL on AIX and SPE.
/* { dg-do compile } */
-/* { dg-options "-Winline -O2 --param inline-unit-growth=0" } */
+/* { dg-options "-Winline -O2 --param inline-unit-growth=0 --param large-unit-insns=0" } */
void big (void);
inline int q(void)