diff options
author | Jeff Law <law@gcc.gnu.org> | 1995-12-31 13:48:17 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1995-12-31 13:48:17 -0700 |
commit | 7c4a1f088f2caac46f35e54ae06477c9a6f05c0e (patch) | |
tree | 0f2ad6d972f90d888298a61d802a2b1ba85cbdcf /gcc | |
parent | 5c7fe359b9a3c07937f88f1b8759163d42991d31 (diff) | |
download | gcc-7c4a1f088f2caac46f35e54ae06477c9a6f05c0e.zip gcc-7c4a1f088f2caac46f35e54ae06477c9a6f05c0e.tar.gz gcc-7c4a1f088f2caac46f35e54ae06477c9a6f05c0e.tar.bz2 |
sched.c (adjust_priority): Use ADJUST_PRIORITY if its defined.
* sched.c (adjust_priority): Use ADJUST_PRIORITY if its defined.
* pa.h (ADJUST_PRIORITY): Define to keep lifetimes of registers
that will be allocated to %r1 shorter.
From-SVN: r10918
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/pa/pa.h | 27 | ||||
-rw-r--r-- | gcc/sched.c | 3 |
2 files changed, 30 insertions, 0 deletions
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 8e1d89a..b455776 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -1719,6 +1719,33 @@ while (0) #define ADJUST_COST(INSN,LINK,DEP,COST) \ (COST) = pa_adjust_cost (INSN, LINK, DEP, COST) +/* Adjust scheduling priorities. We use this to try and keep addil + and the next use of %r1 close together. */ +#define ADJUST_PRIORITY(PREV) \ + { \ + rtx set = single_set (PREV); \ + rtx src, dest; \ + if (set) \ + { \ + src = SET_SRC (set); \ + dest = SET_DEST (set); \ + if (GET_CODE (src) == LO_SUM \ + && symbolic_operand (XEXP (src, 1), VOIDmode) \ + && ! read_only_operand (XEXP (src, 1), VOIDmode)) \ + INSN_PRIORITY (PREV) >>= 3; \ + else if (GET_CODE (src) == MEM \ + && GET_CODE (XEXP (src, 0)) == LO_SUM \ + && symbolic_operand (XEXP (XEXP (src, 0), 1), VOIDmode)\ + && ! read_only_operand (XEXP (XEXP (src, 0), 1), VOIDmode))\ + INSN_PRIORITY (PREV) >>= 1; \ + else if (GET_CODE (dest) == MEM \ + && GET_CODE (XEXP (dest, 0)) == LO_SUM \ + && symbolic_operand (XEXP (XEXP (dest, 0), 1), VOIDmode)\ + && ! read_only_operand (XEXP (XEXP (dest, 0), 1), VOIDmode))\ + INSN_PRIORITY (PREV) >>= 3; \ + } \ + } + /* Handling the special cases is going to get too complicated for a macro, just call `pa_adjust_insn_length' to do the real work. */ #define ADJUST_INSN_LENGTH(INSN, LENGTH) \ diff --git a/gcc/sched.c b/gcc/sched.c index 2be6f9d..150f68f 100644 --- a/gcc/sched.c +++ b/gcc/sched.c @@ -2563,6 +2563,9 @@ adjust_priority (prev) } break; } +#ifdef ADJUST_PRIORITY + ADJUST_PRIORITY (prev); +#endif } } |