From fe0f9c4bfb3209c6cfd18c690535147bc92739da Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Thu, 29 Oct 1992 21:55:53 -0500 Subject: [PATCH] (life_analysis): Mark FP live at end of function. From-SVN: r2655 --- gcc/flow.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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. */ -- 2.30.2