Message ID | alpine.LSU.2.20.1901301342360.23386@zhemvz.fhfr.qr |
---|---|
State | New |
Headers | show |
Series | Fix compile-time of PR89115 | expand |
On 01/30/2019 07:45 AM, Richard Biener wrote: > The PR89115 spends ~66% of its compile-time in LRA reload inheritance > because of a weak hash and a lot of collisions in the invaraints hash. > > This can be fixed by the following, bringing down inheritance time > to the noise. > > Bootstrap / regtest running on x86_64-unknown-linux-gnu, OK for trunk > (and branches?)? Yes, sure. Thank you, Richard. > The hash function is still weak but w/o a testcase I don't think > it's worth slowing it down further. > > Thanks, > Richard. > > 2019-01-30 Richard Biener <rguenther@suse.de> > > PR rtl-optimization/89115 > * lra.c (lra_rtx_hash): Properly hash CONST_INT values. > > Index: gcc/lra.c > =================================================================== > --- gcc/lra.c (revision 268383) > +++ gcc/lra.c (working copy) > @@ -1719,10 +1719,12 @@ lra_rtx_hash (rtx x) > > case SCRATCH: > case CONST_DOUBLE: > - case CONST_INT: > case CONST_VECTOR: > return val; > > + case CONST_INT: > + return val + UINTVAL (x); > + > default: > break; > }
Index: gcc/lra.c =================================================================== --- gcc/lra.c (revision 268383) +++ gcc/lra.c (working copy) @@ -1719,10 +1719,12 @@ lra_rtx_hash (rtx x) case SCRATCH: case CONST_DOUBLE: - case CONST_INT: case CONST_VECTOR: return val; + case CONST_INT: + return val + UINTVAL (x); + default: break; }