[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/gcc/devel gcc4-pr23478-2.patch, NONE, 1.1 .cvsignore, 1.108, 1.109 gcc4.spec, 1.71, 1.72 sources, 1.110, 1.111 gcc4-pr16104-test.patch, 1.1, NONE gcc4-pr23484.patch, 1.1, NONE gcc4-pr23560-test.patch, 1.1, NONE gcc4-pr23561.patch, 1.1, NONE



Author: jakub

Update of /cvs/dist/rpms/gcc/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv4201

Modified Files:
	.cvsignore gcc4.spec sources 
Added Files:
	gcc4-pr23478-2.patch 
Removed Files:
	gcc4-pr16104-test.patch gcc4-pr23484.patch 
	gcc4-pr23560-test.patch gcc4-pr23561.patch 
Log Message:
4.0.1-2


gcc4-pr23478-2.patch:
 global.c      |   13 +++++++++----
 local-alloc.c |   13 ++++++++++++-
 2 files changed, 21 insertions(+), 5 deletions(-)

--- NEW FILE gcc4-pr23478-2.patch ---
2005-08-31  Jakub Jelinek  <jakub redhat com>

	PR rtl-optimization/23478
	* local-alloc.c (struct qty): Add n_throwing_calls_crossed field.
	(alloc_qty): Initialize it.
	(update_equiv_regs): Clear REG_N_THROWING_CALLS_CROSSED.
	(combine_regs): Combine also n_throwing_calls_crossed fields.
	(find_free_reg): Don't attempt to caller-save pseudos crossing
	calls that might throw.
	* global.c (struct allocno): Add throwing_calls_crossed field.
	(global_alloc): Revert 2005-08-22 change.  Initialize
	throwing_calls_crossed.
	(find_reg): Don't attempt to caller-save pseudos crossing calls that
	might throw.

--- gcc/local-alloc.c.jj	2005-07-07 13:04:10.000000000 +0200
+++ gcc/local-alloc.c	2005-08-31 08:38:06.000000000 +0200
@@ -123,6 +123,11 @@ struct qty
 
   int n_calls_crossed;
 
+  /* Number of times a reg tied to given qty lives across a CALL_INSN
+     that might throw.  */
+
+  int n_throwing_calls_crossed;
+
   /* The register number of one pseudo register whose reg_qty value is Q.
      This register should be the head of the chain
      maintained in reg_next_in_qty.  */
@@ -324,6 +329,7 @@ alloc_qty (int regno, enum machine_mode 
   qty[qtyno].mode = mode;
   qty[qtyno].birth = birth;
   qty[qtyno].n_calls_crossed = REG_N_CALLS_CROSSED (regno);
+  qty[qtyno].n_throwing_calls_crossed = REG_N_THROWING_CALLS_CROSSED (regno);
   qty[qtyno].min_class = reg_preferred_class (regno);
   qty[qtyno].alternate_class = reg_alternate_class (regno);
   qty[qtyno].n_refs = REG_N_REFS (regno);
@@ -1170,6 +1176,7 @@ update_equiv_regs (void)
 
 		      REG_BASIC_BLOCK (regno) = bb->index;
 		      REG_N_CALLS_CROSSED (regno) = 0;
+		      REG_N_THROWING_CALLS_CROSSED (regno) = 0;
 		      REG_LIVE_LENGTH (regno) = 2;
 
 		      if (insn == BB_HEAD (bb))
@@ -2011,6 +2018,8 @@ combine_regs (rtx usedreg, rtx setreg, i
 
       /* Update info about quantity SQTY.  */
       qty[sqty].n_calls_crossed += REG_N_CALLS_CROSSED (sreg);
+      qty[sqty].n_throwing_calls_crossed
+	+= REG_N_THROWING_CALLS_CROSSED (sreg);
       qty[sqty].n_refs += REG_N_REFS (sreg);
       qty[sqty].freq += REG_FREQ (sreg);
       if (usize < ssize)
@@ -2315,12 +2324,14 @@ find_free_reg (enum reg_class class, enu
 
   /* We need not check to see if the current function has nonlocal
      labels because we don't put any pseudos that are live over calls in
-     registers in that case.  */
+     registers in that case.  Avoid putting pseudos crossing calls that
+     might throw into call used registers.  */
 
   if (! accept_call_clobbered
       && flag_caller_saves
       && ! just_try_suggested
       && qty[qtyno].n_calls_crossed != 0
+      && qty[qtyno].n_throwing_calls_crossed == 0
       && CALLER_SAVE_PROFITABLE (qty[qtyno].n_refs,
 				 qty[qtyno].n_calls_crossed))
     {
--- gcc/global.c.jj	2005-08-27 10:12:45.000000000 +0200
+++ gcc/global.c	2005-08-31 08:32:48.000000000 +0200
@@ -97,6 +97,9 @@ struct allocno
   /* Number of calls crossed by each allocno.  */
   int calls_crossed;
 
+  /* Number of calls that might throw crossed by each allocno.  */
+  int throwing_calls_crossed;
+
   /* Number of refs to each allocno.  */
   int n_refs;
 
@@ -465,9 +468,7 @@ global_alloc (FILE *file)
 	/* Don't allocate pseudos that cross calls,
 	   if this function receives a nonlocal goto.  */
 	&& (! current_function_has_nonlocal_label
-	    || REG_N_CALLS_CROSSED (i) == 0)
-	/* Don't allocate pseudos that cross calls that may throw.  */
-	&& REG_N_THROWING_CALLS_CROSSED (i) == 0)
+	    || REG_N_CALLS_CROSSED (i) == 0))
       {
 	if (reg_renumber[i] < 0
 	    && reg_may_share[i] && reg_allocno[reg_may_share[i]] >= 0)
@@ -488,6 +489,8 @@ global_alloc (FILE *file)
 	allocno[num].reg = i;
 	allocno[num].size = PSEUDO_REGNO_SIZE (i);
 	allocno[num].calls_crossed += REG_N_CALLS_CROSSED (i);
+	allocno[num].throwing_calls_crossed
+	  += REG_N_THROWING_CALLS_CROSSED (i);
 	allocno[num].n_refs += REG_N_REFS (i);
 	allocno[num].freq += REG_FREQ (i);
 	if (allocno[num].live_length < REG_LIVE_LENGTH (i))
@@ -1207,9 +1210,11 @@ find_reg (int num, HARD_REG_SET losers, 
     {
       /* Did not find a register.  If it would be profitable to
 	 allocate a call-clobbered register and save and restore it
-	 around calls, do that.  */
+	 around calls, do that.  Don't do this if it crosses any calls
+	 that might throw.  */
       if (! accept_call_clobbered
 	  && allocno[num].calls_crossed != 0
+	  && allocno[num].throwing_calls_crossed == 0
 	  && CALLER_SAVE_PROFITABLE (allocno[num].n_refs,
 				     allocno[num].calls_crossed))
 	{


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/.cvsignore,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -r1.108 -r1.109
--- .cvsignore	26 Aug 2005 23:29:45 -0000	1.108
+++ .cvsignore	31 Aug 2005 16:45:29 -0000	1.109
@@ -1 +1 @@
-gcc-4.0.1-20050826.tar.bz2
+gcc-4.0.1-20050831.tar.bz2


Index: gcc4.spec
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc4.spec,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- gcc4.spec	26 Aug 2005 23:29:45 -0000	1.71
+++ gcc4.spec	31 Aug 2005 16:45:29 -0000	1.72
@@ -1,6 +1,6 @@
-%define DATE 20050826
+%define DATE 20050831
 %define gcc_version 4.0.1
-%define gcc_release 11
+%define gcc_release 12
 %define _unpackaged_files_terminate_build 0
 %define multilib_64_archs sparc64 ppc64 s390x x86_64
 %ifarch %{ix86} alpha ia64 x86_64 s390 sparc sparc64
@@ -86,33 +86,30 @@
 Patch4: gcc4-gnuc-rh-release.patch
 Patch5: gcc4-java-nomulti.patch
 Patch6: gcc4-g++-struct-layout.patch
-Patch7: gcc4-pr16104-test.patch
-Patch8: gcc4-libstdc++-mt-alloc.patch
-Patch9: gcc4-struct-layout.patch
-Patch10: gcc4-ppc32-hwint32.patch
-Patch11: gcc4-pr17965.patch
-Patch12: gcc4-vsb-stack.patch
-Patch13: gcc4-libltdl-multilib.patch
-Patch14: gcc4-java-rh163099.patch
-Patch15: gcc4-libstdc++-pr22309.patch
-Patch16: gcc4-libjava-ia64-backtrace.patch
-Patch17: gcc4-stack-protector.patch
-Patch18: gcc4-ia64-stack-protector.patch
-Patch19: gcc4-pr22052.patch
-Patch20: gcc4-libffi-x86.patch
-Patch21: gcc4-ppc32-msecure-plt.patch
-Patch22: gcc4-pr17828-test.patch
-Patch23: gcc4-dwarf2-usefbreg.patch
-Patch24: gcc4-dwarf2-prefer-1elt-vartracking.patch
-Patch25: gcc4-dwarf2-pr20268.patch
-Patch26: gcc4-dwarf2-inline-details.patch
-Patch27: gcc4-dv.patch
-Patch28: gcc4-dwarf2-frame_base.patch
-Patch29: gcc4-pr23478.patch
-Patch30: gcc4-pr23484.patch
-Patch31: gcc4-def-builtin.patch
-Patch32: gcc4-pr23560-test.patch
-Patch33: gcc4-pr23561.patch
+Patch7: gcc4-libstdc++-mt-alloc.patch
+Patch8: gcc4-struct-layout.patch
+Patch9: gcc4-ppc32-hwint32.patch
+Patch10: gcc4-pr17965.patch
+Patch11: gcc4-vsb-stack.patch
+Patch12: gcc4-libltdl-multilib.patch
+Patch13: gcc4-java-rh163099.patch
+Patch14: gcc4-libstdc++-pr22309.patch
+Patch15: gcc4-libjava-ia64-backtrace.patch
+Patch16: gcc4-stack-protector.patch
+Patch17: gcc4-ia64-stack-protector.patch
+Patch18: gcc4-pr22052.patch
+Patch19: gcc4-libffi-x86.patch
+Patch20: gcc4-ppc32-msecure-plt.patch
+Patch21: gcc4-pr17828-test.patch
+Patch22: gcc4-dwarf2-usefbreg.patch
+Patch23: gcc4-dwarf2-prefer-1elt-vartracking.patch
+Patch24: gcc4-dwarf2-pr20268.patch
+Patch25: gcc4-dwarf2-inline-details.patch
+Patch26: gcc4-dv.patch
+Patch27: gcc4-dwarf2-frame_base.patch
+Patch28: gcc4-pr23478.patch
+Patch29: gcc4-pr23478-2.patch
+Patch30: gcc4-def-builtin.patch
 
 %define _gnu %{nil}
 %ifarch sparc
@@ -428,33 +425,30 @@
 %patch4 -p0 -b .gnuc-rh-release~
 %patch5 -p0 -b .java-nomulti~
 %patch6 -p0 -b .g++-struct-layout~
-%patch7 -p0 -b .pr16104-test~
-%patch8 -p0 -b .libstdc++-mt-alloc~
-%patch9 -p0 -b .struct-layout~
-#%patch10 -p0 -b .ppc32-hwint32~
-%patch11 -p0 -b .pr17965~
-%patch12 -p0 -b .vsb-stack~
-%patch13 -p0 -b .libltdl-multilib~
-%patch14 -p0 -b .java-rh163099~
-%patch15 -p0 -b .libstdc++-pr22309~
-%patch16 -p0 -b .libjava-ia64-backtrace~
-%patch17 -p0 -b .stack-protector~
-%patch18 -p0 -b .ia64-stack-protector~
-%patch19 -p0 -b .pr22052~
-%patch20 -p0 -b .libffi-x86~
-%patch21 -p0 -b .ppc32-msecure-plt~
-%patch22 -p0 -b .pr17828-test~
-%patch23 -p0 -b .dwarf2-usefbreg~
-%patch24 -p0 -b .dwarf2-prefer-1elt-vartracking~
-%patch25 -p0 -b .dwarf2-pr20268~
-%patch26 -p0 -b .dwarf2-inline-details~
-%patch27 -p0 -b .dv~
-%patch28 -p0 -b .dwarf2-frame_base~
-#%patch29 -p0 -b .pr23478~
-%patch30 -p0 -b .pr23484~
-%patch31 -p0 -b .def-builtin~
-%patch32 -p0 -b .pr23560-test~
-%patch33 -p0 -b .pr23561~
+%patch7 -p0 -b .libstdc++-mt-alloc~
+%patch8 -p0 -b .struct-layout~
+#%patch9 -p0 -b .ppc32-hwint32~
+%patch10 -p0 -b .pr17965~
+%patch11 -p0 -b .vsb-stack~
+%patch12 -p0 -b .libltdl-multilib~
+%patch13 -p0 -b .java-rh163099~
+%patch14 -p0 -b .libstdc++-pr22309~
+%patch15 -p0 -b .libjava-ia64-backtrace~
+%patch16 -p0 -b .stack-protector~
+%patch17 -p0 -b .ia64-stack-protector~
+%patch18 -p0 -b .pr22052~
+%patch19 -p0 -b .libffi-x86~
+%patch20 -p0 -b .ppc32-msecure-plt~
+%patch21 -p0 -b .pr17828-test~
+%patch22 -p0 -b .dwarf2-usefbreg~
+%patch23 -p0 -b .dwarf2-prefer-1elt-vartracking~
+%patch24 -p0 -b .dwarf2-pr20268~
+%patch25 -p0 -b .dwarf2-inline-details~
+%patch26 -p0 -b .dv~
+%patch27 -p0 -b .dwarf2-frame_base~
+%patch28 -p0 -b .pr23478~
+%patch29 -p0 -b .pr23478-2~
+%patch30 -p0 -b .def-builtin~
 
 perl -pi -e 's/4\.0\.2/4.0.1/' gcc/version.c
 perl -pi -e 's/"%{gcc_version}"/"%{gcc_version} \(release\)"/' gcc/version.c
@@ -1492,17 +1486,27 @@
 %endif
 
 %changelog
+* Wed Aug 31 2005 Jakub Jelinek  <jakub redhat com> 4.0.1-12
+- update from CVS
+  - PRs ada/23593, bootstrap/21268, c++/13377, c++/23099, c++/23586,
+	c++/23639, fortran/20592, libfortran/23598, libgcj/23508,
+	libstdc++/23081, preprocessor/20348, preprocessor/20356,
+	rtl-optimization/15248, target/23539, target/23575, target/23630,
+	testsuite/23607
+- avoid call used regs for pseudos that live across calls that may throw
+  (#166237, PR rtl-optimization/23478)
+
 * Sat Aug 27 2005 Jakub Jelinek  <jakub redhat com> 4.0.1-11
 - update from CVS
   - PRs c++/19004, c++/20817, c++/22454, c++/23044, c++/23491,
 	fortran/20363, libgcj/21020, libstdc++/23465, libstdc++/23550,
 	middle-end/23517, target/20799, target/21571, target/23070,
 	target/23404, tree-optimization/23426, tree-optimization/23546
+  - fix stringbuf in_avail() (Benjamin Kosnik, #159408, IT#72781,
+    PR libstdc++/21955)
 - fix strength reduction (Richard Henderson, #166353, PR rtl-opt/23560)
 - allow string and memory builtins to overflow from one structure field
   into another one (#166707, PR rtl-optimization/23561)
-- fix stringbuf in_avail() (Benjamin Kosnik, #159408, IT#72781,
-  PR libstdc++/21955)
 
 * Mon Aug 22 2005 Jakub Jelinek  <jakub redhat com> 4.0.1-10
 - update from CVS


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/sources,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -r1.110 -r1.111
--- sources	26 Aug 2005 23:29:45 -0000	1.110
+++ sources	31 Aug 2005 16:45:29 -0000	1.111
@@ -1 +1 @@
-37ccdf9901101d0cd1662f178db2d806  gcc-4.0.1-20050826.tar.bz2
+cb433a71c9ff194b0337ce24244f071b  gcc-4.0.1-20050831.tar.bz2


--- gcc4-pr16104-test.patch DELETED ---


--- gcc4-pr23484.patch DELETED ---


--- gcc4-pr23560-test.patch DELETED ---


--- gcc4-pr23561.patch DELETED ---


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]