aarch64.c (aarch64_frame_pointer_required): Check LR_REGNUM.

2013-12-03  Vladimir Makarov  <vmakarov@redhat.com>

	* config/aarch64/aarch64.c (aarch64_frame_pointer_required): Check
	LR_REGNUM.
	(aarch64_can_eliminate): Don't check elimination source when
	frame_pointer_required is false.

From-SVN: r205637
This commit is contained in:
Vladimir Makarov 2013-12-03 15:34:56 +00:00 committed by Vladimir Makarov
parent e8d8443d22
commit 77436791c9
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2013-12-03 Vladimir Makarov <vmakarov@redhat.com>
* config/aarch64/aarch64.c (aarch64_frame_pointer_required): Check
LR_REGNUM.
(aarch64_can_eliminate): Don't check elimination source when
frame_pointer_required is false.
2013-12-03 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> 2013-12-03 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* config/avr/avr.c (avr_option_override): Warn if asked to generate * config/avr/avr.c (avr_option_override): Warn if asked to generate

View File

@ -1703,7 +1703,7 @@ aarch64_frame_pointer_required (void)
if (flag_omit_frame_pointer && !faked_omit_frame_pointer) if (flag_omit_frame_pointer && !faked_omit_frame_pointer)
return false; return false;
else if (flag_omit_leaf_frame_pointer) else if (flag_omit_leaf_frame_pointer)
return !crtl->is_leaf; return !crtl->is_leaf || df_regs_ever_live_p (LR_REGNUM);
return true; return true;
} }
@ -4126,7 +4126,7 @@ aarch64_can_eliminate (const int from, const int to)
of faked_omit_frame_pointer here (which is true when we always of faked_omit_frame_pointer here (which is true when we always
wish to keep non-leaf frame pointers but only wish to keep leaf frame wish to keep non-leaf frame pointers but only wish to keep leaf frame
pointers when LR is clobbered). */ pointers when LR is clobbered). */
if (from == FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM if (to == STACK_POINTER_REGNUM
&& df_regs_ever_live_p (LR_REGNUM) && df_regs_ever_live_p (LR_REGNUM)
&& faked_omit_frame_pointer) && faked_omit_frame_pointer)
return false; return false;