diff options
author | David S. Miller <davem@redhat.com> | 2002-04-18 16:37:15 -0700 |
---|---|---|
committer | David S. Miller <davem@gcc.gnu.org> | 2002-04-18 16:37:15 -0700 |
commit | 2f82dbf8658b933fdecbe751a9569ba48ef81e0c (patch) | |
tree | 23071e279b2357667533e94c091bddb3aaeb7795 /gcc | |
parent | 566576e718cd3b186d65e3c61f06d502a8a18391 (diff) | |
download | gcc-2f82dbf8658b933fdecbe751a9569ba48ef81e0c.zip gcc-2f82dbf8658b933fdecbe751a9569ba48ef81e0c.tar.gz gcc-2f82dbf8658b933fdecbe751a9569ba48ef81e0c.tar.bz2 |
sparc.h (BRANCH_COST): Define.
2002-04-18 David S. Miller <davem@redhat.com>
* config/sparc/sparc.h (BRANCH_COST): Define.
* fold-const.c (BRANCH_COST): Don't provide default here, expr.h
does it.
From-SVN: r52500
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.h | 17 | ||||
-rw-r--r-- | gcc/fold-const.c | 4 |
3 files changed, 24 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 742f308..e3eb77b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2002-04-18 David S. Miller <davem@redhat.com> + + * config/sparc/sparc.h (BRANCH_COST): Define. + + * fold-const.c (BRANCH_COST): Don't provide default here, expr.h + does it. + 2002-04-18 Hans-Peter Nilsson <hp@bitrange.com> * flow.c (update_life_info): Ignore return value of cleanup_cfg. diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index fd15297..4552132 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -2607,6 +2607,23 @@ do { \ || (CLASS1) == FPCC_REGS || (CLASS2) == FPCC_REGS) \ ? (sparc_cpu == PROCESSOR_ULTRASPARC ? 12 : 6) : 2) +/* Provide the cost of a branch. For pre-v9 processors we use + a value of 3 to take into account the potential annulling of + the delay slot (which ends up being a bubble in the pipeline slot) + plus a cycle to take into consideration the instruction cache + effects. + + On v9 and later, which have branch prediction facilities, we set + it to the depth of the pipeline as that is the cost of a + mispredicted branch. + + ??? Set to 9 when PROCESSOR_ULTRASPARC3 is added */ + +#define BRANCH_COST \ + ((sparc_cpu == PROCESSOR_V9 \ + || sparc_cpu == PROCESSOR_ULTRASPARC) \ + ? 7 : 3) + /* Provide the costs of a rtl expression. This is in the body of a switch on CODE. The purpose for the cost of MULT is to encourage `synth_mult' to find a synthetic multiply when reasonable. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index a1c33f9..9429a4d 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -106,10 +106,6 @@ static tree fold_binary_op_with_conditional_arg PARAMS ((enum tree_code, tree, tree, tree, int)); static bool fold_real_zero_addition_p PARAMS ((tree, tree, int)); -#ifndef BRANCH_COST -#define BRANCH_COST 1 -#endif - #if defined(HOST_EBCDIC) /* bit 8 is significant in EBCDIC */ #define CHARMASK 0xff |