Commit e10c79fe by Lars Brinkhoff Committed by Richard Henderson

emit-rtl.c (gen_rtx_REG): After reload...

        * emit-rtl.c (gen_rtx_REG): After reload, only return
        frame_pointer_rtx or hard_frame_pointer_rtx if frame_pointer_needed.

Co-Authored-By: Richard Henderson <rth@redhat.com>

From-SVN: r56133
parent c93a26f5
2002-08-08 Lars Brinkhoff <lars@nocrew.org>
Richard Henderson <rth@redhat.com>
* emit-rtl.c (gen_rtx_REG): After reload, only return
frame_pointer_rtx or hard_frame_pointer_rtx if frame_pointer_needed.
2002-08-08 Jakub Jelinek <jakub@redhat.com>
* config/rs6000/rs6000-protos.h (rs6000_field_alignment): Remove.
......
......@@ -514,10 +514,12 @@ gen_rtx_REG (mode, regno)
if (mode == Pmode && !reload_in_progress)
{
if (regno == FRAME_POINTER_REGNUM)
if (regno == FRAME_POINTER_REGNUM
&& (!reload_completed || frame_pointer_needed))
return frame_pointer_rtx;
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
if (regno == HARD_FRAME_POINTER_REGNUM)
if (regno == HARD_FRAME_POINTER_REGNUM
&& (!reload_completed || frame_pointer_needed))
return hard_frame_pointer_rtx;
#endif
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM && HARD_FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
......@@ -542,7 +544,11 @@ gen_rtx_REG (mode, regno)
This code is disabled for now until we can fix the various backends
which depend on having non-shared hard registers in some cases. Long
term we want to re-enable this code as it can significantly cut down
on the amount of useless RTL that gets generated. */
on the amount of useless RTL that gets generated.
We'll also need to fix some code that runs after reload that wants to
set ORIGINAL_REGNO. */
if (cfun
&& cfun->emit
&& regno_reg_rtx
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment