This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Make generic_sched const in arm.md


While looking over insn-attrtab.c for ARM, I happened to notice that
the scheduling code makes useless calls to recog_memoized.  The
generic_sched variable only tests a global variable, but was not
marked as const.

The patch is obvious.  Tested by building the compiler and by
examining insn-attrtab.c.  OK to install?

Ian


2004-11-16  Ian Lance Taylor  <ian@wasabisystems.com>

	* arm.md (generic_sched): Make const.


Index: arm.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.md,v
retrieving revision 1.185
diff -u -r1.185 arm.md
--- arm.md	14 Oct 2004 07:37:10 -0000	1.185
+++ arm.md	17 Nov 2004 04:12:09 -0000
@@ -297,11 +297,11 @@
 ;; True if the generic scheduling description should be used.
 
 (define_attr "generic_sched" "yes,no"
-        (if_then_else 
-         (eq_attr "tune" "arm926ejs,arm1026ejs,arm1136js,arm1136jfs") 
-         (const_string "no")
-         (const_string "yes")))
-	
+  (const (if_then_else 
+          (eq_attr "tune" "arm926ejs,arm1026ejs,arm1136js,arm1136jfs") 
+          (const_string "no")
+          (const_string "yes"))))
+
 (include "arm-generic.md")
 (include "arm926ejs.md")
 (include "arm1026ejs.md")


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]