This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[bfin] Fix MAX_LOOP_LENGTH for bfin port hardware loop optimization
- From: "Jie Zhang" <jzhang918 at gmail dot com>
- To: "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 17 Jun 2006 22:56:08 +0800
- Subject: [bfin] Fix MAX_LOOP_LENGTH for bfin port hardware loop optimization
4096 is too large for MAX_LOOP_LENGTH in bfin port. The max length of
Blackfin hardware loop using LSETUP instruction is 2042. So this patch
fixes it by define MAX_LOOP_LENGTH to be 2042.
Is it OK?
Jie
* config/bfin/bfin.c (MAX_LOOP_LENGTH): Define to be 2042 instead
of 4096.
Index: config/bfin/bfin.c
===================================================================
RCS file: /cvsroot/gcc3/gcc-4.1/gcc/config/bfin/bfin.c,v
retrieving revision 1.26
diff -u -r1.26 bfin.c
--- config/bfin/bfin.c 16 Jun 2006 02:07:11 -0000 1.26
+++ config/bfin/bfin.c 17 Jun 2006 14:38:27 -0000
@@ -2831,7 +2831,7 @@
#define MAX_LOOP_DEPTH 2
/* Maxium size of a loop. */
-#define MAX_LOOP_LENGTH 4096
+#define MAX_LOOP_LENGTH 2042
/* We need to keep a vector of loops */
typedef struct loop_info *loop_info;