public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, GCC 4.9 branch] Fix compile time regression caused by fix to PR64111
@ 2015-10-26 17:37 Caroline Tice
  0 siblings, 0 replies; 3+ messages in thread
From: Caroline Tice @ 2015-10-26 17:37 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 1292 bytes --]

Here is my promised backport to the GCC 4.9 branch, for the patch below
that went into ToT last week.  As with the previous patch, I've
verified that it fixes the problem, bootstraps and has no new
regression test failures.  Is this ok to commit to the gcc-4_9-branch?

-- Caroline Tice
cmtice@google.com


On Fri, Oct 23, 2015 at 3:22 PM, Caroline Tice <cmtice@google.com> wrote:
> This patch fixes a compile-time regression that was originally
> introduced by the fix
> for PR64111, in GCC 4.9.3.    One of our user's encountered this problem with a
> particular file, where the compile time (on arm) went from 20 seconds
> to 150 seconds.
>
> The fix in this patch was suggested by Richard Biener, who wrote the
> original fix for
> PR64111.  I have verified that this patch fixes the compile time
> regression; I have bootstrapped
> the compiler with this patch; and I have run the regression testsuite
> (no regressions).
> Is this ok to commit to ToT?   (I am also working on backports for
> gcc-5_branch and gcc-4_9-branch).
>
> -- Caroline Tice
> cmtice@google.com
>
 gcc/ChangeLog:

 2015-10-26  Caroline Tice  <cmtice@google.com>

        (from Richard Biener)
         * tree.c (int_cst_hash_hash):  Replace XORs with more efficient
         calls to iterative_hash_host_wide_int.

[-- Attachment #2: gcc-fsf-4_9.patch --]
[-- Type: application/octet-stream, Size: 589 bytes --]

Index: gcc/tree.c
===================================================================
--- gcc/tree.c	(revision 229383)
+++ gcc/tree.c	(working copy)
@@ -1119,8 +1119,10 @@
 {
   const_tree const t = (const_tree) x;
 
-  return (TREE_INT_CST_HIGH (t) ^ TREE_INT_CST_LOW (t)
-	  ^ TYPE_UID (TREE_TYPE (t)));
+  hashval_t hash = TYPE_UID (TREE_TYPE (t));
+  hash = iterative_hash_host_wide_int (TREE_INT_CST_HIGH (t), hash);
+  hash = iterative_hash_host_wide_int (TREE_INT_CST_LOW (t), hash);
+  return hash;
 }
 
 /* Return nonzero if the value represented by *X (an INTEGER_CST tree node)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH, GCC 4.9 branch] Fix compile time regression caused by fix to PR64111
  2015-10-27  5:00 Caroline Tice
@ 2015-10-27 11:53 ` Richard Biener
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Biener @ 2015-10-27 11:53 UTC (permalink / raw)
  To: Caroline Tice; +Cc: GCC Patches

On Tue, Oct 27, 2015 at 4:36 AM, Caroline Tice <cmtice@google.com> wrote:
> Here is my promised backport to the GCC 4.9 branch, for the patch below
> that went into ToT last week.  As with the previous patch, I've
> verified that it fixes the problem, bootstraps and has no new
> regression test failures.  Is this ok to commit to the gcc-4_9-branch?

Ok.

Thanks,
Richard.

> -- Caroline Tice
> cmtice@google.com
>
> gcc/ChangeLog:
>
>  2015-10-26  Caroline Tice  <cmtice@google.com>
>
>         (from Richard Biener)
>          * tree.c (int_cst_hash_hash):  Replace XORs with more efficient
>          calls to iterative_hash_host_wide_int.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH, GCC 4.9 branch] Fix compile time regression caused by fix to PR64111
@ 2015-10-27  5:00 Caroline Tice
  2015-10-27 11:53 ` Richard Biener
  0 siblings, 1 reply; 3+ messages in thread
From: Caroline Tice @ 2015-10-27  5:00 UTC (permalink / raw)
  To: GCC Patches; +Cc: Caroline Tice

[-- Attachment #1: Type: text/plain, Size: 522 bytes --]

Here is my promised backport to the GCC 4.9 branch, for the patch below
that went into ToT last week.  As with the previous patch, I've
verified that it fixes the problem, bootstraps and has no new
regression test failures.  Is this ok to commit to the gcc-4_9-branch?

-- Caroline Tice
cmtice@google.com

gcc/ChangeLog:

 2015-10-26  Caroline Tice  <cmtice@google.com>

        (from Richard Biener)
         * tree.c (int_cst_hash_hash):  Replace XORs with more efficient
         calls to iterative_hash_host_wide_int.

[-- Attachment #2: gcc-fsf-4_9.patch --]
[-- Type: application/octet-stream, Size: 589 bytes --]

Index: gcc/tree.c
===================================================================
--- gcc/tree.c	(revision 229383)
+++ gcc/tree.c	(working copy)
@@ -1119,8 +1119,10 @@
 {
   const_tree const t = (const_tree) x;
 
-  return (TREE_INT_CST_HIGH (t) ^ TREE_INT_CST_LOW (t)
-	  ^ TYPE_UID (TREE_TYPE (t)));
+  hashval_t hash = TYPE_UID (TREE_TYPE (t));
+  hash = iterative_hash_host_wide_int (TREE_INT_CST_HIGH (t), hash);
+  hash = iterative_hash_host_wide_int (TREE_INT_CST_LOW (t), hash);
+  return hash;
 }
 
 /* Return nonzero if the value represented by *X (an INTEGER_CST tree node)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-27 11:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-26 17:37 [PATCH, GCC 4.9 branch] Fix compile time regression caused by fix to PR64111 Caroline Tice
2015-10-27  5:00 Caroline Tice
2015-10-27 11:53 ` Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).