[PATCH] configuration support for rtl flag checking

Janis Johnson janis187@us.ibm.com
Mon May 6 16:28:00 GMT 2002


This patch adds configure support for RTL flag checking and documents
the new option.  It's not fully tested yet, but I'd like to get some
feedback about a couple of things.

  - RTL flag checking should be enabled by default when building from
    CVS and snapshots, but do we want to turn it on now or give people
    a chance to flush out unexpected flag usage first?

  - Should I submit the changes to rebuilt configure, or does someone
    else rebuild and commit it?

2002-05-06  Janis Johnson  <janis187@us.ibm.com>

	* config.in (ENABLE_RTL_FLAG_CHECKING): New.
	* configure.in (ac_flag_checking): New.
	* doc/install.texi (--enable-checking): Document RTL flag checking.

Index: config.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.in,v
retrieving revision 1.135
diff -u -p -r1.135 config.in
--- config.in	17 Apr 2002 01:37:41 -0000	1.135
+++ config.in	6 May 2002 23:13:21 -0000
@@ -287,6 +287,11 @@
    at runtime.  This is quite expensive. */
 #undef ENABLE_RTL_CHECKING
 
+/* Define if you want RTL flag accesses to be checked against the RTL
+   codes that are supported for each access macro.  This is relatively
+   cheap.  */
+#undef ENABLE_RTL_FLAG_CHECKING
+
 /* Define if you want the garbage collector to do object poisoning and
    other memory allocation checks.  This is quite expensive. */
 #undef ENABLE_GC_CHECKING
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.in,v
retrieving revision 1.586
diff -u -p -r1.586 configure.in
--- configure.in	1 May 2002 20:37:41 -0000	1.586
+++ configure.in	6 May 2002 23:19:34 -0000
@@ -187,15 +187,17 @@ AC_ARG_ENABLE(checking,
 [  --enable-checking[=LIST]
 			  enable expensive run-time checks.  With LIST,
 			  enable only specific categories of checks.
-			  Categories are: misc,tree,rtl,gc,gcac; default
-			  is misc,tree,gc],
+			  Categories are: misc,tree,rtl,flag,gc,gcac; default
+			  is misc,tree,gc,flag],
 [ac_checking=
 ac_tree_checking=
 ac_rtl_checking=
+ac_flag_checking=
 ac_gc_checking=
 ac_gc_always_collect=
 case "${enableval}" in
-yes)	ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;;
+yes)	ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
+	ac_flag_checking=1 ;;
 no)	;;
 *)	IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="$IFS,"
 	set fnord $enableval; shift
@@ -205,6 +207,7 @@ no)	;;
 		case $check in
 		misc)	ac_checking=1 ;;
 		tree)	ac_tree_checking=1 ;;
+		flag)	ac_flag_checking=1 ;;
 		rtl)	ac_rtl_checking=1 ;;
 		gc)	ac_gc_checking=1 ;;
 		gcac)	ac_gc_always_collect=1 ;;
@@ -215,7 +218,7 @@ no)	;;
 esac
 ], 
 # Enable some checks by default for development versions of GCC
-[ac_checking=1; ac_tree_checking=1; ac_gc_checking=1;])
+[ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_flag_checking=1;])
 if test x$ac_checking != x ; then
   AC_DEFINE(ENABLE_CHECKING, 1,
 [Define if you want more run-time sanity checks.  This one gets a grab
@@ -232,6 +235,12 @@ if test x$ac_rtl_checking != x ; then
 [Define if you want all operations on RTL (the basic data structure
    of the optimizer and back end) to be checked for dynamic type safety
    at runtime.  This is quite expensive.])
+fi
+if test x$ac_flag_checking != x ; then
+  AC_DEFINE(ENABLE_RTL_FLAG_CHECKING, 1,
+[Define if you want RTL flag accesses to be checked against the RTL
+   codes that are supported for each access macro.  This is relatively
+   cheap.])
 fi
 if test x$ac_gc_checking != x ; then
   AC_DEFINE(ENABLE_GC_CHECKING, 1,
Index: doc/install.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/install.texi,v
retrieving revision 1.113
diff -u -p -r1.113 install.texi
--- doc/install.texi	5 May 2002 11:38:49 -0000	1.113
+++ doc/install.texi	6 May 2002 23:14:48 -0000
@@ -782,8 +782,9 @@ compiler and may only work properly if y
 with GCC@.  This is on by default when building from CVS or snapshots,
 but off for releases.  More control over the checks may be had by
 specifying @var{list}; the categories of checks available are
-@samp{misc}, @samp{tree}, @samp{gc}, @samp{rtl} and @samp{gcac}.  The
-default when @var{list} is not specified is @samp{misc,tree,gc}; the
+@samp{misc}, @samp{tree}, @samp{gc}, @samp{rtl}, @samp{flag} and
+@samp{gcac}.  The
+default when @var{list} is not specified is @samp{misc,tree,gc,flag}; the
 checks @samp{rtl} and @samp{gcac} are very expensive.
 
 @item --enable-nls



More information about the Gcc-patches mailing list