From: Jan Hubicka <hubicka@ucw.cz>
To: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: Reorgnanization of profile count maintenance code, part 1
Date: Sun, 04 Jun 2017 17:21:00 -0000 [thread overview]
Message-ID: <20170604172130.GA48489@kam.mff.cuni.cz> (raw)
In-Reply-To: <20170603185121.256e75kqlwhvegdd@nbbrfq.cc.univie.ac.at>
Hello,
thanks for proofreading!
> On Thu, Jun 01, 2017 at 01:35:56PM +0200, Jan Hubicka wrote:
>
> Just some very minor nits.
>
> > Index: final.c
> > ===================================================================
> > --- final.c (revision 248684)
> > +++ final.c (working copy)
> > @@ -1951,9 +1951,11 @@ dump_basic_block_info (FILE *file, rtx_i
> > fprintf (file, "%s BLOCK %d", ASM_COMMENT_START, bb->index);
> > if (bb->frequency)
> > fprintf (file, " freq:%d", bb->frequency);
> > - if (bb->count)
> > - fprintf (file, " count:%" PRId64,
> > - bb->count);
> > + if (bb->count.initialized_p ())
> > + {
> > + fprintf (file, " count");
>
> Missing colon.
> s/count"/count:"/
Fixed!
>
> I think i saw a_count = a_count + something above and assumed you didn't
> have a += operator. Could thus use the terse form in the snipped code
> above on the patch, maybe?
I did conversion without those operators first because all those places
are subject to updating WRT uninitialized values. I will re-add in
place operators incrementally.
> > static bool
> > check_counter (gimple *stmt, const char * name,
> > - gcov_type *count, gcov_type *all, gcov_type bb_count)
> > + gcov_type *count, gcov_type *all, profile_count bb_count_d)
> > {
> > + gcov_type bb_count = bb_count_d.to_gcov_type ();
> > + return true;
>
> On purpose?
No, it was a hack. I have dropped it now.
I will commit the patch after bit of additional testing. Note that it breaks
gcc.dg/tree-prof/section-attr-2.c because it uncovers bug in loop-im which
forgets to update profile (thus we end up with uninitialized counts rahter than
0 now and prevent hot/cold splitting). I will submit fixes incrementally
one by one rather than mixing them with the actual reorg.
Honza
next prev parent reply other threads:[~2017-06-04 17:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-01 11:36 Jan Hubicka
2017-06-03 18:51 ` Bernhard Reutner-Fischer
2017-06-04 17:21 ` Jan Hubicka [this message]
2017-06-05 15:13 ` Joseph Myers
2017-06-05 15:16 ` Jan Hubicka
2017-06-05 15:37 ` Jan Hubicka
2017-06-05 18:38 ` Andrew Pinski
2017-06-06 5:57 ` Jason Merrill
2017-06-06 8:00 ` Jan Hubicka
2017-06-08 16:57 ` Jason Merrill
2017-06-09 7:52 ` Jan Hubicka
2017-06-06 16:31 ` Segher Boessenkool
2017-06-06 20:25 ` Jan Hubicka
2017-06-07 18:44 ` Segher Boessenkool
2017-06-07 21:11 ` Jan Hubicka
2017-06-07 21:41 ` Segher Boessenkool
2017-06-05 18:52 Dominique d'Humières
2017-06-05 19:14 ` Jan Hubicka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170604172130.GA48489@kam.mff.cuni.cz \
--to=hubicka@ucw.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=rep.dot.nop@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).