[llvm-commits] CVS: llvm/test/Programs/MultiSource/SPEC/Makefile.spec

Chris Lattner lattner at cs.uiuc.edu
Fri Jan 17 12:57:01 PST 2003


Changes in directory llvm/test/Programs/MultiSource/SPEC:

Makefile.spec updated: 1.3 -> 1.4

---
Log message:

Unify makefile with Makefile.programs


---
Diffs of the changes:

Index: llvm/test/Programs/MultiSource/SPEC/Makefile.spec
diff -u llvm/test/Programs/MultiSource/SPEC/Makefile.spec:1.3 llvm/test/Programs/MultiSource/SPEC/Makefile.spec:1.4
--- llvm/test/Programs/MultiSource/SPEC/Makefile.spec:1.3	Wed Nov  6 17:44:37 2002
+++ llvm/test/Programs/MultiSource/SPEC/Makefile.spec	Fri Jan 17 12:56:06 2003
@@ -1,89 +1,56 @@
-## -*-Makefile-*-
+##===- test/Programs/MultiSource/SPEC/Makefile.spec --------*- Makefile -*-===##
+#
+# This makefile is used for testing the SPEC programs
+#
+##===----------------------------------------------------------------------===##
+
+# RUN_TYPE - Either ref, test, or train.  Maybe be specified on the command line
+RUN_TYPE := test
+
+# We do not distribute source code for the SPEC benchmarks, so we always start
+# with precompiled bytecode here.
+#
+USE_PRECOMPILED_BYTECODE := 1
 
-default: all
-
-## $(BENCH) should be the name of the benchmark "nnn.name".
-## If not specified, this defaults to the name of the benchmark directory.
-ifndef BENCH
-  BENCH = $(notdir $(PWD))
-endif
-BENCHBC = $(BENCH).bc
+## $(PROG) should be the name of the benchmark "nnn.name".
+PROG := $(notdir $(PWD))
 
 ## $(BENCHOUT) should be the name of the file to which stdout should go.
 ## It should be one of the standard output files in data/test/output/
 ifndef BENCHOUT
-BENCHOUT = $(BENCH).out
+BENCHOUT = $(PROG).out
 endif
 
-PROGRAMS_TO_TEST = $(BENCH)
+PROGRAMS_TO_TEST := $(PROG)
 
+include	$(LEVEL)/test/Programs/Makefile.programs
 
-include	$(LEVEL)/test/Makefile.tests
-
-data:
-	@test -L data || ln -s $(BENCHDATADIR)
-
-all:: $(BENCHBC)
-
-ifndef DISABLE_LLC
-all :: Output/$(BENCH).diff-llc
-endif
 
-ifndef DISABLE_CBE
-all :: Output/$(BENCH).diff-cbe
-endif
+##--- SPEC-dependent rules to do a test run or a reportable reference run
 
+SPECROOT := /home/vadve/shared/benchmarks/speccpu2000/benchspec
 
-##--- SPEC-dependent rules to do a test run or a reportable reference run
+# DATADIR - The directory holding expected SPEC benchmark results
+DATADIR := $(SPECROOT)/CINT2000/$(PROG)/data
 
-# BENCHDATADIR - The directory holding expected SPEC benchmark results
-BENCHDATADIR = /home/vadve/shared/Benchmarks/speccpu2000/benchspec/CINT2000/$(BENCH)/data
+data:
+	@test -L data || ln -s $(DATADIR)
 
-## BENCHMARK_OUTPUTS includes all the output files provided in the output dir.
+## REFERENCE_OUTPUTS includes all the output files provided in the output dir.
 ## $(BENCHOUT) defined above should be one of these output files.
 ## 
-BENCHMARK_OUTPUTS = $(wildcard $(BENCHDATADIR)/test/output/*.out)
-LLC_OUTPUTS = $(subst $(BENCHDATADIR)/test/output/,,$(BENCHMARK_OUTPUTS))
-CBE_OUTPUTS = $(LLC_OUTPUTS)
-
-check:
-	echo orig = $(BENCHMARK_OUTPUTS)
-	echo llc = $(LLC_OUTPUTS)
+REFERENCE_OUTPUTS := $(wildcard $(DATADIR)/$(RUN_TYPE)/output/*.out)
+LOCAL_OUTPUTS     := $(notdir $(REFERENCE_OUTPUTS))
 
-ref: Output/$(BENCH).llc
-	Output/$(BENCH).llc $(REFOPTS)
+check-paths:
+	@echo orig = $(REFERENCE_OUTPUTS)
+	@echo local = $(LOCAL_OUTPUTS)
 
+gen-ref-output:
+	cat $(REFERENCE_OUTPUTS) > $(SRCDIR)/$(PROG).reference_output
 
 ##--- LLVM-specific rules to compile and run the benchmark ---
 
-.PRECIOUS: Output/%.llc.s Output/%.llc
-.PRECIOUS: Output/%.cbe.c Output/%.cbe
-.PRECIOUS: Output/%.out-llc Output/%.out-cbe Output/%.out-nat 
-
-# DIFFPROG - The program used to diff the output
-DIFFPROG = $(LEVEL)/test/Programs/DiffOutput.sh
-
-# BENCHCODEDIR - The global directory holding SPEC benchmark bytecodes
-BENCHCODEDIR = /home/vadve/lattner/LLVMPrograms/SPEC
-
-$(BENCHBC): $(BENCHCODEDIR)/$(BENCHBC)
-	$(CP) $< $@
-
-Output/%.llc.s: %.bc Output/.dir
-	$(LLC) $(LLCFLAGS) -f $< -o $@
-
-Output/%.llc: Output/%.llc.s Output/.dir
-	$(CC) $(CFLAGS) $< $(LLCLIBS) -o $@
-
-Output/%.cbe.c: %.bc $(LDIS) Output/.dir
-	$(LDIS) -c < $< > $@
-
-Output/%.cbe: Output/%.cbe.c
-	$(CC) -o $@ $< $(LDFLAGS) $(CFLAGS)
-
-Output/%.out-nat: $(BENCHMARK_OUTPUTS) Output/.dir
-	cat $(BENCHMARK_OUTPUTS) > $@
-
 ifdef COPYFILES
 Output/.copy:
 	/bin/cp -p -r $(COPYFILES) Output/
@@ -96,26 +63,9 @@
 Output/%.out-llc: Output/%.llc Output/.copy Output/.dir
 	(cd Output; \
 	  ../$< $(TESTOPTS) > $(BENCHOUT); \
-	  cat $(LLC_OUTPUTS) > ../$@;)
+	  cat $(LOCAL_OUTPUTS) > ../$@;)
 
 Output/%.out-cbe: Output/%.cbe Output/.copy Output/.dir CBEOutput/.dir
 	(cd CBEOutput; \
 	  ../$< $(TESTOPTS) > $(BENCHOUT); \
-	  cat $(CBE_OUTPUTS) > ../$@; )
-
-Output/%.diff-llc: Output/%.out-nat Output/%.out-llc Output/.dir
-	$(DIFFPROG) llc $(subst Output/,,$(@:.diff-llc=))
-
-Output/%.diff-cbe: data Output/%.out-nat Output/%.out-cbe Output/.dir
-	$(DIFFPROG) cbe $(subst Output/,,$(@:.diff-cbe=))
-
-
-clean::
-	$(RM) -rf CBEOutput/
-
-## %.diff-llc: %.out-cbe %.out-llc
-## 	gdiff -u $* > $@ || ( \
-## 	  echo "*********** TEST $@ FAILED *********"; \
-## 	  cat $@; \
-## 	  rm $@; \
-## 	  echo "*********** TEST $@ FAILED *********"; )
+	  cat $(LOCAL_OUTPUTS) > ../$@; )





More information about the llvm-commits mailing list