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> 2002-08-08 Jakub Jelinek <jakub@redhat.com>
* config/rs6000/rs6000-protos.h (rs6000_field_alignment): Remove. * config/rs6000/rs6000-protos.h (rs6000_field_alignment): Remove.
......
...@@ -514,10 +514,12 @@ gen_rtx_REG (mode, regno) ...@@ -514,10 +514,12 @@ gen_rtx_REG (mode, regno)
if (mode == Pmode && !reload_in_progress) 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; return frame_pointer_rtx;
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM #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; return hard_frame_pointer_rtx;
#endif #endif
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM && HARD_FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM #if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM && HARD_FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
...@@ -542,7 +544,11 @@ gen_rtx_REG (mode, regno) ...@@ -542,7 +544,11 @@ gen_rtx_REG (mode, regno)
This code is disabled for now until we can fix the various backends 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 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 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 if (cfun
&& cfun->emit && cfun->emit
&& regno_reg_rtx && 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