diff options
author | Oleg Endo <olegendo@gcc.gnu.org> | 2014-05-16 22:21:52 +0000 |
---|---|---|
committer | Oleg Endo <olegendo@gcc.gnu.org> | 2014-05-16 22:21:52 +0000 |
commit | d580af0f7a9ba7eaf20d448986cc0da4d27e80ef (patch) | |
tree | 356b3f5931e667d371ae1bdba8fc070f8d4e8e3e | |
parent | 6c7571a29aa419fd99e6d17ca3609697659db22b (diff) | |
download | gcc-d580af0f7a9ba7eaf20d448986cc0da4d27e80ef.zip gcc-d580af0f7a9ba7eaf20d448986cc0da4d27e80ef.tar.gz gcc-d580af0f7a9ba7eaf20d448986cc0da4d27e80ef.tar.bz2 |
sh.c (sh_option_override): Set branch cost to 2 for all target variants.
gcc/
* config/sh/sh.c (sh_option_override): Set branch cost to 2 for all
target variants.
From-SVN: r210534
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/sh/sh.c | 11 |
2 files changed, 11 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8fb676e..dcc0f8f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-05-16 Oleg Endo <olegendo@gcc.gnu.org> + + * config/sh/sh.c (sh_option_override): Set branch cost to 2 for all + target variants. + 2014-05-16 David Malcolm <dmalcolm@redhat.com> Revert: diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 31ea83d..d52e8c1 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -929,15 +929,16 @@ sh_option_override (void) sh_divsi3_libfunc = "__sdivsi3_1"; else sh_divsi3_libfunc = "__sdivsi3"; + if (sh_branch_cost == -1) { - sh_branch_cost = 1; - /* The SH1 does not have delay slots, hence we get a pipeline stall at every branch. The SH4 is superscalar, so the single delay slot - is not sufficient to keep both pipelines filled. */ - if (! TARGET_SH2 || TARGET_HARD_SH4) - sh_branch_cost = 2; + is not sufficient to keep both pipelines filled. + In any case, set the default branch cost to '2', as it results in + slightly overall smaller code and also enables some if conversions + that are required for matching special T bit related insns. */ + sh_branch_cost = 2; } /* Set -mzdcbranch for SH4 / SH4A if not otherwise specified by the user. */ |