Added mechanism to make peephole optimizer version bigger (needed for SUN-3)

This commit is contained in:
ceriel 1989-10-18 11:39:19 +00:00
parent 95563ae3bc
commit 9c403e7299
3 changed files with 20 additions and 7 deletions

View file

@ -96,6 +96,10 @@ COBJ = main.o idf.o declarator.o decspecs.o struct.o \
GCSRC = char.c symbol2str.c next.c
GOBJ = char.o symbol2str.o next.o
# Extra object for generating peephole-optimizer-code-expander version.
# The Sun-3 version is faster when the text-size exceeds 180K! ARRGH
EXTRA_O =
STRSRC = code.str declar.str decspecs.str def.str expr.str field.str \
estack.str util.str \
idf.str macro.str stack.str stmt.str struct.str switch.str type.str \
@ -125,8 +129,7 @@ HFILES = $(HSRC) $(GHSRC) $(GHSTRSRC)
GENERATED = tokenfile.g Lpars.h LLfiles LL.output lint.out \
print hfiles Cfiles $(GHSRC) $(GSRC) longnames $(LCSRC)
# include files containing ALLOCDEF specifications
OBJ = $(COBJ) $(LOBJ) $(GOBJ)
OBJ = $(COBJ) $(LOBJ) $(GOBJ) $(EXTRA_O)
SRC = $(CSRC) $(LCSRC) $(GCSRC)
LINT = /usr/bin/lint
@ -151,7 +154,7 @@ Emain: Cfiles
Omain: Cfiles
rm -f *.o
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "MACH="$(MACH) "EMHOME="$(EMHOME) "COPTIONS="-DPEEPHOLE $(CURRDIR)omain ; else mach=$(MACH); export mach; EMHOME=$(EMHOME); export EMHOME; ./Resolve omain ; fi'
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "MACH="$(MACH) "EMHOME="$(EMHOME) "COPTIONS="-DPEEPHOLE "EXTRA_O="$(EXTRA_O) $(CURRDIR)omain ; else mach=$(MACH); export mach; EMHOME=$(EMHOME); export EMHOME; ./Resolve omain ; fi'
@rm -f nmclash.o a.out
CEmain: Cfiles

View file

@ -66,7 +66,12 @@ COBJ = LLlex.o LLmessage.o char.o error.o main.o \
code.o tmpvar.o lookup.o Version.o next.o
GENC= $(LSRC) symbol2str.c char.c Lpars.c casestat.c tmpvar.c scope.c next.c
SRC = $(CSRC) $(GENC)
OBJ = $(COBJ) $(LOBJ) Lpars.o
# Extra object for generating peephole-optimizer-code-expander version.
# The Sun-3 version is faster when the text-size exceeds 180K! ARRGH
EXTRA_O =
OBJ = $(COBJ) $(LOBJ) Lpars.o $(EXTRA_O)
GENH = errout.h \
idfsize.h numsize.h strsize.h target_sizes.h bigparam.h bigresult.h \
@ -88,7 +93,7 @@ all: Cfiles
Omain: Cfiles
rm -f *.o
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "MACH="$(MACH) "EMHOME="$(EMHOME) "COPTIONS="-DPEEPHOLE $(CURRDIR)omain ; else MACH=$(MACH); export MACH; EMHOME=$(EMHOME); export EMHOME; ./Resolve omain ; fi'
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "MACH="$(MACH) "EMHOME="$(EMHOME) "COPTIONS="-DPEEPHOLE "EXTRA_O="$(EXTRA_O) $(CURRDIR)omain ; else MACH=$(MACH); export MACH; EMHOME=$(EMHOME); export EMHOME; ./Resolve omain ; fi'
@rm -f nmclash.o a.out
CEmain: Cfiles

View file

@ -65,7 +65,12 @@ COBJ = LLlex.o LLmessage.o body.o casestat.o char.o chk_expr.o code.o\
cstoper.o def.o desig.o enter.o error.o idf.o input.o label.o\
lookup.o main.o misc.o next.o node.o options.o readwrite.o\
scope.o symbol2str.o tmpvar.o tokenname.o type.o typequiv.o progs.o
OBJ = Lpars.o $(COBJ) $(LOBJ)
# Extra object for generating peephole-optimizer-code-expander version.
# The Sun-3 version is faster when the text-size exceeds 180K! ARRGH
EXTRA_O =
OBJ = Lpars.o $(COBJ) $(LOBJ) $(EXTRA_O)
# Keep the next entries up to date!
GENCFILES= $(LSRC) Lpars.c symbol2str.c casestat.c tmpvar.c char.c next.c
@ -89,7 +94,7 @@ all: Cfiles
Omain: Cfiles
rm -f *.o
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "MACH="$(MACH) "EMHOME="$(EMHOME) "COPTIONS="-DPEEPHOLE $(CURRDIR)omain ; else MACH=$(MACH); export MACH; EMHOME=$(EMHOME); export EMHOME; ./Resolve omain ; fi'
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "MACH="$(MACH) "EMHOME="$(EMHOME) "COPTIONS="-DPEEPHOLE "EXTRA_O="$(EXTRA_O) $(CURRDIR)omain ; else MACH=$(MACH); export MACH; EMHOME=$(EMHOME); export EMHOME; ./Resolve omain ; fi'
@rm -f nmclash.o a.out
CEmain: Cfiles