Commit 9ca8a4c0 by Jan Hubicka Committed by Jan Hubicka

ipa-inline.h (ipa_call_summary): Turn sizes into signed; add ctor.

	* ipa-inline.h (ipa_call_summary): Turn sizes into signed;
	add ctor.
	* ipa-inline.c (want_inline_small_function_p): Do not cast to
	unsigned.

From-SVN: r248263
parent 263e19c7
2017-05-19 Jan Hubicka <hubicka@ucw.cz> 2017-05-19 Jan Hubicka <hubicka@ucw.cz>
* ipa-inline.h (ipa_call_summary): Turn sizes into signed;
add ctor.
* ipa-inline.c (want_inline_small_function_p): Do not cast to
unsigned.
2017-05-19 Jan Hubicka <hubicka@ucw.cz>
* ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list, * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
inline_edge_removal_hook, inline_edge_duplication_hook): Remove. inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
(inline_edge_summary_vec): Turn into ... (inline_edge_summary_vec): Turn into ...
......
...@@ -723,7 +723,7 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report) ...@@ -723,7 +723,7 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report)
&& (!e->count || !e->maybe_hot_p ())) && (!e->count || !e->maybe_hot_p ()))
&& inline_summaries->get (callee)->min_size && inline_summaries->get (callee)->min_size
- ipa_call_summaries->get (e)->call_stmt_size - ipa_call_summaries->get (e)->call_stmt_size
> (unsigned)MAX (MAX_INLINE_INSNS_SINGLE, MAX_INLINE_INSNS_AUTO)) > MAX (MAX_INLINE_INSNS_SINGLE, MAX_INLINE_INSNS_AUTO))
{ {
e->inline_failed = CIF_MAX_INLINE_INSNS_AUTO_LIMIT; e->inline_failed = CIF_MAX_INLINE_INSNS_AUTO_LIMIT;
want_inline = false; want_inline = false;
...@@ -731,7 +731,7 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report) ...@@ -731,7 +731,7 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report)
else if ((DECL_DECLARED_INLINE_P (callee->decl) || e->count) else if ((DECL_DECLARED_INLINE_P (callee->decl) || e->count)
&& inline_summaries->get (callee)->min_size && inline_summaries->get (callee)->min_size
- ipa_call_summaries->get (e)->call_stmt_size - ipa_call_summaries->get (e)->call_stmt_size
> (unsigned)16 * MAX_INLINE_INSNS_SINGLE) > 16 * MAX_INLINE_INSNS_SINGLE)
{ {
e->inline_failed = (DECL_DECLARED_INLINE_P (callee->decl) e->inline_failed = (DECL_DECLARED_INLINE_P (callee->decl)
? CIF_MAX_INLINE_INSNS_SINGLE_LIMIT ? CIF_MAX_INLINE_INSNS_SINGLE_LIMIT
......
...@@ -189,10 +189,18 @@ struct ipa_call_summary ...@@ -189,10 +189,18 @@ struct ipa_call_summary
/* Vector indexed by parameters. */ /* Vector indexed by parameters. */
vec<inline_param_summary> param; vec<inline_param_summary> param;
/* Estimated size and time of the call statement. */ /* Estimated size and time of the call statement. */
unsigned int call_stmt_size; int call_stmt_size;
unsigned int call_stmt_time; int call_stmt_time;
/* Depth of loop nest, 0 means no nesting. */ /* Depth of loop nest, 0 means no nesting. */
unsigned int loop_depth; unsigned int loop_depth;
/* Keep all field empty so summary dumping works during its computation.
This is useful for debugging. */
ipa_call_summary ()
: predicate (NULL), param (vNULL), call_stmt_size (0), call_stmt_time (0),
loop_depth (0)
{
}
}; };
class ipa_call_summary_t: public call_summary <ipa_call_summary *> class ipa_call_summary_t: public call_summary <ipa_call_summary *>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment