This commit is contained in:
Jakub Jelinek 2014-09-22 13:02:00 +02:00
parent 22888b3c67
commit 927fb5cb0e
5 changed files with 63 additions and 50 deletions

1
.gitignore vendored
View File

@ -22,3 +22,4 @@
/gcc-4.9.1-20140813.tar.bz2
/gcc-4.9.1-20140815.tar.bz2
/gcc-4.9.1-20140912.tar.bz2
/gcc-4.9.1-20140922.tar.bz2

View File

@ -1,9 +1,9 @@
%global DATE 20140912
%global SVNREV 215204
%global DATE 20140922
%global SVNREV 215456
%global gcc_version 4.9.1
# 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 9
%global gcc_release 10
%global _unpackaged_files_terminate_build 0
%global _performance_build 1
%global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64
@ -200,7 +200,7 @@ Patch15: gcc49-color-auto.patch
Patch16: gcc49-libgo-p224.patch
Patch17: gcc49-aarch64-async-unw-tables.patch
Patch18: gcc49-aarch64-unwind-opt.patch
Patch19: gcc49-pr62662.patch
Patch19: gcc49-pr63285.patch
Patch1100: cloog-%{cloog_version}-ppc64le-config.patch
@ -729,7 +729,7 @@ package or when debugging this package.
rm -f libgo/go/crypto/elliptic/p224{,_test}.go
%patch17 -p0 -b .aarch64-async-unw-tables~
%patch18 -p0 -b .aarch64-unwind-opt~
%patch19 -p0 -b .pr62662~
%patch19 -p0 -b .pr63285~
%if 0%{?_enable_debug_packages}
cat > split-debuginfo.sh <<\EOF
@ -2802,6 +2802,12 @@ fi
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin
%changelog
* Mon Sep 22 2014 Jakub Jelinek <jakub@redhat.com> 4.9.1-10
- update from the 4.9 branch
- PRs c++/62017, c++/63241, c++/63248, debug/63284, debug/63328, ipa/61654,
target/61853, testsuite/63292
- fix scheduler -fcompare-debug issue (#1140872, PR debug/63285)
* Fri Sep 12 2014 Jakub Jelinek <jakub@redhat.com> 4.9.1-9
- update from the 4.9 branch
- PRs c++/58624, c++/61214, c++/61659, c++/62129, c++/62224, c++/62659,

View File

@ -1,44 +0,0 @@
2014-09-10 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
PR target/62662
* config/s390/s390.c (s390_emit_epilogue): When doing the return
address load optimization force s390_optimize_prologue to leave it
that way. Only do the optimization if we already decided to push
r14 into a stack slot.
--- gcc/config/s390/s390.c
+++ gcc/config/s390/s390.c
@@ -9082,11 +9082,14 @@ s390_emit_epilogue (bool sibcall)
if (! sibcall)
{
/* Fetch return address from stack before load multiple,
- this will do good for scheduling. */
-
- if (cfun_frame_layout.save_return_addr_p
- || (cfun_frame_layout.first_restore_gpr < BASE_REGNUM
- && cfun_frame_layout.last_restore_gpr > RETURN_REGNUM))
+ this will do good for scheduling.
+
+ Only do this if we already decided that r14 needs to be
+ saved to a stack slot. (And not just because r14 happens to
+ be in between two GPRs which need saving.) Otherwise it
+ would be difficult to take that decision back in
+ s390_optimize_prologue. */
+ if (cfun_gpr_save_slot (RETURN_REGNUM) == -1)
{
int return_regnum = find_unused_clobbered_reg();
if (!return_regnum)
@@ -9101,6 +9104,13 @@ s390_emit_epilogue (bool sibcall)
addr = gen_rtx_MEM (Pmode, addr);
set_mem_alias_set (addr, get_frame_alias_set ());
emit_move_insn (return_reg, addr);
+
+ /* Once we did that optimization we have to make sure
+ s390_optimize_prologue does not try to remove the
+ store of r14 since we will not be able to find the
+ load issued here. */
+ cfun_frame_layout.save_return_addr_p = true;
+ cfun_gpr_save_slot (RETURN_REGNUM) = -1;
}
}

50
gcc49-pr63285.patch Normal file
View File

@ -0,0 +1,50 @@
2014-09-18 Vladimir Makarov <vmakarov@redhat.com>
PR debug/63285
* haifa-sched.c (schedule_block): Advance cycle at the end of BB
if advance != 0.
* gcc.target/i386/pr63285.c: New test.
--- gcc/haifa-sched.c (revision 215363)
+++ gcc/haifa-sched.c (revision 215364)
@@ -6473,7 +6473,7 @@ schedule_block (basic_block *target_bb,
if (ls.modulo_epilogue)
success = true;
end_schedule:
- if (!ls.first_cycle_insn_p)
+ if (!ls.first_cycle_insn_p || advance)
advance_one_cycle ();
perform_replacements_new_cycle ();
if (modulo_ii > 0)
--- gcc/testsuite/gcc.target/i386/pr63285.c (revision 0)
+++ gcc/testsuite/gcc.target/i386/pr63285.c (revision 215364)
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fcompare-debug" } */
+
+struct S { int a; };
+struct T { int b, c; } a;
+long b;
+int c, d;
+void bar (int, int);
+void baz (void *, int);
+
+void
+foo (struct S *x, int y, int z, void *f, int *p, struct T *e)
+{
+ while (x)
+ {
+ baz (f, &d > p);
+ if (z & 1)
+ bar (f > (void *) &f, z);
+ }
+ if (c)
+ {
+ asm ("" : "+m" (a) : "i" (0));
+ y--;
+ }
+ if (e->b == e->c)
+ c = y;
+ y--;
+}

View File

@ -1,3 +1,3 @@
e34fca0540d840e5d0f6427e98c92252 cloog-0.18.1.tar.gz
c7ea3e348924af6932bc3cfb32e2ea54 gcc-4.9.1-20140912.tar.bz2
2293d26b82a5fef7f8beff816ee424c8 gcc-4.9.1-20140922.tar.bz2
e039bfcfb6c2ab039b8ee69bf883e824 isl-0.12.2.tar.bz2