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: [PATCH] Fix PR middle-end/16266 slowness in find_temp_slot_from_address



On Oct 9, 2004, at 12:47 AM, Andrew Pinski wrote:



On Oct 9, 2004, at 12:23 AM, Andrew Pinski wrote:


I decided to look into this PR after I saw it did not effect PPC
and x86.  The reason why it does not effect them as much is because
they both accept addresses for 16bit offsets unlike SH.
This patch fixes a typo in temp_slots_at_level which we create
and an extra temp slot level for each temporary variable which
is where the slowness comes from.  The main reason why this
started to happen when the tree-ssa merge happened is because
we don't push/pop stack slots as much as before.  This code which
caused the problem was introduced

ChangeLog:

	* function.c (temp_slots_at_level): Fix typo which creates too
	many temp stack slots levels.

Scratch this patch, it is wrong, I need to test a little further.

This the actually patch which I had tested and bootstrapped and not the one I had posted originally. This still fixes the problem.

I also looked into to see if it improved the compile time of PR8361
and it did (not by much though).  It should also improve compile time
almost any where (not by much though).

OK?

Thanks,
Andrew Pinski

ChangeLog:
	* function.c (temp_slots_at_level): Correct off by one error which
	caused extra temp stack slot levels to be created and it caused
	level 0 not to be used.

Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.581
diff -u -p -r1.581 function.c
--- function.c	8 Oct 2004 19:59:25 -0000	1.581
+++ function.c	9 Oct 2004 04:59:54 -0000
@@ -533,7 +533,6 @@ insert_slot_to_list (struct temp_slot *t
 static struct temp_slot **
 temp_slots_at_level (int level)
 {
-  level++;

   if (!used_temp_slots)
     VARRAY_GENERIC_PTR_INIT (used_temp_slots, 3, "used_temp_slots");


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