diff options
author | Joern Rennecke <amylaar@gcc.gnu.org> | 1997-04-01 15:13:57 +0100 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 1997-04-01 15:13:57 +0100 |
commit | a62de84f08d0316a68786961e88b3fde647fb153 (patch) | |
tree | 9997609cfd2c54a6c49b25207a7f54e70b15820e | |
parent | 86144b75fef3ae7025d389ea751422cbca1285d5 (diff) | |
download | gcc-a62de84f08d0316a68786961e88b3fde647fb153.zip gcc-a62de84f08d0316a68786961e88b3fde647fb153.tar.gz gcc-a62de84f08d0316a68786961e88b3fde647fb153.tar.bz2 |
(ADJUST_COSTS): Define.
From-SVN: r13825
-rw-r--r-- | gcc/config/sh/sh.h | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index 763048b..e88fa08 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -1730,7 +1730,36 @@ extern int pragma_interrupt; clear if this would give better code. If implemented, should check for compatibility problems. */ -/* ??? Define ADJUST_COSTS? */ +/* A C statement (sans semicolon) to update the integer variable COST + based on the relationship between INSN that is dependent on + DEP_INSN through the dependence LINK. The default is to make no + adjustment to COST. This can be used for example to specify to + the scheduler that an output- or anti-dependence does not incur + the same cost as a data-dependence. */ + +/* ??? Should anticipate the effect of delayed branch scheduling + and arrange for a second instruction to be put between the + load of the function's address and the call. */ + +#define ADJUST_COST(insn,link,dep_insn,cost) \ + if (GET_CODE(insn) == CALL_INSN) \ + { \ + /* The only input for a call that is timing-critical is the \ + function's address. */ \ + rtx call = PATTERN (insn); \ + \ + if (GET_CODE (call) == PARALLEL) \ + call = XVECEXP (call, 0 ,0); \ + if (GET_CODE (call) == SET) \ + call = SET_SRC (call); \ + if (GET_CODE (call) == CALL && GET_CODE (XEXP (call, 0)) == MEM) \ + { \ + rtx set = single_set (dep_insn); \ + \ + if (set && ! rtx_equal_p (SET_DEST (set), XEXP (XEXP (call, 0), 0)))\ + (cost) = 0; \ + } \ + } /* Since the SH architecture lacks negative address offsets, the givs should be sorted smallest to largest so combine_givs |