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]

Re: [PATCH] PR middle-end/18293: Fast-path expand_mult for 2^N


Mike Stump <mrs@apple.com> writes:

> I was thinking about doing something radical like saving every -E
> during compilation, and doing a move if changed on them all to produce
> the .o files in much the same spirit as one of the existing stamp
> idioms.
> 
> I'd expect the benefit would be better compile times for all port
> maintainers, and the improvement would be large.

An interesting idea, and dead easy to implement 80% of it.  Try
replacing the .c.o rule in gcc/Makefile.in with this.  This is
untested, and I think it should only be enabled with some configure
switch.

Ian

.c.o:
	$(CC) -E $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< -o $@.i.new
	@if cmp $@.i $@.i.new >/dev/null 2>/dev/null; then \
	  echo Not rebuilding $@; \
	  touch $@; \
	else \
	  mv -f $@.i.new $@.i; \
	  echo $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< -o $@; \
	  $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< -o $@; \
	fi


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