[gcc] 4.8.2-7

Jakub Jelinek jakub at fedoraproject.org
Thu Dec 12 18:22:31 UTC 2013


commit 1bc0509b8f166c7b81272eac791ecb8e6e51fddd
Author: Jakub Jelinek <jakub at redhat.com>
Date:   Thu Dec 12 19:22:29 2013 +0100

    4.8.2-7

 .gitignore                 |    1 +
 gcc.spec                   |   16 +++++--
 gcc48-pr58956-revert.patch |   33 ---------------
 gcc48-pr58956.patch        |   99 ++++++++++++++++++++++++++++++++++++++++++++
 sources                    |    2 +-
 5 files changed, 112 insertions(+), 39 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index f5a6c4f..bbda15a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -88,3 +88,4 @@
 /gcc-4.8.2-20131017.tar.bz2
 /gcc-4.8.2-20131111.tar.bz2
 /gcc-4.8.2-20131209.tar.bz2
+/gcc-4.8.2-20131212.tar.bz2
diff --git a/gcc.spec b/gcc.spec
index eb4fa12..e5494f2 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,9 +1,9 @@
-%global DATE 20131209
-%global SVNREV 205813
+%global DATE 20131212
+%global SVNREV 205936
 %global gcc_version 4.8.2
 # Note, gcc_release must be integer, if you want to add suffixes to
 # %{release}, append them after %{gcc_release} on Release: line.
-%global gcc_release 6
+%global gcc_release 7
 %global _unpackaged_files_terminate_build 0
 %global multilib_64_archs sparc64 ppc64 s390x x86_64
 %ifarch %{ix86} x86_64 ia64 ppc ppc64 alpha
@@ -196,7 +196,7 @@ Patch12: gcc48-no-add-needed.patch
 Patch13: gcc48-pr56564.patch
 Patch14: gcc48-pr56493.patch
 Patch15: gcc48-color-auto.patch
-Patch16: gcc48-pr58956-revert.patch
+Patch16: gcc48-pr58956.patch
 
 Patch1000: fastjar-0.97-segfault.patch
 Patch1001: fastjar-0.97-len1.patch
@@ -756,7 +756,7 @@ package or when debugging this package.
 %if 0%{?fedora} >= 20 || 0%{?rhel} >= 7
 %patch15 -p0 -b .color-auto~
 %endif
-%patch16 -p0 -b .pr58956-revert~
+%patch16 -p0 -b .pr58956~
 
 %if 0%{?_enable_debug_packages}
 cat > split-debuginfo.sh <<\EOF
@@ -3023,6 +3023,12 @@ fi
 %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin
 
 %changelog
+* Thu Dec 12 2013 Jakub Jelinek <jakub at redhat.com> 4.8.2-7
+- update from the 4.8 branch
+  - PRs libgomp/59467, rtl-optimization/58295, target/56807,
+	testsuite/59442
+  - fix LRA coalescing for real (PR middle-end/59470)
+
 * Wed Dec 11 2013 Jakub Jelinek <jakub at redhat.com> 4.8.2-6
 - temporarily revert PR middle-end/58956 to avoid libstdc++
   miscompilation on i?86 (PR middle-end/59470)
diff --git a/gcc48-pr58956.patch b/gcc48-pr58956.patch
new file mode 100644
index 0000000..0a4e4ea
--- /dev/null
+++ b/gcc48-pr58956.patch
@@ -0,0 +1,99 @@
+2013-12-12  Jakub Jelinek  <jakub at redhat.com>
+
+	PR middle-end/58956
+	PR middle-end/59470
+	* tree-ssa-ter.c (find_ssa_name): New helper function.
+	(find_replaceable_in_bb): For calls, only set same_root_var
+	if USE is used somewhere in gimple_call_lhs, for GIMPLE_ASM,
+	only set same_root_var if USE is used somewhere in output operand
+	trees.
+
+	* gcc.target/i386/pr59470.c: New test.
+
+--- gcc/tree-ssa-ter.c.jj	2013-12-10 08:52:13.000000000 +0100
++++ gcc/tree-ssa-ter.c	2013-12-12 10:43:26.177866960 +0100
+@@ -554,6 +554,20 @@ mark_replaceable (temp_expr_table_p tab,
+ }
+ 
+ 
++/* Helper function for find_replaceable_in_bb.  Called via walk_tree to
++   find a SSA_NAME DATA somewhere in *TP.  */
++
++static tree
++find_ssa_name (tree *tp, int *walk_subtrees, void *data)
++{
++  tree var = (tree) data;
++  if (*tp == var)
++    return var;
++  else if (IS_TYPE_OR_DECL_P (*tp))
++    *walk_subtrees = 0;
++  return NULL_TREE;
++}
++
+ /* This function processes basic block BB, and looks for variables which can
+    be replaced by their expressions.  Results are stored in the table TAB.  */
+ 
+@@ -618,7 +632,42 @@ find_replaceable_in_bb (temp_expr_table_
+ 		      && gimple_assign_single_p (def_stmt)
+ 		      && stmt_may_clobber_ref_p (stmt,
+ 						 gimple_assign_rhs1 (def_stmt)))
+-		    same_root_var = true;
++		    {
++		      if (is_gimple_call (stmt))
++			{
++			  /* For calls, it is not a problem if USE is among
++			     call's arguments or say OBJ_TYPE_REF argument,
++			     all those necessarily need to be evaluated before
++			     the call that may clobber the memory.  But if
++			     LHS of the call refers to USE, expansion might
++			     evaluate it after the call, prevent TER in that
++			     case.  */
++			  if (gimple_call_lhs (stmt)
++			      && TREE_CODE (gimple_call_lhs (stmt)) != SSA_NAME
++			      && walk_tree (gimple_call_lhs_ptr (stmt),
++					    find_ssa_name, use, NULL))
++			    same_root_var = true;
++			}
++		      else if (gimple_code (stmt) == GIMPLE_ASM)
++			{
++			  /* For inline asm, allow TER of loads into input
++			     arguments, but disallow TER for USEs that occur
++			     somewhere in outputs.  */
++			  unsigned int i;
++			  for (i = 0; i < gimple_asm_noutputs (stmt); i++)
++			    if (TREE_CODE (gimple_asm_output_op (stmt, i))
++				!= SSA_NAME
++				&& walk_tree (gimple_asm_output_op_ptr (stmt,
++									i),
++					      find_ssa_name, use, NULL))
++			      {
++				same_root_var = true;
++				break;
++			      }
++			}
++		      else
++			same_root_var = true;
++		    }
+ 		}
+ 
+ 	      /* Mark expression as replaceable unless stmt is volatile, or the
+--- gcc/testsuite/gcc.target/i386/pr59470.c.jj	2013-12-12 10:31:54.746517544 +0100
++++ gcc/testsuite/gcc.target/i386/pr59470.c	2013-12-12 10:32:42.045273313 +0100
+@@ -0,0 +1,17 @@
++/* PR middle-end/58956 */
++/* PR middle-end/59470 */
++/* { dg-do run } */
++/* { dg-options "-O2" } */
++
++int a, b, d[1024];
++
++int
++main ()
++{
++  int c = a;
++  asm ("{movl $6, (%2); movl $1, %0|mov dword ptr [%2], 6; mov %0, 1}"
++       : "=r" (d[c]) : "rm" (b), "r" (&a) : "memory");
++  if (d[0] != 1 || d[6] != 0)
++    __builtin_abort ();
++  return 0;
++}
diff --git a/sources b/sources
index 5176832..c5ab59c 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
 be78a47bd82523250eb3e91646db5b3d  cloog-0.18.0.tar.gz
 2659f09c2e43ef8b7d4406321753f1b2  fastjar-0.97.tar.gz
-b612421ddf9869af0cd14c1844b078b1  gcc-4.8.2-20131209.tar.bz2
+06f880ae1aa11c375f44e419a7671573  gcc-4.8.2-20131212.tar.bz2
 bce1586384d8635a76d2f017fb067cd2  isl-0.11.1.tar.bz2


More information about the scm-commits mailing list