diff options
author | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-02-22 14:11:58 +0000 |
---|---|---|
committer | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-02-22 14:11:58 +0000 |
commit | e91c8aa9c2ee11182b4ba12bd74b961fddc261df (patch) | |
tree | cf2aec9a50f27da3426d83aa75ac8d37004224c7 /gcc | |
parent | 592411905cdc9b00dc719204da4762305772719d (diff) | |
download | gcc-e91c8aa9c2ee11182b4ba12bd74b961fddc261df.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25378 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/loop.c | 3 | ||||
-rw-r--r-- | gcc/rtl.h | 3 | ||||
-rw-r--r-- | gcc/rtlanal.c | 10 |
4 files changed, 17 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 321077fb4cb..ab0a16bfa9f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/loop.c b/gcc/loop.c index 962736f9f6a..cd77cddee5c 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -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; { diff --git a/gcc/rtl.h b/gcc/rtl.h index f036a6fe917..2839c883502 100644 --- 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 diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 41744d747a2..1dabc369c18 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -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; |