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]

generator programs don't need bitmap.c


I happened to notice this while looking into something else.  The only
reason bitmap.o is linked into the generator programs is, print-rtl.c
will print out bitmaps embedded in RTL.  But that never happens for
the RTL used by the generators (or there would be other references to
bitmap_* functions in gen*.c), and print-rtl.c is already #ifdefed up
to avoid having to drag other things into the generators, so we can
add one more #ifdef and not link bitmap.o in.

Bootstrapped i686-linux (C only).

zw

        * print-rtl.c (print_rtx <case 'b'>): Don't attempt to print
        bitmap contents if GENERATOR_FILE is defined.
        * Makefile.in (BUILD_RTL): Remove $(BUILD_PREFIX)bitmap.o.
        ($(BUILD_PREFIX_1)bitmap.o): Delete rule.

===================================================================
Index: print-rtl.c
--- print-rtl.c	21 Jul 2004 18:57:09 -0000	1.113
+++ print-rtl.c	23 Jul 2004 21:12:29 -0000
@@ -484,10 +484,14 @@ print_rtx (rtx in_rtx)
 	break;
 
       case 'b':
+#ifdef GENERATOR_FILE
+	fputs (" {bitmap}", outfile);
+#else
 	if (XBITMAP (in_rtx, i) == NULL)
 	  fputs (" {null}", outfile);
 	else
 	  bitmap_print (outfile, XBITMAP (in_rtx, i), " {", "}");
+#endif
 	sawclose = 0;
 	break;
 
===================================================================
Index: Makefile.in
--- Makefile.in	22 Jul 2004 20:12:11 -0000	1.1333
+++ Makefile.in	23 Jul 2004 21:12:29 -0000
@@ -773,7 +773,7 @@ LDEXP_LIB = @LDEXP_LIB@
 # even if we are cross-building GCC.
 BUILD_LIBS = $(BUILD_LIBIBERTY)
 
-BUILD_RTL = $(BUILD_PREFIX)rtl.o read-rtl.o $(BUILD_PREFIX)bitmap.o \
+BUILD_RTL = $(BUILD_PREFIX)rtl.o read-rtl.o \
 		$(BUILD_PREFIX)ggc-none.o min-insn-modes.o
 BUILD_SUPPORT = gensupport.o insn-conditions.o
 BUILD_EARLY_SUPPORT = gensupport.o dummy-conditions.o
@@ -2589,12 +2589,6 @@ print-rtl1.o: $(srcdir)/print-rtl.c $(BC
 	sed -e 's/config[.]h/bconfig.h/' $(srcdir)/print-rtl.c > print-rtl1.c
 	$(CC_FOR_BUILD) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(INCLUDES) print-rtl1.c $(OUTPUT_OPTION)
 
-$(BUILD_PREFIX_1)bitmap.o: $(srcdir)/bitmap.c $(BCONFIG_H) coretypes.h $(GTM_H) $(SYSTEM_H) \
-  $(RTL_H) $(FLAGS_H) $(BASIC_BLOCK_H) $(REGS_H) $(GGC_H)
-	rm -f $(BUILD_PREFIX)bitmap.c
-	sed -e 's/config[.]h/bconfig.h/' $(srcdir)/bitmap.c > $(BUILD_PREFIX)bitmap.c
-	$(CC_FOR_BUILD) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(INCLUDES) $(BUILD_PREFIX)bitmap.c $(OUTPUT_OPTION)
-
 $(BUILD_PREFIX_1)errors.o: errors.c $(BCONFIG_H) $(SYSTEM_H) errors.h
 	rm -f $(BUILD_PREFIX)errors.c
 	sed -e 's/config[.]h/bconfig.h/' $(srcdir)/errors.c > $(BUILD_PREFIX)errors.c


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