* sh.h (BRANCH_COST): Define.
authorJ"orn Rennecke <amylaar@cygnus.co.uk>
Fri, 21 May 1999 12:14:10 +0000 (12:14 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Fri, 21 May 1999 12:14:10 +0000 (13:14 +0100)
From-SVN: r27081

gcc/ChangeLog
gcc/config/sh/sh.h

index c938cfc77078888778a97b4e0aa0bb6613fb136c..73652792ccca42124581d9d19030d73b4cc8ef97 100644 (file)
@@ -1,3 +1,7 @@
+Fri May 21 20:09:52 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+       * sh.h (BRANCH_COST): Define.
+
 Thu May 20 10:00:42 1999   Stephen L Moshier  <moshier@world.std.com>
 
        * Makefile.in (GCC_FOR_TARGET): Add -I$(build_tooldir)/include.
index 2f2a000b89da8c5e20d262c2d9c29009fce82299..c4994afad1c1fec483b1c78f8cd94e64fbfaa136 100644 (file)
@@ -1701,8 +1701,15 @@ extern struct rtx_def *sh_builtin_saveregs ();
    : 2)
 
 /* ??? Perhaps make MEMORY_MOVE_COST depend on compiler option?  This
-   would be so that people would slow memory systems could generate
+   would be so that people with slow memory systems could generate
    different code that does fewer memory accesses.  */
+
+/* A C expression for the cost of a branch instruction.  A value of 1
+   is the default; other values are interpreted relative to that.
+   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
+   in  not sufficient to keep both pipelines filled.  */
+#define BRANCH_COST (! TARGET_SH2 || TARGET_HARD_SH4 ? 2 : 1)
 \f
 /* Assembler output control.  */