This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [3.3 PATCH] Fix PR optimization/12510


> I find Jakub's patch convoluted so I wrote my own version for the branch.
> Bootstrapped/regtested on i586-redhat-linux-gnu (3.3 branch except Ada).

As requested by Mark, here's the straight backport of Jakub's patch
(including grammatical errors :-). It went through the same testing.


2003-10-08  Eric Botcazou  <ebotcazou@libertysurf.fr>

        PR optimization/12510
	Backport from mainline:

	2003-09-08  Jakub Jelinek  <jakub@redhat.com>

	* toplev.c (rest_of_compilation): Call split_all_insns before
	regstack if optimizing but not scheduling after reload.

2003-10-08  Volker Reichelt <reichelt@igpm.rwth-aachen.de>

        * gcc.dg/20031007-1.c: New test.


-- 
Eric Botcazou
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.690.2.22
diff -u -p -r1.690.2.22 toplev.c
--- toplev.c	17 Sep 2003 07:17:09 -0000	1.690.2.22
+++ toplev.c	8 Oct 2003 09:21:34 -0000
@@ -3462,6 +3462,23 @@ rest_of_compilation (decl)
 #endif
 
 #ifdef STACK_REGS
+#if defined (HAVE_ATTR_length)
+  /* If flow2 creates new instructions which need splitting
+     and scheduling after reload is not done, they might not be
+     splitten until final which doesn't allow splitting
+     if HAVE_ATTR_length.  */
+#ifdef INSN_SCHEDULING
+  if (optimize && !flag_schedule_insns_after_reload)
+#else
+  if (optimize)
+#endif
+    {
+      timevar_push (TV_SHORTEN_BRANCH);
+      split_all_insns (1);
+      timevar_pop (TV_SHORTEN_BRANCH);
+    }
+#endif
+
   timevar_push (TV_REG_STACK);
   open_dump_file (DFI_stack, decl);
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]