loop.c (libcall_other_regs): Make extern.
authorAndrew MacLeod <amacleod@cygnus.com>
Mon, 22 Feb 1999 14:11:58 +0000 (14:11 +0000)
committerAndrew Macleod <amacleod@gcc.gnu.org>
Mon, 22 Feb 1999 14:11:58 +0000 (14:11 +0000)
* loop.c (libcall_other_regs): Make extern.
* rtl.h (find_last_value): Add parameter to prototype.
(libcall_other_reg): Add extern declaration.
* rtlanal.c (find_last_value): Add another parameter to allow
a definition using a hardware register to be found as well.

From-SVN: r25378

gcc/ChangeLog
gcc/loop.c
gcc/rtl.h
gcc/rtlanal.c

index 321077fb4cb324f55d89426f03fb62b4f6084d17..ab0a16bfa9f257223475fb8ad67ab4d6cde2b7ac 100644 (file)
@@ -1,3 +1,11 @@
+Mon Feb 22 16:54:18 EST 1999  Andrew MacLeod  <amacleod@cygnus.com>
+
+       * loop.c (libcall_other_regs): Make extern.
+       * rtl.h (find_last_value): Add parameter to prototype.
+       (libcall_other_reg): Add extern declaration.
+       * rtlanal.c (find_last_value): Add another parameter to allow
+       a definition using a hardware register to be found as well.
+
 Mon Feb 22 13:33:47 1999  Mark Mitchell  <mark@markmitchell.com>
 
        * cse.c (dump_class): New function.
index 962736f9f6a9efcd2df1435fbd704a933e80f41d..cd77cddee5c95ee0c6d9a04b8e6448ac34fc9a6e 100644 (file)
@@ -291,7 +291,6 @@ static void mark_loop_jump PROTO((rtx, int));
 static void prescan_loop PROTO((rtx, rtx));
 static int reg_in_basic_block_p PROTO((rtx, rtx));
 static int consec_sets_invariant_p PROTO((rtx, int, rtx));
-static rtx libcall_other_reg PROTO((rtx, rtx));
 static int labels_in_range_p PROTO((rtx, int));
 static void count_one_set PROTO((rtx, rtx, varray_type, rtx *));
 
@@ -1241,7 +1240,7 @@ record_excess_regs (in_this, not_in_this, output)
    If there are none, return 0.
    If there are one or more, return an EXPR_LIST containing all of them.  */
 
-static rtx
+rtx
 libcall_other_reg (insn, equiv)
      rtx insn, equiv;
 {
index f036a6fe9178f99c196be8edaf7c9ce8eeb72a8f..2839c88350295e9624295a595b71e268881a17b2 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1013,7 +1013,7 @@ extern int modified_in_p          PROTO((rtx, rtx));
 extern int reg_set_p                   PROTO((rtx, rtx));
 extern rtx single_set                  PROTO((rtx));
 extern int multiple_sets               PROTO((rtx));
-extern rtx find_last_value             PROTO((rtx, rtx *, rtx));
+extern rtx find_last_value             PROTO((rtx, rtx *, rtx, int));
 extern int refers_to_regno_p           PROTO((int, int, rtx, rtx *));
 extern int reg_overlap_mentioned_p     PROTO((rtx, rtx));
 extern void note_stores                        PROTO((rtx, void (*)()));
@@ -1390,6 +1390,7 @@ extern void print_inline_rtx              PROTO ((FILE *, rtx, int));
 
 /* In loop.c */
 extern void init_loop                  PROTO ((void));
+extern rtx libcall_other_reg           PROTO ((rtx, rtx));
 #ifdef BUFSIZ
 extern void loop_optimize              PROTO ((rtx, FILE *, int, int));
 #endif
index 41744d747a2a920312015329b41624f1b10a483f..1dabc369c189c10531705c70247ce28e521fc928 100644 (file)
@@ -740,13 +740,15 @@ multiple_sets (insn)
 /* Return the last thing that X was assigned from before *PINSN.  Verify that
    the object is not modified up to VALID_TO.  If it was, if we hit
    a partial assignment to X, or hit a CODE_LABEL first, return X.  If we
-   found an assignment, update *PINSN to point to it.  */
+   found an assignment, update *PINSN to point to it.  
+   ALLOW_HWREG is set to 1 if hardware registers are allowed to be the src.  */
 
 rtx
-find_last_value (x, pinsn, valid_to)
+find_last_value (x, pinsn, valid_to, allow_hwreg)
      rtx x;
      rtx *pinsn;
      rtx valid_to;
+     int allow_hwreg;
 {
   rtx p;
 
@@ -767,8 +769,8 @@ find_last_value (x, pinsn, valid_to)
            if (! modified_between_p (src, PREV_INSN (p), valid_to)
                /* Reject hard registers because we don't usually want
                   to use them; we'd rather use a pseudo.  */
-               && ! (GET_CODE (src) == REG
-                     && REGNO (src) < FIRST_PSEUDO_REGISTER))
+               && (! (GET_CODE (src) == REG
+                     && REGNO (src) < FIRST_PSEUDO_REGISTER) || allow_hwreg))
              {
                *pinsn = p;
                return src;