mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-19 03:40:26 +08:00
global.c (compute_regsets): Set frame_pointer_needed here.
2008-06-30 Joey Ye <joey.ye@intel.com> H.J. Lu <hongjiu.lu@intel.com> * global.c (compute_regsets): Set frame_pointer_needed here. * reload1.c (init_elim_table): Don't set frame_pointer_needed here. Co-Authored-By: H.J. Lu <hongjiu.lu@intel.com> From-SVN: r137275
This commit is contained in:
parent
aad416fbb5
commit
38aa4d08b7
@ -1,3 +1,11 @@
|
||||
2008-06-30 Joey Ye <joey.ye@intel.com>
|
||||
H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* global.c (compute_regsets): Set frame_pointer_needed here.
|
||||
|
||||
* reload1.c (init_elim_table): Don't set frame_pointer_needed
|
||||
here.
|
||||
|
||||
2008-06-30 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
|
||||
|
||||
* doc/install.texi (specific): Expand Windows build notes.
|
||||
|
12
gcc/global.c
12
gcc/global.c
@ -206,7 +206,9 @@ static void build_insn_chain (void);
|
||||
|
||||
This will normally be called with ELIM_SET as the file static
|
||||
variable eliminable_regset, and NO_GLOBAL_SET as the file static
|
||||
variable NO_GLOBAL_ALLOC_REGS. */
|
||||
variable NO_GLOBAL_ALLOC_REGS.
|
||||
|
||||
It also initializes global flag frame_pointer_needed. */
|
||||
|
||||
static void
|
||||
compute_regsets (HARD_REG_SET *elim_set,
|
||||
@ -222,11 +224,19 @@ compute_regsets (HARD_REG_SET *elim_set,
|
||||
static const struct {const int from, to; } eliminables[] = ELIMINABLE_REGS;
|
||||
size_t i;
|
||||
#endif
|
||||
|
||||
/* FIXME: If EXIT_IGNORE_STACK is set, we will not save and restore
|
||||
sp for alloca. So we can't eliminate the frame pointer in that
|
||||
case. At some point, we should improve this by emitting the
|
||||
sp-adjusting insns for this case. */
|
||||
int need_fp
|
||||
= (! flag_omit_frame_pointer
|
||||
|| (cfun->calls_alloca && EXIT_IGNORE_STACK)
|
||||
|| crtl->accesses_prior_frames
|
||||
|| FRAME_POINTER_REQUIRED);
|
||||
|
||||
frame_pointer_needed = need_fp;
|
||||
|
||||
max_regno = max_reg_num ();
|
||||
compact_blocks ();
|
||||
|
||||
|
@ -3695,7 +3695,9 @@ elimination_target_reg_p (rtx x)
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Initialize the table of registers to eliminate. */
|
||||
/* Initialize the table of registers to eliminate.
|
||||
Pre-condition: global flag frame_pointer_needed has been set before
|
||||
calling this function. */
|
||||
|
||||
static void
|
||||
init_elim_table (void)
|
||||
@ -3708,19 +3710,6 @@ init_elim_table (void)
|
||||
if (!reg_eliminate)
|
||||
reg_eliminate = XCNEWVEC (struct elim_table, NUM_ELIMINABLE_REGS);
|
||||
|
||||
/* Does this function require a frame pointer? */
|
||||
|
||||
frame_pointer_needed = (! flag_omit_frame_pointer
|
||||
/* ?? If EXIT_IGNORE_STACK is set, we will not save
|
||||
and restore sp for alloca. So we can't eliminate
|
||||
the frame pointer in that case. At some point,
|
||||
we should improve this by emitting the
|
||||
sp-adjusting insns for this case. */
|
||||
|| (cfun->calls_alloca
|
||||
&& EXIT_IGNORE_STACK)
|
||||
|| crtl->accesses_prior_frames
|
||||
|| FRAME_POINTER_REQUIRED);
|
||||
|
||||
num_eliminable = 0;
|
||||
|
||||
#ifdef ELIMINABLE_REGS
|
||||
|
Loading…
x
Reference in New Issue
Block a user