mirror of
https://github.com/gcc-mirror/gcc.git
synced 2024-11-21 13:40:47 +00:00
ipa-inline.c (want_inline_small_function_p): Compute big_speedup_p lazily and last.
2018-11-07 Richard Biener <rguenther@suse.de> * ipa-inline.c (want_inline_small_function_p): Compute big_speedup_p lazily and last. From-SVN: r265873
This commit is contained in:
parent
6fe2da9faf
commit
296b0b042a
@ -1,3 +1,8 @@
|
||||
2018-11-07 Richard Biener <rguenther@suse.de>
|
||||
|
||||
* ipa-inline.c (want_inline_small_function_p): Compute
|
||||
big_speedup_p lazily and last.
|
||||
|
||||
2018-11-07 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
|
||||
|
@ -779,7 +779,7 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report)
|
||||
{
|
||||
int growth = estimate_edge_growth (e);
|
||||
ipa_hints hints = estimate_edge_hints (e);
|
||||
bool big_speedup = big_speedup_p (e);
|
||||
int big_speedup = -1; /* compute this lazily */
|
||||
|
||||
if (growth <= 0)
|
||||
;
|
||||
@ -787,13 +787,13 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report)
|
||||
hints suggests that inlining given function is very profitable. */
|
||||
else if (DECL_DECLARED_INLINE_P (callee->decl)
|
||||
&& growth >= MAX_INLINE_INSNS_SINGLE
|
||||
&& ((!big_speedup
|
||||
&& !(hints & (INLINE_HINT_indirect_call
|
||||
&& (growth >= MAX_INLINE_INSNS_SINGLE * 16
|
||||
|| (!(hints & (INLINE_HINT_indirect_call
|
||||
| INLINE_HINT_known_hot
|
||||
| INLINE_HINT_loop_iterations
|
||||
| INLINE_HINT_array_index
|
||||
| INLINE_HINT_loop_stride)))
|
||||
|| growth >= MAX_INLINE_INSNS_SINGLE * 16))
|
||||
| INLINE_HINT_loop_stride))
|
||||
&& !(big_speedup = big_speedup_p (e)))))
|
||||
{
|
||||
e->inline_failed = CIF_MAX_INLINE_INSNS_SINGLE_LIMIT;
|
||||
want_inline = false;
|
||||
@ -813,7 +813,6 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report)
|
||||
Upgrade it to MAX_INLINE_INSNS_SINGLE when hints suggests that
|
||||
inlining given function is very profitable. */
|
||||
else if (!DECL_DECLARED_INLINE_P (callee->decl)
|
||||
&& !big_speedup
|
||||
&& !(hints & INLINE_HINT_known_hot)
|
||||
&& growth >= ((hints & (INLINE_HINT_indirect_call
|
||||
| INLINE_HINT_loop_iterations
|
||||
@ -821,7 +820,8 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report)
|
||||
| INLINE_HINT_loop_stride))
|
||||
? MAX (MAX_INLINE_INSNS_AUTO,
|
||||
MAX_INLINE_INSNS_SINGLE)
|
||||
: MAX_INLINE_INSNS_AUTO))
|
||||
: MAX_INLINE_INSNS_AUTO)
|
||||
&& !(big_speedup == -1 ? big_speedup_p (e) : big_speedup))
|
||||
{
|
||||
/* growth_likely_positive is expensive, always test it last. */
|
||||
if (growth >= MAX_INLINE_INSNS_SINGLE
|
||||
|
Loading…
Reference in New Issue
Block a user