This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Reorgnanization of profile count maintenance code, part 1


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]