public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Caroline Tice <cmtice@google.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Caroline Tice <cmtice@google.com>,
	Richard Biener <rguenther@suse.de>,
		Luis Lozano <llozano@google.com>
Subject: [PATCH] Fix compile time regression caused by fix to PR64111
Date: Fri, 23 Oct 2015 22:29:00 -0000	[thread overview]
Message-ID: <CABtf2+RxvHchi=k9z9HPoaUFVY3Mx89rGgh8Sx2HLXMfQVqANQ@mail.gmail.com> (raw)

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

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-23  Caroline Tice  <cmtice@google.com>

        (from Richard Biener)
        * tree.c (int_cst_hasher::hash):  Replace XOR with more efficient
        call to iterative_hash_host_wide_int.

[-- Attachment #2: gcc-fsf.patch --]
[-- Type: text/x-patch, Size: 364 bytes --]

Index: gcc/tree.c
===================================================================
--- gcc/tree.c	(revision 229270)
+++ gcc/tree.c	(working copy)
@@ -1364,7 +1364,7 @@
   int i;
 
   for (i = 0; i < TREE_INT_CST_NUNITS (t); i++)
-    code ^= TREE_INT_CST_ELT (t, i);
+    code = iterative_hash_host_wide_int (TREE_INT_CST_ELT(t, i), code);
 
   return code;
 }

             reply	other threads:[~2015-10-23 22:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23 22:29 Caroline Tice [this message]
2015-10-23 22:54 ` Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABtf2+RxvHchi=k9z9HPoaUFVY3Mx89rGgh8Sx2HLXMfQVqANQ@mail.gmail.com' \
    --to=cmtice@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=llozano@google.com \
    --cc=rguenther@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).