+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,
&& (!e->count || !e->maybe_hot_p ()))
&& inline_summaries->get (callee)->min_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;
want_inline = false;
else if ((DECL_DECLARED_INLINE_P (callee->decl) || e->count)
&& inline_summaries->get (callee)->min_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)
? CIF_MAX_INLINE_INSNS_SINGLE_LIMIT
/* Vector indexed by parameters. */
vec<inline_param_summary> param;
/* Estimated size and time of the call statement. */
- unsigned int call_stmt_size;
- unsigned int call_stmt_time;
+ int call_stmt_size;
+ int call_stmt_time;
/* Depth of loop nest, 0 means no nesting. */
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 *>