This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: reload: fix for gcc.c-torture/execute/990127-1.c -O0 on SH
- To: Jeffrey A Law <law at cygnus dot com>
- Subject: Re: reload: fix for gcc.c-torture/execute/990127-1.c -O0 on SH
- From: Richard Henderson <rth at cygnus dot com>
- Date: Mon, 21 Aug 2000 17:46:02 -0700
- Cc: Alexandre Oliva <aoliva at redhat dot com>, gcc-patches at gcc dot gnu dot org
- References: <20000821153037.C24004@cygnus.com> <8306.966903144@upchuck>
On Mon, Aug 21, 2000 at 06:12:24PM -0600, Jeffrey A Law wrote:
> How can we compute accurate death notes for the frame pointer before reload
> has completed? Any reference to a pseudo would need to make the FP live
> since the pseudo might not get a hard reg and would be loaded from the
> current frame.
Fixed thus. I checked that it fixes Alex's original problem as well.
r~
* flow.c (calculate_global_regs_live): Mark frame pointer live
everywhere before reload.
Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.327
diff -c -p -d -r1.327 flow.c
*** flow.c 2000/08/21 09:18:05 1.327
--- flow.c 2000/08/22 00:42:42
*************** calculate_global_regs_live (blocks_in, b
*** 3191,3196 ****
--- 3191,3202 ----
the case for blocks within infinite loops. */
SET_REGNO_REG_SET (new_live_at_end, STACK_POINTER_REGNUM);
+ /* Similarly for the frame pointer before reload. Any reference
+ to any pseudo before reload is a potential reference of the
+ frame pointer. */
+ if (! reload_completed)
+ SET_REGNO_REG_SET (new_live_at_end, FRAME_POINTER_REGNUM);
+
/* Regs used in phi nodes are not included in
global_live_at_start, since they are live only along a
particular edge. Set those regs that are live because of a