regrename.c (regrename_optimize): Do not rename registers to leaf registers.
authorMark Mitchell <mark@codesourcery.com>
Mon, 14 May 2001 07:56:57 +0000 (07:56 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Mon, 14 May 2001 07:56:57 +0000 (07:56 +0000)
* regrename.c (regrename_optimize): Do not rename registers to
leaf registers.

From-SVN: r42066

gcc/ChangeLog
gcc/regrename.c

index b5937f0a0055edb549c18997d00ff58a0f5b52f8..2ab87036652ae2569535bd9e32c195719a910943 100644 (file)
@@ -1,3 +1,8 @@
+2001-05-14  Mark Mitchell  <mark@codesourcery.com>
+
+       * regrename.c (regrename_optimize): Do not rename registers to
+       leaf registers.
+
 2001-05-14  Alexandre Oliva  <aoliva@redhat.com>
 
        * rtl.texi (CALL_INSN_FUNCTION_USAGE): Note that (and when) it may
index ae25e2171fb89f96f3b8592a5c05c67e8c8a4a24..bad6624f59d07ab2e74142880b77e44dbbee87dd 100644 (file)
@@ -292,6 +292,12 @@ regrename_optimize ()
                    /* Can't use regs which aren't saved by the prologue.  */
                    || (! regs_ever_live[new_reg + i]
                        && ! call_used_regs[new_reg + i])
+#ifdef LEAF_REGISTERS
+                   /* We can't use a non-leaf register if we're in a 
+                      leaf function.  */
+                   || (current_function_is_leaf 
+                       && !LEAF_REGISTERS[new_reg + i])
+#endif
 #ifdef HARD_REGNO_RENAME_OK
                    || ! HARD_REGNO_RENAME_OK (reg + i, new_reg + i)
 #endif