From: Vikram S. Adve Date: Thu, 8 Nov 2001 18:13:17 +0000 (+0000) Subject: Add cleaning pass after linking. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9af7022d5529ff091560ac369eb70dc14d7addd9;p=oota-llvm.git Add cleaning pass after linking. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1208 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Makefile.target b/test/Makefile.target index 703638d3026..7194cdbe206 100644 --- a/test/Makefile.target +++ b/test/Makefile.target @@ -50,7 +50,8 @@ ifdef PROG endif $(PROG).linked.bc: $(BCOBJS) - $(LLINK) -f $(BCOBJS) -o $@ + $(LLINK) -f $(BCOBJS) -o $(PROG).tmp.bc + $(LOPT) -cleangcc -raise -constprop -dce $(PROG).tmp.bc -o $@ $(PROG).native: $(OBJS:.o=.c) gcc $(OBJS:.o=.c) -O2 $(LOCAL_CFLAGS) -Wall -o $@ @@ -87,8 +88,9 @@ clean : %.bc: %.ll $(LAS) -f $< +## There is just one file so omit link step and just clean %.linked.bc: %.bc - $(CP) $< $@ + $(LOPT) -cleangcc -raise -constprop -dce $< -o $@ %.clean.bc: %.bc $(LOPT) -cleangcc -raise -constprop -dce $< -o $@ diff --git a/test/Makefile.tests b/test/Makefile.tests index 703638d3026..7194cdbe206 100644 --- a/test/Makefile.tests +++ b/test/Makefile.tests @@ -50,7 +50,8 @@ ifdef PROG endif $(PROG).linked.bc: $(BCOBJS) - $(LLINK) -f $(BCOBJS) -o $@ + $(LLINK) -f $(BCOBJS) -o $(PROG).tmp.bc + $(LOPT) -cleangcc -raise -constprop -dce $(PROG).tmp.bc -o $@ $(PROG).native: $(OBJS:.o=.c) gcc $(OBJS:.o=.c) -O2 $(LOCAL_CFLAGS) -Wall -o $@ @@ -87,8 +88,9 @@ clean : %.bc: %.ll $(LAS) -f $< +## There is just one file so omit link step and just clean %.linked.bc: %.bc - $(CP) $< $@ + $(LOPT) -cleangcc -raise -constprop -dce $< -o $@ %.clean.bc: %.bc $(LOPT) -cleangcc -raise -constprop -dce $< -o $@