Merge from trunk.

llvm-svn: 12280
diff --git a/External/SPEC/CINT2000/164.gzip/Makefile b/External/SPEC/CINT2000/164.gzip/Makefile
index b3e8582..92e70ba 100644
--- a/External/SPEC/CINT2000/164.gzip/Makefile
+++ b/External/SPEC/CINT2000/164.gzip/Makefile
@@ -1,4 +1,8 @@
 LEVEL = ../../../../../..
 RUN_OPTIONS     = `cat $(REF_IN_DIR)control`
+ifeq ($(RUN_TYPE),test)
 STDOUT_FILENAME := input.compressed.out
+else
+STDOUT_FILENAME := input.combined.out
+endif
 include ../../Makefile.spec2000
diff --git a/External/SPEC/CINT2000/Makefile b/External/SPEC/CINT2000/Makefile
index b51c8f1..75185da 100644
--- a/External/SPEC/CINT2000/Makefile
+++ b/External/SPEC/CINT2000/Makefile
@@ -13,12 +13,4 @@
 	256.bzip2 \
 	300.twolf
 
-# Get the $(ARCH) setting
-include $(LEVEL)/Makefile.config
-
-# Disable crafty until it stops infinite-looping on Sparc
-ifeq ($(ARCH), Sparc)
-PARALLEL_DIRS := $(filter-out 186.crafty, $(PARALLEL_DIRS))
-endif
-
 include ${LEVEL}/test/Programs/Makefile.programs
diff --git a/External/SPEC/CINT95/124.m88ksim/Makefile b/External/SPEC/CINT95/124.m88ksim/Makefile
index 1f02740..f6985b0 100644
--- a/External/SPEC/CINT95/124.m88ksim/Makefile
+++ b/External/SPEC/CINT95/124.m88ksim/Makefile
@@ -2,18 +2,13 @@
 RUN_OPTIONS = -c
 
 ifeq ($(ENDIAN),big)
-EXTENSION := big
+STDIN_FILENAME := ctl.big
 else
-EXTENSION := lit
+STDIN_FILENAME := ctl.lit
+CPPFLAGS += -DLEHOST
 endif
 
-ifeq ($(RUN_TYPE),test)
-STDIN_FILENAME := ctl.$(EXTENSION)
-else
-STDIN_FILENAME := dcrand.$(EXTENSION)
-endif
-
-STDOUT_FILENAME := test.out
+STDOUT_FILENAME = $(RUN_TYPE).out
 
 Source := addd.c \
           adds.c \
@@ -113,3 +108,7 @@
           updstat.c
 
 include ../../Makefile.spec95
+
+$(REF_IN_DIR)/ctl.$(EXTENSION): $(REF_IN_DIR)/ctl.raw
+	$(SED) -e s/%endian%/$(EXTENSION)/ < $< > $@
+
diff --git a/External/SPEC/CINT95/130.li/Makefile b/External/SPEC/CINT95/130.li/Makefile
index 890cfef..d21f680 100644
--- a/External/SPEC/CINT95/130.li/Makefile
+++ b/External/SPEC/CINT95/130.li/Makefile
@@ -1,5 +1,5 @@
 LEVEL = ../../../../../..
-REQUIRES_EH_SUPPORT = 1
-STDIN_FILENAME  := train.lsp
-STDOUT_FILENAME := train.out
 include ../../Makefile.spec95
+REQUIRES_EH_SUPPORT = 1
+STDIN_FILENAME  := $(RUN_TYPE).lsp
+STDOUT_FILENAME := $(RUN_TYPE).out
diff --git a/External/SPEC/CINT95/132.ijpeg/Makefile b/External/SPEC/CINT95/132.ijpeg/Makefile
index b4da9aa..da3dc2f 100644
--- a/External/SPEC/CINT95/132.ijpeg/Makefile
+++ b/External/SPEC/CINT95/132.ijpeg/Makefile
@@ -1,7 +1,12 @@
 LEVEL = ../../../../../..
-STDIN_FILENAME  := specmun.ppm
-STDOUT_FILENAME := specmun.out
-RUN_OPTIONS := -image_file specmun.ppm -compression.quality 90 -compression.optimize_coding 0 -compression.smoothing_factor 90 -difference.image 1 -difference.x_stride 10 -difference.y_stride 10 -verbose 1 -GO.findoptcomp
+ifeq ($(RUN_TYPE),test)
+FILENAME  := specmun
+else
+FILENAME  := vigo
+endif
+
+STDOUT_FILENAME := $(FILENAME).out
+RUN_OPTIONS := -image_file $(FILENAME).ppm -compression.quality 90 -compression.optimize_coding 0 -compression.smoothing_factor 90 -difference.image 1 -difference.x_stride 10 -difference.y_stride 10 -verbose 1 -GO.findoptcomp
 
 # This line nukes the __const's found in /usr/include/stdio.h that prevent the
 # extern char * sys_errlist variable from linking properly.
@@ -9,4 +14,3 @@
 
 Source=libpbm1.c libpbm2.c libpbm3.c libpbm4.c libpbm5.c libpgm1.c libpgm2.c libppm1.c libppm2.c libppm3.c libppm4.c libppm5.c spec_image.c spec_jmemdst.c spec_jmemsrc.c spec_main.c rdppm.c wrppm.c rdgif.c wrgif.c rdtarga.c wrtarga.c rdbmp.c wrbmp.c jcapi.c jcparam.c jdatadst.c jcmaster.c jcmarker.c jcmainct.c jcprepct.c jccoefct.c jccolor.c jcsample.c jchuff.c jcdctmgr.c jfdctfst.c jfdctflt.c jfdctint.c jdapi.c jdatasrc.c jdmaster.c jdmarker.c jdmainct.c jdcoefct.c jdpostct.c jddctmgr.c jidctfst.c jidctflt.c jidctint.c jidctred.c jdhuff.c jdsample.c jdcolor.c jquant1.c jquant2.c jdmerge.c jcomapi.c jutils.c jerror.c jmemmgr.c jmemnobs.c
 include ../../Makefile.spec95
-
diff --git a/External/SPEC/Makefile.spec b/External/SPEC/Makefile.spec
index cba01e9..57bba8e 100644
--- a/External/SPEC/Makefile.spec
+++ b/External/SPEC/Makefile.spec
@@ -24,7 +24,9 @@
 BENCH_NAME  := $(patsubst /%,%,$(BENCH_NAME))
 SPEC_SUBDIR := $(patsubst /%,%,$(SPEC_SUBDIR))
 
+ifndef SPEC_BENCH_DIR
 SPEC_BENCH_DIR := $(SPEC_ROOT)/$(SPEC_SUBDIR)
+endif
 
 PROG := $(BENCH_NAME)
 ifndef Source
diff --git a/Makefile.programs b/Makefile.programs
index 3d40ceb..37085b3 100644
--- a/Makefile.programs
+++ b/Makefile.programs
@@ -395,7 +395,7 @@
 #
 $(PROGRAMS_TO_TEST:%=Output/%.llvm-prof.bc): \
 Output/%.llvm-prof.bc: Output/%.llvm.bc
-	$(LOPT) -insert-block-profiling $< -o $@ -f
+	$(LOPT) -insert-edge-profiling $< -o $@ -f
 
 $(PROGRAMS_TO_TEST:%=Output/%.printprof): \
 Output/%.printprof: Output/%.llvm.bc Output/%.prof $(LPROF)
diff --git a/MultiSource/Applications/Makefile b/MultiSource/Applications/Makefile
index ff0cc99..6827924 100755
--- a/MultiSource/Applications/Makefile
+++ b/MultiSource/Applications/Makefile
@@ -4,9 +4,6 @@
 
 include $(LEVEL)/Makefile.config
 
-PARALLEL_DIRS  = Burg aha sgefa siod lambda-0.1.3
-ifeq ($(OS),Linux)
-PARALLEL_DIRS  += d
-endif
+PARALLEL_DIRS  = Burg aha sgefa siod lambda-0.1.3 d
 
 include $(LEVEL)/test/Programs/Makefile.programs
diff --git a/MultiSource/Applications/hbd/Makefile b/MultiSource/Applications/hbd/Makefile
index b796bb3..4de05fb 100644
--- a/MultiSource/Applications/hbd/Makefile
+++ b/MultiSource/Applications/hbd/Makefile
@@ -3,6 +3,6 @@
 CPPFLAGS += -DHAVE_CONFIG_H
 LDFLAGS += -lstdc++
 LIBS += -lstdc++
-RUN_OPTIONS = Sort.class
+RUN_OPTIONS = $(BUILD_SRC_DIR)/Sort.class
 REQUIRES_EH_SUPPORT := 1
 include ../../Makefile.multisrc
diff --git a/MultiSource/Benchmarks/FreeBench/distray/ref.in b/MultiSource/Benchmarks/FreeBench/distray/ref.in
index 1e8b314..7ed6ff8 100644
--- a/MultiSource/Benchmarks/FreeBench/distray/ref.in
+++ b/MultiSource/Benchmarks/FreeBench/distray/ref.in
@@ -1 +1 @@
-6
+5
diff --git a/MultiSource/Benchmarks/Olden/health/health.c b/MultiSource/Benchmarks/Olden/health/health.c
index b126ef8..f36985c 100644
--- a/MultiSource/Benchmarks/Olden/health/health.c
+++ b/MultiSource/Benchmarks/Olden/health/health.c
@@ -241,7 +241,7 @@
   chatting("Done.\n\n");
   chatting("# of people treated:              %f people\n",
 	   total_patients);
-  chatting("Average length of stay:           %f time units\n", 
+  chatting("Average length of stay:           %0.2f time units\n", 
 	   total_time / total_patients);
   chatting("Average # of hospitals visited:   %f hospitals\n\n",
 	   total_hosps / total_patients);
diff --git a/MultiSource/Benchmarks/llubenchmark/Makefile b/MultiSource/Benchmarks/llubenchmark/Makefile
index f8ff2eb..2021f2a 100644
--- a/MultiSource/Benchmarks/llubenchmark/Makefile
+++ b/MultiSource/Benchmarks/llubenchmark/Makefile
@@ -4,4 +4,6 @@
 CPPFLAGS =
 LDFLAGS  =
 
+RUN_OPTIONS = -i 3000
+
 include	../../Makefile.multisrc
diff --git a/MultiSource/Benchmarks/llubenchmark/llubenchmark.c b/MultiSource/Benchmarks/llubenchmark/llubenchmark.c
index 2c46694..d42bd1d 100644
--- a/MultiSource/Benchmarks/llubenchmark/llubenchmark.c
+++ b/MultiSource/Benchmarks/llubenchmark/llubenchmark.c
@@ -63,7 +63,7 @@
 int element_size = 32;
 int num_allocated = 0;
 
-#if 1
+#if 0
 struct element *
 allocate() {
   if (next_free == ALLOC_SIZE) {
diff --git a/SingleSource/UnitTests/SetjmpLongjmp/C/Makefile b/SingleSource/UnitTests/SetjmpLongjmp/C/Makefile
index 8d9b63c..07e6466 100644
--- a/SingleSource/UnitTests/SetjmpLongjmp/C/Makefile
+++ b/SingleSource/UnitTests/SetjmpLongjmp/C/Makefile
@@ -1,5 +1,6 @@
 # Programs/SingleSource/UnitTests/SetjmpLongjmp/Makefile
 LEVEL = ../../../../../..
+REQUIRES_EH_SUPPORT = 1
 include $(LEVEL)/test/Programs/SingleSource/Makefile.singlesrc
 
 
diff --git a/TEST.vtl.Makefile b/TEST.vtl.Makefile
index 35b46a0..803cb34 100644
--- a/TEST.vtl.Makefile
+++ b/TEST.vtl.Makefile
@@ -30,26 +30,9 @@
 	#-$(VERB) $(VTL) view > $@
 	#$(VERB)  $(VTL) delete $* -f
 
-test:: $(PROGRAMS_TO_TEST:%=test.$(TEST).pa.%)
 
 #
-# Generate events for Pool Allocated CBE
-#
-$(PROGRAMS_TO_TEST:%=test.$(TEST).pa.%): \
-test.$(TEST).pa.%: Output/%.poolalloc.cbe
-	@echo "========================================="
-	@echo "Running '$(TEST)' test on '$(TESTNAME)' program"
-ifeq ($(RUN_OPTIONS),)
-	$(VERB) cat $(STDIN_FILENAME) | $(VTL) activity $* -d 50 -c sampling -o $(EVENTS) -app $<
-else
-	$(VERB) cat $(STDIN_FILENAME) | $(VTL) activity $* -d 50 -c sampling -o $(EVENTS) -app $<,"$(RUN_OPTIONS)"
-endif
-	-$(VERB) $(VTL) run $*
-	-$(VERB) $(VTL) view > $@
-	$(VERB)  $(VTL) delete $* -f
-
-#
-# Generate events for Pool Allocated CBE
+# Generate events for CBE
 #
 $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
 test.$(TEST).%: Output/%.cbe