[llvm-commits] CVS: llvm-test/Makefile.programs Makefile.tests TEST.nightly.Makefile

Reid Spencer reid at x10sys.com
Fri Feb 2 20:30:42 PST 2007



Changes in directory llvm-test:

Makefile.programs updated: 1.251 -> 1.252
Makefile.tests updated: 1.13 -> 1.14
TEST.nightly.Makefile updated: 1.44 -> 1.45
---
Log message:

For PR1159: http://llvm.org/PR1159 :
Avoid going to LLVM assembly files at all to improve performance of the
nightly test. Bytecode is now processed like this:

llvm-gcc -c -emit-llvm %.c -o %.bc
gccld -disable-opt -link-as-library *.bc -o %.linked.rbc
opt -std-compile-opts %.linked.rbc -o %.linked.bc
gccld %.linked.bc -o %.llvm

This eliminates one gccas invocation for each source file compilation, and 
two translations between .ll and .bc.


---
Diffs of the changes:  (+22 -30)

 Makefile.programs     |   24 +++++++++++-------------
 Makefile.tests        |   22 ++++++++--------------
 TEST.nightly.Makefile |    6 +++---
 3 files changed, 22 insertions(+), 30 deletions(-)


Index: llvm-test/Makefile.programs
diff -u llvm-test/Makefile.programs:1.251 llvm-test/Makefile.programs:1.252
--- llvm-test/Makefile.programs:1.251	Thu Feb  1 17:46:22 2007
+++ llvm-test/Makefile.programs	Fri Feb  2 22:30:17 2007
@@ -44,7 +44,7 @@
 
 .PRECIOUS: Output/%.llvm Output/%.native Output/%.llc Output/%.llc.s
 .PRECIOUS: Output/%.cbe Output/%.cbe.c Output/%.llvm.bc
-.PRECIOUS: Output/%.linked.bc 
+.PRECIOUS: Output/%.linked.bc
 
 # If we're using the llvm-gcc3 compiler then we need to also link with the
 # llvm c runtime library, othwerwise we don't
@@ -233,11 +233,12 @@
 print-llcbeta-option:
 	@echo $(LLCBETAOPTION)
 
-# Given a version of the entire program linked together into a single unit of
-# raw output from the C frontend, optimize it.
+# Given an unoptimized bytecode file that is a simple linkage of all
+# the program's bytecode files, optimize the program using the
+# standard compilation optimizations.
 $(PROGRAMS_TO_TEST:%=Output/%.linked.bc): \
-Output/%.linked.bc: Output/%.linked.rll $(LGCCAS)
-	-$(LGCCAS) $(STATS) $(EXTRA_GCCAS_OPTIONS) $< -o $@
+Output/%.linked.bc: Output/%.linked.rbc $(LOPT)
+	-$(LOPT) -std-compile-opts $(STATS) $(EXTRA_LOPT_OPTIONS) $< -o $@
 
 $(PROGRAMS_TO_TEST:%=Output/%.llvm.stripped.bc): \
 Output/%.llvm.stripped.bc: Output/%.llvm.bc $(LOPT)
@@ -285,9 +286,11 @@
 endif   # ifndef DISABLE_FOR_LLVM_PROGRAMS
 
 # Targets to get the pass arguments that gccas and gccld are using...
-Output/gccas-pass-args: $(LGCCAS) Output/.dir
-	-$(LGCCAS) $(EXTRA_GCCAS_OPTIONS) /dev/null -o /dev/null -debug-pass=Arguments > $@.1 2>&1
-	sed 's/Pass Arguments: //' < $@.1 | sed 's/-emitbytecode//' > $@
+Output/opt-pass-args: $(LOPT) Output/.dir
+	-$(LLVMAS) < /dev/null -o - | \
+	  $(LOPT) $(EXTRA_LOPT_OPTIONS) -disable-output -debug-pass=Arguments 2>&1 | \
+	  sed 's/Pass Arguments: //' | sed 's/-emitbytecode//' > $@
+
 Output/gccld-pass-args: $(LGCCLDPROG) Output/.dir
 	$(LLVMAS) < /dev/null > Output/gccld.test.bc
 	$(LGCCLD) Output/gccld.test.bc -o Output/gccld.test-out -debug-pass=Arguments > $@.1 2>&1
@@ -575,11 +578,6 @@
 Output/%.out-nat: $(SRCDIR)/%.reference_output Output/.dir
 	cp $< $@
 
-# To make a raw bytecode file up-to-date, just copy it over.
-$(PROGRAMS_TO_TEST:%=Output/%.linked.rll): \
-Output/%.linked.rll: $(SRCDIR)/%.linked.rll Output/.dir
-	cp $< $@
-
 $(PROGRAMS_TO_TEST:%=Output/%.LOC.txt): \
 Output/%.LOC.txt: $(SRCDIR)/%.LOC.txt Output/.dir
 	cp $< $@


Index: llvm-test/Makefile.tests
diff -u llvm-test/Makefile.tests:1.13 llvm-test/Makefile.tests:1.14
--- llvm-test/Makefile.tests:1.13	Sun Dec  3 15:15:49 2006
+++ llvm-test/Makefile.tests	Fri Feb  2 22:30:17 2007
@@ -49,31 +49,25 @@
 	$(RM) -rf Output/
 
 # Compile from X.c to Output/X.ll
-Output/%.ll: %.c $(LCC1) Output/.dir $(INCLUDES)
-	-$(LLVMGCC) $(CPPFLAGS) $(LCCFLAGS) $(TARGET_FLAGS) -O0 -S $< -o $@ -emit-llvm
+Output/%.bc: %.c $(LCC1) Output/.dir $(INCLUDES)
+	-$(LLVMGCC) $(CPPFLAGS) $(LCCFLAGS) $(TARGET_FLAGS) -O0 -c $< -o $@ -emit-llvm
 	-$(call UPGRADE_LL,$@)
 
 # Compile from X.cpp to Output/X.ll
-Output/%.ll: %.cpp $(LCC1XX) Output/.dir $(INCLUDES)
-	-$(LLVMGXX) $(CPPFLAGS) $(LCXXFLAGS) $(TARGET_FLAGS) -O0 -S $< -o $@ -emit-llvm
+Output/%.bc: %.cpp $(LCC1XX) Output/.dir $(INCLUDES)
+	-$(LLVMGXX) $(CPPFLAGS) $(LCXXFLAGS) $(TARGET_FLAGS) -O0 -c $< -o $@ -emit-llvm
 	-$(call UPGRADE_LL,$@)
 
 # Compile from X.cc to Output/X.ll
-Output/%.ll: %.cc $(LCC1XX) Output/.dir $(INCLUDES)
-	-$(LLVMGXX) $(CPPFLAGS) $(LCXXFLAGS) $(TARGET_FLAGS) -O0 -S $< -o $@ -emit-llvm
+Output/%.bc: %.cc $(LCC1XX) Output/.dir $(INCLUDES)
+	-$(LLVMGXX) $(CPPFLAGS) $(LCXXFLAGS) $(TARGET_FLAGS) -O0 -c $< -o $@ -emit-llvm
 	-$(call UPGRADE_LL,$@)
 
 # Compile from X.C to Output/X.ll
-Output/%.ll: %.C $(LCC1XX) Output/.dir $(INCLUDES)
-	-$(LLVMGXX) $(CPPFLAGS) $(LCXXFLAGS) $(TARGET_FLAGS) -O0 -S $< -o $@ -emit-llvm
+Output/%.bc: %.C $(LCC1XX) Output/.dir $(INCLUDES)
+	-$(LLVMGXX) $(CPPFLAGS) $(LCXXFLAGS) $(TARGET_FLAGS) -O0 -c $< -o $@ -emit-llvm
 	-$(call UPGRADE_LL,$@)
 
-# LLVM Assemble from Output/X.ll to Output/X.bc.  Output/X.ll must have come
-# from GCC output, so use GCCAS.
-#
-Output/%.bc: Output/%.ll $(LGCCAS)
-	-$(LGCCAS) $(STATS) $< -o $@
-
 # LLVM Assemble from X.ll to Output/X.bc.  Because we are coming directly from
 # LLVM source, use the non-transforming assembler.
 #


Index: llvm-test/TEST.nightly.Makefile
diff -u llvm-test/TEST.nightly.Makefile:1.44 llvm-test/TEST.nightly.Makefile:1.45
--- llvm-test/TEST.nightly.Makefile:1.44	Thu Feb  1 17:46:22 2007
+++ llvm-test/TEST.nightly.Makefile	Fri Feb  2 22:30:17 2007
@@ -31,10 +31,10 @@
 
 # Compilation tests
 $(PROGRAMS_TO_TEST:%=Output/%.nightly.compile.report.txt): \
-Output/%.nightly.compile.report.txt: Output/%.llvm.bc $(LGCCAS)
+Output/%.nightly.compile.report.txt: Output/%.llvm.bc $(LOPT)
 	@echo > $@
-	@echo '$(LGCCAS) Output/$*.linked.rll -o /dev/null $(TIMEOPT) $(EXTRA_GCCAS_OPTIONS)  >>$@ 2>&1'
-	@-if ($(LGCCAS) Output/$*.linked.rll -o /dev/null $(TIMEOPT) $(EXTRA_GCCAS_OPTIONS) >>$@ 2>&1)\
+	@echo '$(LOPT) Output/$*.linked.bc -f -o /dev/null $(TIMEOPT) $(EXTRA_LOPT_OPTIONS)  >>$@ 2>&1'
+	@-if ($(LOPT) Output/$*.linked.bc -f -o /dev/null $(TIMEOPT) $(EXTRA_LOPT_OPTIONS) >>$@ 2>&1)\
 	;then \
 	  echo "TEST-PASS: compile $(RELDIR)/$*" >> $@;\
 	  printf "TEST-RESULT-compile: " >> $@;\






More information about the llvm-commits mailing list