rhill       14/06/16 02:05:43

  Modified:             README.history
  Added:                93_all_4.9.0_pr60155.patch
  Log:
  Add patch for bug #512586.

Revision  Changes    Path
1.2                  src/patchsets/gcc/4.8.3/gentoo/README.history

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/README.history?rev=1.2&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/README.history?rev=1.2&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/README.history?r1=1.1&r2=1.2

Index: README.history
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/gcc/4.8.3/gentoo/README.history,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- README.history      22 May 2014 21:06:27 -0000      1.1
+++ README.history      16 Jun 2014 02:05:43 -0000      1.2
@@ -1,4 +1,7 @@
-1.0            (pending)
+1.1            15 Jun 2014
+       + 93_all_4.9.0_pr60155.patch
+
+1.0            01 Jun 2014
        + 09_all_default-ssp.patch
        + 10_all_default-fortify-source.patch
        + 11_all_default-warn-format-security.patch



1.1                  src/patchsets/gcc/4.8.3/gentoo/93_all_4.9.0_pr60155.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/93_all_4.9.0_pr60155.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/93_all_4.9.0_pr60155.patch?rev=1.1&content-type=text/plain

Index: 93_all_4.9.0_pr60155.patch
===================================================================
[ICE/4.8] building net-misc/openssh-6.6_p1 hits get_pressure_class_and_nregs at 
gcse.c:3438 on alpha
https://bugs.gentoo.org/show_bug.cgi?id=512586
https://gcc.gnu.org/PR60155


commit 97f436b3eac628b0ec06d01ea5b8e6426b51e0f4
Author: danglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Fri Apr 4 22:25:51 2014 +0000

        PR rtl-optimization/60155
        * gcse.c (record_set_data): New function.
        (single_set_gcse): New function.
        (gcse_emit_move_after): Use single_set_gcse instead of single_set.
        (hoist_code): Likewise.
        (get_pressure_class_and_nregs): Likewise.
    
    
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209134 
138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog |  9 ++++++++
 gcc/gcse.c    | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++------
 2 files changed, 73 insertions(+), 7 deletions(-)

--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -2502,6 +2502,65 @@ pre_insert_copies (void)
       }
 }
 
+struct set_data
+{
+  rtx insn;
+  const_rtx set;
+  int nsets;
+};
+
+/* Increment number of sets and record set in DATA.  */
+
+static void
+record_set_data (rtx dest, const_rtx set, void *data)
+{
+  struct set_data *s = (struct set_data *)data;
+
+  if (GET_CODE (set) == SET)
+    {
+      /* We allow insns having multiple sets, where all but one are
+        dead as single set insns.  In the common case only a single
+        set is present, so we want to avoid checking for REG_UNUSED
+        notes unless necessary.  */
+      if (s->nsets == 1
+         && find_reg_note (s->insn, REG_UNUSED, SET_DEST (s->set))
+         && !side_effects_p (s->set))
+       s->nsets = 0;
+
+      if (!s->nsets)
+       {
+         /* Record this set.  */
+         s->nsets += 1;
+         s->set = set;
+       }
+      else if (!find_reg_note (s->insn, REG_UNUSED, dest)
+              || side_effects_p (set))
+       s->nsets += 1;
+    }
+}
+
+static const_rtx
+single_set_gcse (rtx insn)
+{
+  struct set_data s;
+  rtx pattern;
+  
+  gcc_assert (INSN_P (insn));
+
+  /* Optimize common case.  */
+  pattern = PATTERN (insn);
+  if (GET_CODE (pattern) == SET)
+    return pattern;
+
+  s.insn = insn;
+  s.nsets = 0;
+  note_stores (pattern, record_set_data, &s);
+
+  /* Considered invariant insns have exactly one set.  */
+  gcc_assert (s.nsets == 1);
+  return s.set;
+}
+
 /* Emit move from SRC to DEST noting the equivalence with expression computed
    in INSN.  */
 
@@ -2509,7 +2568,8 @@ static rtx
 gcse_emit_move_after (rtx dest, rtx src, rtx insn)
 {
   rtx new_rtx;
-  rtx set = single_set (insn), set2;
+  const_rtx set = single_set_gcse (insn);
+  rtx set2;
   rtx note;
   rtx eqv = NULL_RTX;
 
@@ -3369,13 +3429,12 @@ hoist_code (void)
              FOR_EACH_VEC_ELT (occrs_to_hoist, j, occr)
                {
                  rtx insn;
-                 rtx set;
+                 const_rtx set;
 
                  gcc_assert (!occr->deleted_p);
 
                  insn = occr->insn;
-                 set = single_set (insn);
-                 gcc_assert (set);
+                 set = single_set_gcse (insn);
 
                  /* Create a pseudo-reg to store the result of reaching
                     expressions into.  Get the mode for the new pseudo
@@ -3456,10 +3515,8 @@ get_pressure_class_and_nregs (rtx insn, int *nregs)
 {
   rtx reg;
   enum reg_class pressure_class;
-  rtx set = single_set (insn);
+  const_rtx set = single_set_gcse (insn);
 
-  /* Considered invariant insns have only one set.  */
-  gcc_assert (set != NULL_RTX);
   reg = SET_DEST (set);
   if (GET_CODE (reg) == SUBREG)
     reg = SUBREG_REG (reg);




Reply via email to