From: Richard Kenner Date: Fri, 30 Oct 1992 02:55:53 +0000 (-0500) Subject: (life_analysis): Mark FP live at end of function. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fe0f9c4bfb3209c6cfd18c690535147bc92739da;p=gcc.git (life_analysis): Mark FP live at end of function. From-SVN: r2655 --- diff --git a/gcc/flow.c b/gcc/flow.c index c2f94c96b32..66f0d65d19c 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -861,6 +861,20 @@ life_analysis (f, nregs) |= (REGSET_ELT_TYPE) 1 << (STACK_POINTER_REGNUM % REGSET_ELT_BITS); } + /* Mark the frame pointer is needed at the end of the function. If + we end up eliminating it, it will be removed from the live list + of each basic block by reload. */ + + if (n_basic_blocks > 0) + { + basic_block_live_at_end[n_basic_blocks - 1] + [FRAME_POINTER_REGNUM / REGSET_ELT_BITS] + |= (REGSET_ELT_TYPE) 1 << (FRAME_POINTER_REGNUM % REGSET_ELT_BITS); + basic_block_new_live_at_end[n_basic_blocks - 1] + [FRAME_POINTER_REGNUM / REGSET_ELT_BITS] + |= (REGSET_ELT_TYPE) 1 << (FRAME_POINTER_REGNUM % REGSET_ELT_BITS); + } + /* Mark all global registers as being live at the end of the function since they may be referenced by our caller. */