http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55734



--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-18 
15:53:42 UTC ---

(In reply to comment #4)

> (In reply to comment #3)

> > In that thread, I had asked:

> > 

> > ---

> > If you prefer, I can simply inline the popcount/clz functionality into

> > gcov-io.c directly (or at least when not using recent versions of

> > GCC). But that in fact would be duplicating the code, when I thought

> > Aldy's solution was trying to avoid that by providing the more general

> > interfaces.

> > 

> > Teresa

> > ---

> > 

> > but didn't get a response. Richard, is that your preferred route for

> > fixing this issue?

> 

> We already have popcount_hwi and clz_hwi available.  Can't you piggy-back

> on that to provide (inline in gcov-io.c) popcountll and clzll?  Why do

> you need the long long variants anyway?



You don't seem to:



  unsigned histo_bitvector[GCOV_HISTOGRAM_BITVECTOR_SIZE];

...

         h_cnt += __builtin_popcountll (histo_bitvector[bv_ix]);



so just use popcount_hwi.

Reply via email to