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: Strengthen ICF hash


> On March 4, 2015 9:22:24 PM CET, Jan Hubicka <hubicka@ucw.cz> wrote:
> >> On Wed, Mar 4, 2015 at 2:20 PM, Andi Kleen <andi@firstfloor.org>
> >wrote:
> >> > Hi Honza,
> >> >
> >> > Regarding modern hash functions, as far as I understand the trend
> >> > is to just stop doing anything fancy and just use the CRC
> >instructions
> >> > in modern CPUs
> >> 
> >> I wonder if we can use intrinsics for CRC in place of the
> >> existing iterative_hash_hashval_t (and thus the 'mix' macro)?
> >> Similar to how we optimize libcpp?  Seems like
> >> 
> >> #define mix(a,b,c) \
> >>  c = _mm_crc32_u32 (b, c)
> >> 
> >> would do?  And for iterative_hash_host_wide_int use _mm_crc32_u64?
> >> (libcpp seems to use GCC target builtins, not intrinsics though,
> >> see init_vectorized_lexer)
> >
> >That looks like a good idea.  From tree/ICF sreaming we however needs
> >to get host independent at some point. Can we have resonable&compatible
> >generic implementation?
> 
> I honestly don't see us ending up with a host independent LTO byte code.  I know we kind of try, but did anybody try using bytecode produced by a cross on a native system?

Not in GCC-5. But in longer run I do expect people to be able to ship LTO .o
objects given major GCC version match.  Other compilers including LLVM does
that, we should too. It has other benefits, too - like forcing us to design
things in clean and maintainable manner.

After early debug (hopefully landing in GCC 6) and with gimple/trees interface
cleanups, I think well defined IL stream may be next reachable goal though.

For optimization summaries I have alternative plan - those can stay subversion
specific.  If you get mismatch for minor version, you can just recompute them
on WPA time.  Assuming the LTO shipped libraries will be of controlled size, it
should not be too bad.

But yes, I do not think we need to significantly slow things down in current
implemetnation when this feature does not work.  Just perhaps keep track of
changes that introduce host specific stuff and not introduce these when it is
easily avoidable.

Honza
> 
> Richard.
> 
> >Honza
> 
>  


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