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  <rguent...@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;
      }

Reply via email to