From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7736 invoked by alias); 22 May 2017 10:42:06 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 6557 invoked by uid 89); 22 May 2017 10:42:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-9.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_ASCII_DIVIDERS,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=9197, 25366 X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 22 May 2017 10:42:03 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 97B17542BC2; Mon, 22 May 2017 12:42:04 +0200 (CEST) Date: Mon, 22 May 2017 11:20:00 -0000 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: Drop self_time from inline_summary Message-ID: <20170522104204.GC33625@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2017-05/txt/msg01662.txt.bz2 Hi, self_time is currently write only and there is quite good reason for it (one should not care about running time of unoptimized body without context at all). Bootstrapped/regtested x86_64-linux, comitted. Honza * ipa-inline-analysis.c (inline_summary::reset): Do not reset self_time. (dump_inline_summary): Do not print self_time. (estimate_function_body_sizes): Do not set self_time. (compute_inline_parameters): Likewise. (inline_read_section, inline_write_summary): Do not stream self_time. * ipa-inline.h (inline_summary): Drop self_time. Index: ipa-inline-analysis.c =================================================================== --- ipa-inline-analysis.c (revision 248322) +++ ipa-inline-analysis.c (working copy) @@ -560,7 +560,6 @@ inline_summary::reset (struct cgraph_nod struct cgraph_edge *e; self_size = 0; - self_time = 0; estimated_stack_size = 0; estimated_self_stack_size = 0; stack_frame_offset = 0; @@ -920,8 +919,7 @@ dump_inline_summary (FILE *f, struct cgr fprintf (f, " contains_cilk_spawn"); if (s->fp_expressions) fprintf (f, " fp_expression"); - fprintf (f, "\n self time: %f\n", s->self_time.to_double ()); - fprintf (f, " global time: %f\n", s->time.to_double ()); + fprintf (f, "\n global time: %f\n", s->time.to_double ()); fprintf (f, " self size: %i\n", s->self_size); fprintf (f, " global size: %i\n", s->size); fprintf (f, " min size: %i\n", s->min_size); @@ -2415,7 +2413,7 @@ estimate_function_body_sizes (struct cgr e->aux = NULL; } } - inline_summaries->get (node)->self_time = time; + inline_summaries->get (node)->time = time; inline_summaries->get (node)->self_size = size; nonconstant_names.release (); ipa_release_body_info (&fbi); @@ -2472,7 +2470,6 @@ compute_inline_parameters (struct cgraph info->account_size_time (2 * INLINE_SIZE_SCALE, 0, t, t); inline_update_overall_summary (node); info->self_size = info->size; - info->self_time = info->time; /* We can not inline instrumentation clones. */ if (node->thunk.add_pointer_bounds_args) { @@ -2539,7 +2536,6 @@ compute_inline_parameters (struct cgraph node->calls_comdat_local = (e != NULL); /* Inlining characteristics are maintained by the cgraph_mark_inline. */ - info->time = info->self_time; info->size = info->self_size; info->stack_frame_offset = 0; info->estimated_stack_size = info->estimated_self_stack_size; @@ -2548,8 +2544,7 @@ compute_inline_parameters (struct cgraph inline_update_overall_summary but because computation happens in different order the roundoff errors result in slight changes. */ inline_update_overall_summary (node); - gcc_assert (!(info->time - info->self_time).to_int () - && info->size == info->self_size); + gcc_assert (info->size == info->self_size); } @@ -3695,7 +3690,7 @@ inline_read_section (struct lto_file_dec info->estimated_stack_size = info->estimated_self_stack_size = streamer_read_uhwi (&ib); info->size = info->self_size = streamer_read_uhwi (&ib); - info->time = info->self_time = sreal::stream_in (&ib); + info->time = sreal::stream_in (&ib); bp = streamer_read_bitpack (&ib); info->inlinable = bp_unpack_value (&bp, 1); @@ -3848,7 +3843,7 @@ inline_write_summary (void) streamer_write_uhwi (ob, lto_symtab_encoder_encode (encoder, cnode)); streamer_write_hwi (ob, info->estimated_self_stack_size); streamer_write_hwi (ob, info->self_size); - info->self_time.stream_out (ob); + info->time.stream_out (ob); bp = bitpack_create (ob->main_stream); bp_pack_value (&bp, info->inlinable, 1); bp_pack_value (&bp, info->contains_cilk_spawn, 1); Index: ipa-inline.h =================================================================== --- ipa-inline.h (revision 248322) +++ ipa-inline.h (working copy) @@ -96,8 +96,6 @@ struct GTY(()) inline_summary HOST_WIDE_INT estimated_self_stack_size; /* Size of the function body. */ int self_size; - /* Time of the function body. */ - sreal GTY((skip)) self_time; /* Minimal size increase after inlining. */ int min_size; @@ -149,7 +147,7 @@ struct GTY(()) inline_summary /* Keep all field empty so summary dumping works during its computation. This is useful for debugging. */ inline_summary () - : estimated_self_stack_size (0), self_size (0), self_time (0), min_size (0), + : estimated_self_stack_size (0), self_size (0), min_size (0), inlinable (false), contains_cilk_spawn (false), single_caller (false), fp_expressions (false), estimated_stack_size (false), stack_frame_offset (false), time (0), size (0), conds (NULL),