This commit was manufactured by cvs2svn to create branch 'parallel'.

llvm-svn: 12066
diff --git a/External/Makefile b/External/Makefile
index 8b45738..8dee2cf 100644
--- a/External/Makefile
+++ b/External/Makefile
@@ -8,10 +8,9 @@
 #
 # Create the list of directories to compile
 #
-DIRS := SPEC Povray 
-
-ifndef USE_POVRAY
-DIRS := $(filter-out Povray/, $(DIRS))
+DIRS := SPEC
+ifndef USE_SPEC
+DIRS := $(filter-out SPEC/, $(DIRS))
 endif
 
 include ${LEVEL}/test/Programs/Makefile.programs
diff --git a/External/SPEC/CFP2000/177.mesa/Makefile b/External/SPEC/CFP2000/177.mesa/Makefile
index 21f261e..b21b95b 100644
--- a/External/SPEC/CFP2000/177.mesa/Makefile
+++ b/External/SPEC/CFP2000/177.mesa/Makefile
@@ -20,4 +20,4 @@
             texstate.c texture.c triangle.c varray.c vb.c vbfill.c vbrender.c \
             vbxform.c winpos.c xform.c mesa4.c)
 
-include ../../Makefile.spec2000
+include ../../Makefile.spec
diff --git a/External/SPEC/CFP2000/179.art/Makefile b/External/SPEC/CFP2000/179.art/Makefile
index 1919b83..8f3aa52 100644
--- a/External/SPEC/CFP2000/179.art/Makefile
+++ b/External/SPEC/CFP2000/179.art/Makefile
@@ -8,4 +8,4 @@
 STDOUT_FILENAME = $(RUN_TYPE).out
 
 CPPFLAGS =
-include ../../Makefile.spec2000
+include ../../Makefile.spec
diff --git a/External/SPEC/CFP2000/183.equake/Makefile b/External/SPEC/CFP2000/183.equake/Makefile
index 9f2a266..2395623 100644
--- a/External/SPEC/CFP2000/183.equake/Makefile
+++ b/External/SPEC/CFP2000/183.equake/Makefile
@@ -3,4 +3,4 @@
 STDIN_FILENAME  = inp.in
 STDOUT_FILENAME = inp.out
 CPPFLAGS =
-include ../../Makefile.spec2000
+include ../../Makefile.spec
diff --git a/External/SPEC/CFP2000/188.ammp/Makefile b/External/SPEC/CFP2000/188.ammp/Makefile
index 6dc8d78..ee2f856 100644
--- a/External/SPEC/CFP2000/188.ammp/Makefile
+++ b/External/SPEC/CFP2000/188.ammp/Makefile
@@ -3,12 +3,4 @@
 STDIN_FILENAME  = ammp.in
 STDOUT_FILENAME = ammp.out
 CPPFLAGS =
-# override RUN_TYPE (this is a long running test):
-ifndef RUN_TYPE
-ifdef LARGE_PROBLEM_SIZE
-RUN_TYPE  := ref
-else
-RUN_TYPE  := train
-endif
-endif
-include ../../Makefile.spec2000
+include ../../Makefile.spec
diff --git a/External/SPEC/CINT2000/164.gzip/Makefile b/External/SPEC/CINT2000/164.gzip/Makefile
index b3e8582..efb0ba6 100644
--- a/External/SPEC/CINT2000/164.gzip/Makefile
+++ b/External/SPEC/CINT2000/164.gzip/Makefile
@@ -1,4 +1,4 @@
 LEVEL = ../../../../../..
 RUN_OPTIONS     = `cat $(REF_IN_DIR)control`
 STDOUT_FILENAME := input.compressed.out
-include ../../Makefile.spec2000
+include ../../Makefile.spec
diff --git a/External/SPEC/CINT2000/175.vpr/Makefile b/External/SPEC/CINT2000/175.vpr/Makefile
index 60757dc..81840f0 100644
--- a/External/SPEC/CINT2000/175.vpr/Makefile
+++ b/External/SPEC/CINT2000/175.vpr/Makefile
@@ -3,4 +3,4 @@
 RUN_OPTIONS     = net.in arch.in place.out dum.out -nodisp -place_only -init_t 5 -exit_t 0.005 -alpha_t 0.9412 -inner_num 2
 STDOUT_FILENAME := place_log.out
 CPPFLAGS := -DNO_GRAPHICS
-include ../../Makefile.spec2000
+include ../../Makefile.spec
diff --git a/External/SPEC/CINT2000/176.gcc/Makefile b/External/SPEC/CINT2000/176.gcc/Makefile
index 2c0c96f..da0eb70 100644
--- a/External/SPEC/CINT2000/176.gcc/Makefile
+++ b/External/SPEC/CINT2000/176.gcc/Makefile
@@ -1,11 +1,7 @@
 LEVEL = ../../../../../..
-ifeq ($(RUN_TYPE),test)
 RUN_OPTIONS     = cccp.i -o cccp.s
-else
-RUN_OPTIONS     = cp-decl.i -o cp-decl.s
-endif
 STDOUT_FILENAME = cccp.out
-include ../../Makefile.spec2000
+include ../../Makefile.spec
 ifeq ($(ARCH),Sparc)
   ## SPEC portability note for GCC says to use these flags and cross fingers:
   CPPFLAGS += -DHOST_WORDS_BIG_ENDIAN -DSPEC_CPU2000_LP64
diff --git a/External/SPEC/CINT2000/181.mcf/Makefile b/External/SPEC/CINT2000/181.mcf/Makefile
index 7e64149..0b6bd6f 100644
--- a/External/SPEC/CINT2000/181.mcf/Makefile
+++ b/External/SPEC/CINT2000/181.mcf/Makefile
@@ -1,4 +1,4 @@
 LEVEL = ../../../../../..
 RUN_OPTIONS         := inp.in
 STDOUT_FILENAME := inp.out
-include ../../Makefile.spec2000
+include ../../Makefile.spec
diff --git a/External/SPEC/CINT2000/186.crafty/Makefile b/External/SPEC/CINT2000/186.crafty/Makefile
index cfc7edd..64e7b3e 100644
--- a/External/SPEC/CINT2000/186.crafty/Makefile
+++ b/External/SPEC/CINT2000/186.crafty/Makefile
@@ -5,4 +5,4 @@
 CPPFLAGS = -DSPEC_CPU2000 -DLINUX_i386
 Source = $(addprefix $(SPEC_BENCH_DIR)/src/, attacks.c  draw.c   enprise.c   init.c      iterate.c  make.c    nexte.c   output.c  preeval.c  resign.c  searchr.c   swap.c    utility.c boolean.c  drawn.c  evaluate.c  input.c     lookup.c   movgen.c  nextr.c   phase.c   quiesce.c  root.c    setboard.c  time.c    validate.c  edit.c   history.c   interupt.c  main.c     next.c    option.c  ponder.c  repeat.c   search.c  store.c     unmake.c  valid.c)
 
-include ../../Makefile.spec2000
+include ../../Makefile.spec
diff --git a/External/SPEC/CINT2000/197.parser/Makefile b/External/SPEC/CINT2000/197.parser/Makefile
index 5338a7e..b84ed64 100644
--- a/External/SPEC/CINT2000/197.parser/Makefile
+++ b/External/SPEC/CINT2000/197.parser/Makefile
@@ -3,4 +3,4 @@
 STDIN_FILENAME  = $(RUN_TYPE).in
 STDOUT_FILENAME = $(RUN_TYPE).out
 CPPFLAGS =
-include ../../Makefile.spec2000
+include ../../Makefile.spec
diff --git a/External/SPEC/CINT2000/252.eon/Makefile b/External/SPEC/CINT2000/252.eon/Makefile
index 2fc8efa..1760dd1 100755
--- a/External/SPEC/CINT2000/252.eon/Makefile
+++ b/External/SPEC/CINT2000/252.eon/Makefile
@@ -4,7 +4,7 @@
 STDERR_FILENAME = cook_log.err
 
 # Yes, we know this is an old crufty C++ benchmark.  Don't tell us about it GCC!
-CPPFLAGS = -Wno-deprecated -Wno-non-template-friend -DHAS_ERRLIST -DUSE_STRERROR -DSPEC_STDCPP -DNDEBUG
+CPPFLAGS = -Wno-deprecated -Wno-non-template-friend -DHAS_ERRLIST -DSPEC_STDCPP -DNDEBUG
 
 Source = $(addprefix $(SPEC_BENCH_DIR)/src/,  \
             ggCoverageSolidTexture.cc ggPathDielectricMaterial.cc ggBox2.cc \
@@ -49,7 +49,7 @@
             mrInstance.cc mrMaterial.cc mrPhongAreaTriangleLuminaire.cc \
             mrSolidTexture.cc mrSphere.cc mrSurface.cc mrSurfaceTexture.cc \
             mrXYRectangle.cc mrXZRectangle.cc mrYZRectangle.cc myrand.cc)
-include ../../Makefile.spec2000
-LDFLAGS = -lstdc++ -lm
-LIBS    = -lstdc++ -lm
+include ../../Makefile.spec
+LDFLAGS = -lstdc++ 
+LIBS    = -lstdc++
 
diff --git a/External/SPEC/CINT2000/253.perlbmk/Makefile b/External/SPEC/CINT2000/253.perlbmk/Makefile
index c3b0197..b1a0dee 100644
--- a/External/SPEC/CINT2000/253.perlbmk/Makefile
+++ b/External/SPEC/CINT2000/253.perlbmk/Makefile
@@ -1,11 +1,10 @@
 LEVEL = ../../../../../..
-REQUIRES_EH_SUPPORT = 1
-RUN_OPTIONS     = test.pl
-STDOUT_FILENAME = test.out
+RUN_OPTIONS     = $(RUN_TYPE).pl
+STDOUT_FILENAME = $(RUN_TYPE).out
 CPPFLAGS = -DSPEC_CPU2000_LINUX -Dbool=char -DI_TIME -DI_SYS_TIME
 
 ifneq ($(ARCH),Sparc)
 CPPFLAGS += -D__LITTLE_ENDIAN__
 endif
 
-include ../../Makefile.spec2000
+include ../../Makefile.spec
diff --git a/External/SPEC/CINT2000/254.gap/Makefile b/External/SPEC/CINT2000/254.gap/Makefile
index b845a12..127c0c2 100644
--- a/External/SPEC/CINT2000/254.gap/Makefile
+++ b/External/SPEC/CINT2000/254.gap/Makefile
@@ -3,7 +3,7 @@
 STDOUT_FILENAME = $(RUN_TYPE).out
 STDIN_FILENAME  = $(RUN_TYPE).in
 CPPFLAGS = -DSYS_IS_USG -DSYS_HAS_CALLOC_PROTO -DSYS_HAS_IOCTL_PROTO -DSYS_HAS_TIME_PROTO
-include ../../Makefile.spec2000
+include ../../Makefile.spec
 ifeq ($(ARCH),Sparc)
 CPPFLAGS+= -DSPEC_CPU2000_LP64
 endif
diff --git a/External/SPEC/CINT2000/255.vortex/Makefile b/External/SPEC/CINT2000/255.vortex/Makefile
index 30ee81e..f485fc3 100644
--- a/External/SPEC/CINT2000/255.vortex/Makefile
+++ b/External/SPEC/CINT2000/255.vortex/Makefile
@@ -1,7 +1,7 @@
 LEVEL = ../../../../../..
 #STDOUT_FILENAME := input.random.out
 
-include ../../Makefile.spec2000
+include ../../Makefile.spec
 
 ifeq ($(ARCH),Sparc)
   ## SPEC portability note for vortex says to use this flag on 64-bit machines
diff --git a/External/SPEC/CINT2000/256.bzip2/Makefile b/External/SPEC/CINT2000/256.bzip2/Makefile
index e8f5f54..45e8e88 100644
--- a/External/SPEC/CINT2000/256.bzip2/Makefile
+++ b/External/SPEC/CINT2000/256.bzip2/Makefile
@@ -1,4 +1,4 @@
 LEVEL = ../../../../../..
 RUN_OPTIONS     = `cat $(REF_IN_DIR)control`
 STDOUT_FILENAME := input.random.out
-include ../../Makefile.spec2000
+include ../../Makefile.spec
diff --git a/External/SPEC/CINT2000/300.twolf/Makefile b/External/SPEC/CINT2000/300.twolf/Makefile
index c9c9974..57c1ce0 100644
--- a/External/SPEC/CINT2000/300.twolf/Makefile
+++ b/External/SPEC/CINT2000/300.twolf/Makefile
@@ -2,5 +2,5 @@
 LDFLAGS = -lm
 RUN_OPTIONS     = $(RUN_TYPE)
 STDOUT_FILENAME = $(RUN_TYPE).net.stdout
-include ../../Makefile.spec2000
+include ../../Makefile.spec
 
diff --git a/External/SPEC/CINT95/099.go/Makefile b/External/SPEC/CINT95/099.go/Makefile
index 83cb541..06dc85d 100644
--- a/External/SPEC/CINT95/099.go/Makefile
+++ b/External/SPEC/CINT95/099.go/Makefile
@@ -1,6 +1,12 @@
 LEVEL = ../../../../../..
 BM=099.go
+
+ifeq ($(RUN_TYPE),test)
 STDIN_FILENAME  = /dev/null
 STDOUT_FILENAME = null.out
 RUN_OPTIONS     = 40 19
+else
+STDIN_FILENAME  = 2stone9.in
+STDOUT_FILENAME = 2stone9.out
+endif
 include ../../Makefile.spec95
diff --git a/External/SPEC/Makefile b/External/SPEC/Makefile
index 636bb95..f717e8c 100644
--- a/External/SPEC/Makefile
+++ b/External/SPEC/Makefile
@@ -1,17 +1,3 @@
 LEVEL = ../../../..
-DIRS := CINT95 CFP2000 CINT2000
-include ${LEVEL}/Makefile.config
-
-#
-# Remove SPEC95 and SPEC2000 per the user's configuration
-#
-ifndef USE_SPEC2000
-DIRS := $(filter-out CFP2000/, $(DIRS))
-DIRS := $(filter-out CINT2000/, $(DIRS))
-endif
-
-ifndef USE_SPEC95
-DIRS := $(filter-out CINT95/, $(DIRS))
-endif
-
+DIRS := CFP2000 CINT2000
 include ${LEVEL}/test/Programs/Makefile.programs
diff --git a/External/SPEC/Makefile.spec b/External/SPEC/Makefile.spec
index cba01e9..75ec99c 100644
--- a/External/SPEC/Makefile.spec
+++ b/External/SPEC/Makefile.spec
@@ -1,17 +1,25 @@
 ##===- Makefile.spec ---------------------------------------*- Makefile -*-===##
 #
-# This makefile is a template for building SPEC as an external
-# test. It is included by Makefile.spec2000 and Makefile.spec95.
+# This makefile contains information for building SPEC as an external test.
 #
 ##===----------------------------------------------------------------------===##
 
 include $(LEVEL)/Makefile.config
 
+# RUN_TYPE - Either ref, test, or train.  May be specified on the command line.
+ifdef LARGE_PROBLEM_SIZE
+RUN_TYPE  := train
+else
+RUN_TYPE  := test
+endif
+
 ## Information the test should have provided...
 ifndef STDOUT_FILENAME
 STDOUT_FILENAME := standard.out
 endif
-LDFLAGS += -lm
+ifndef LDFLAGS
+LDFLAGS = -lm
+endif
 
 # Get the current directory, the name of the benchmark, and the current
 # subdirectory of the SPEC directory we are in (ie, CINT2000/164.gzip)
@@ -38,10 +46,10 @@
 include $(LEVEL)/test/Programs/MultiSource/Makefile.multisrc
 
 # Do not pass -Wall to compile commands...
-LCCFLAGS  := -O3
-LCXXFLAGS := -O3
+LCCFLAGS  := -O2
+LCXXFLAGS := -O2
 
-CPPFLAGS += -I $(SPEC_BENCH_DIR)/src/
+CPPFLAGS += -DSPEC_CPU2000 -I $(SPEC_BENCH_DIR)/src/
 SPEC_SANDBOX := $(LLVM_SRC_ROOT)/test/Programs/External/SPEC/Sandbox.sh
 
 # Information about testing the program...
@@ -78,14 +86,6 @@
 	-(cd Output/jit-$(RUN_TYPE); cat $(LOCAL_OUTPUTS)) > $@
 	-cp Output/jit-$(RUN_TYPE)/$(STDOUT_FILENAME).time $@.time
 
-$(PROGRAMS_TO_TEST:%=Output/%.out-jit-ls): \
-Output/%.out-jit-ls: Output/%.llvm.bc $(LLI)
-	$(SPEC_SANDBOX) jit-ls-$(RUN_TYPE) $@ $(REF_IN_DIR) \
-             $(RUNSAFELY) $(STDIN_FILENAME) $(STDOUT_FILENAME) \
-                  $(LLI) -regalloc=linearscan $(JIT_OPTS) ../../$< $(RUN_OPTIONS)
-	-(cd Output/jit-ls-$(RUN_TYPE); cat $(LOCAL_OUTPUTS)) > $@
-	-cp Output/jit-ls-$(RUN_TYPE)/$(STDOUT_FILENAME).time $@.time
-
 $(PROGRAMS_TO_TEST:%=Output/%.out-llc): \
 Output/%.out-llc: Output/%.llc
 	$(SPEC_SANDBOX) llc-$(RUN_TYPE) $@ $(REF_IN_DIR) \
@@ -133,14 +133,14 @@
 
 # Rules to bugpoint the GCCAS, GCCLD, LLC, or LLI commands...
 $(PROGRAMS_TO_TEST:%=Output/%.bugpoint-gccas): \
-Output/%.bugpoint-gccas: Output/%.noopt-llvm.bc $(LBUGPOINT) \
+Output/%.bugpoint-gccas: Output/%.linked.rll $(LBUGPOINT) \
                          Output/gccas-pass-args Output/%.out-nat
 	$(SPEC_SANDBOX) bugpoint-$(RUN_TYPE) $@ $(REF_IN_DIR) \
 	    $(LBUGPOINT) ../../$< `cat Output/gccas-pass-args` $(BUGPOINT_OPTIONS)
 	@echo "===> Leaving Output/bugpoint-$(RUN_TYPE)"
 
 $(PROGRAMS_TO_TEST:%=Output/%.bugpoint-gccld): \
-Output/%.bugpoint-gccld: Output/%.noopt-llvm.bc $(LBUGPOINT) \
+Output/%.bugpoint-gccld: Output/%.linked.bc $(LBUGPOINT) \
                          Output/gccld-pass-args Output/%.out-nat
 	$(SPEC_SANDBOX) bugpoint-$(RUN_TYPE) $@ $(REF_IN_DIR) \
 	    $(LBUGPOINT) ../../$< `cat Output/gccld-pass-args` $(BUGPOINT_OPTIONS)
@@ -160,20 +160,6 @@
 
 
 
-LIBPROFILESO = $(LEVEL)/lib/Debug/libprofile_rt.so
-
-$(PROGRAMS_TO_TEST:%=Output/%.prof): \
-Output/%.prof: Output/%.llvm-prof.bc Output/%.out-nat $(LIBPROFILESO)
-	@rm -f $@
-	$(SPEC_SANDBOX) profile-$(RUN_TYPE) Output/$*.out-prof $(REF_IN_DIR) \
-	  $(RUNSAFELY) $(STDIN_FILENAME) $(STDOUT_FILENAME) $(LLI) $(JIT_OPTS)\
-            -fake-argv0 '../$*.llvm.bc' -load ../../$(LIBPROFILESO) ../../$< -llvmprof-output ../../$@ $(RUN_OPTIONS)
-	-(cd Output/profile-$(RUN_TYPE); cat $(LOCAL_OUTPUTS)) > Output/$*.out-prof
-	-cp Output/profile-$(RUN_TYPE)/$(STDOUT_FILENAME).time $@.time
-	@cmp -s Output/$*.out-prof Output/$*.out-nat || \
-		printf "***\n***\n*** WARNING: Output of profiled program (Output/$*.out-prof)\n*** doesn't match the output of the native program (Output/$*.out-nat)!\n***\n***\n";
-
-
 
 
 $(PROGRAMS_TO_TEST:%=Output/%.out-tracing): \
@@ -187,3 +173,4 @@
 $(PROGRAMS_TO_TEST:%=Output/%.performance): \
 Output/%.performance: Output/%.out-llc Output/%.out-tracing
 	-$(TIMESCRIPT) $* Output/$*.out-llc.time Output/$*.out-tracing.time $@
+
diff --git a/LLVMSource/2003-08-03-ReservedWordFunction.ll b/LLVMSource/2003-08-03-ReservedWordFunction.ll
new file mode 100644
index 0000000..b7c77d0
--- /dev/null
+++ b/LLVMSource/2003-08-03-ReservedWordFunction.ll
@@ -0,0 +1,12 @@
+; This testcase ensures the code emitter does something about the fact that
+; we can have collisions with keywords
+
+
+void %byte() {
+  ret void
+}
+int %main() {
+  call void %byte()
+  ret int 0
+}
+
diff --git a/LLVMSource/InvokeUnwind.ll b/LLVMSource/InvokeUnwind.ll
index 9b0afab..cdc6431 100644
--- a/LLVMSource/InvokeUnwind.ll
+++ b/LLVMSource/InvokeUnwind.ll
@@ -1,13 +1,17 @@
-; Test to make sure the invoke instruction and unwind are working...
+; Test to make sure the invoke instruction and llvm.unwind intrinsic are 
+; working...
 
 implementation
 
+declare void %llvm.unwind()
 declare void %abort()
 
 internal void %throw(bool %ShouldThrow) {
 	br bool %ShouldThrow, label %Throw, label %NoThrow
 Throw:
-	unwind
+	call void %llvm.unwind()
+	call void %abort()           ;;; dead
+	ret void
 NoThrow:
 	ret void
 }
diff --git a/LLVMSource/Makefile b/LLVMSource/Makefile
index c72747b..7917c84 100644
--- a/LLVMSource/Makefile
+++ b/LLVMSource/Makefile
@@ -6,8 +6,6 @@
 LEVEL = ../../..
 DISABLE_FOR_LLVM_PROGRAMS := 1
 PROGRAM_REQUIRED_TO_EXIT_OK := 1
-REQUIRES_EH_SUPPORT := 1
-
 PROGRAMS_TO_TEST := $(basename $(wildcard *.ll))
 include $(LEVEL)/test/Programs/Makefile.programs
 
diff --git a/Makefile.programs b/Makefile.programs
index 3d40ceb..555458c 100644
--- a/Makefile.programs
+++ b/Makefile.programs
@@ -107,10 +107,6 @@
 LLCLSDIFFS  := $(addsuffix .diff-llc-ls, $(PREFIXED_PROGRAMS_TO_TEST))
 CBEDIFFS  := $(addsuffix .diff-cbe, $(PREFIXED_PROGRAMS_TO_TEST))
 
-# Profiles for the program.
-PROFOUTPUT := $(addsuffix .prof, $(PREFIXED_PROGRAMS_TO_TEST))
-PRINTPROFOUTPUT := $(addsuffix .printprof, $(PREFIXED_PROGRAMS_TO_TEST))
-
 # Build Program outputs:
 .PRECIOUS: Output/%.out-lli Output/%.out-jit Output/%.out-llc Output/%.out-llc-ls
 .PRECIOUS: Output/%.out-nat Output/%.out-cbe
@@ -123,9 +119,6 @@
 # Regardless of what other options are specified, build the program's bytecode
 # representation.
 all:: $(BYTECODE)
-profile:: $(PROFOUTPUT)
-print-profile:: $(PRINTPROFOUTPUT)
-
 
 ifdef RUN_GCC_ONLY
 DISABLE_DIFFS = 1
@@ -178,7 +171,7 @@
 ifdef ENABLE_LINEARSCAN
 all:: $(LLCLSDIFFS)
 endif
-endif#DISABLE_LLC_DIFFS
+endif
 
 ifndef DISABLE_CBE_DIFFS
 all:: $(CBEDIFFS)
@@ -187,16 +180,16 @@
 ifdef TARGET_HAS_JIT
 ifndef DISABLE_JIT
 all:: $(JITDIFFS)
+endif
 ifdef ENABLE_LINEARSCAN
 all:: $(JITLSDIFFS)
 endif
-endif#DISABLE_JIT
-endif#TARGET_HAS_JIT
+endif
 
 ifdef ENABLE_LLI
 all:: $(LLIDIFFS)
 endif
-endif#DISABLE_DIFFS
+endif
 
 # Given a version of the entire program linked together into a single unit of
 # raw output from the C frontend, optimize it.
@@ -208,7 +201,6 @@
 Output/%.llvm.stripped.bc: Output/%.llvm.bc $(LOPT)
 	$(LOPT) -mstrip $< -o $@ -f
 
-
 ifndef DISABLE_FOR_LLVM_PROGRAMS
 # Rule to produce final program bytecode file from linked, optimized, bytecode.
 # Link the program to the libraries it uses, then perform postlink
@@ -216,7 +208,7 @@
 
 $(PROGRAMS_TO_TEST:%=Output/%.llvm.bc): \
 Output/%.llvm.bc: Output/%.linked.bc $(LGCCLDPROG)
-	$(LGCCLD) $(STATS) $< -lc $(LIBS) -lcrtend -o Output/$*.llvm
+	$(LGCCLD) -disable-inlining $(STATS) $< -lc $(LIBS) -lcrtend -o Output/$*.llvm
 ifneq ($(OPTPASSES),)
 	$(LOPT) -q $(OPTPASSES) < $@ > $@.tmp
 	$(MV) -f $@.tmp $@
@@ -224,42 +216,29 @@
 
 $(PROGRAMS_TO_TEST:%=Output/%.llvm): \
 Output/%.llvm: Output/%.linked.bc $(LGCCLDPROG)
-	$(LGCCLD) $(STATS) $< -lc $(LIBS) -lcrtend -o Output/$*.llvm
+	$(LGCCLD) -disable-inlining $(STATS) $< -lc $(LIBS) -lcrtend -o Output/$*.llvm
 ifneq ($(OPTPASSES),)
 	$(LOPT) -q $(OPTPASSES) < $@ > $@.tmp
 	$(MV) -f $@.tmp $@
 endif
-
-$(PROGRAMS_TO_TEST:%=Output/%.noopt-llvm.bc): \
-Output/%.noopt-llvm.bc: Output/%.linked.rbc $(LGCCLDPROG)
-	$(LGCCLD) -disable-opt $(STATS) $< -lc $(LIBS) -lcrtend -o Output/$*.noopt-llvm
-
-$(PROGRAMS_TO_TEST:%=Output/%.noopt-llvm): \
-Output/%.noopt-llvm: Output/%.linked.rbc $(LGCCLDPROG)
-	$(LGCCLD) -disable-opt $(STATS) $< -lc $(LIBS) -lcrtend -o Output/$*.noopt-llvm
 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
+Output/gccas-pass-args: $(LGCCAS)
 	$(LGCCAS) /dev/null -o /dev/null -debug-pass=Arguments > $@.1 2>&1
 	sed 's/Pass Arguments: //' < $@.1 > $@
-Output/gccld-pass-args: $(LGCCLDPROG) Output/.dir
+Output/gccld-pass-args: $(LGCCLDPROG)
 	$(LLVMAS) < /dev/null > Output/gccld.test.bc
-	$(LGCCLD) Output/gccld.test.bc -o Output/gccld.test-out -debug-pass=Arguments > $@.1 2>&1
+	$(LGCCLD) -disable-inlining Output/gccld.test.bc -o Output/gccld.test-out -debug-pass=Arguments > $@.1 2>&1
 	sed 's/Pass Arguments: //' < $@.1 > $@
 
-# If the program requires exception handling support, enable (potentially
-# expensive) support for it.
-ifdef REQUIRES_EH_SUPPORT
-LLCFLAGS += -enable-correct-eh-support
-endif
 
 #
 # Rules to compile the program for the C Back End
 #
 $(PROGRAMS_TO_TEST:%=Output/%.cbe.c): \
-Output/%.cbe.c: Output/%.llvm.bc $(LLC)
-	-$(LLC) $(LLCFLAGS) -march=c $< -o $@ -f
+Output/%.cbe.c: Output/%.llvm.bc $(LDIS)
+	-$(LDIS) -c < $< > $@
 
 $(PROGRAMS_TO_TEST:%=Output/%.cbe): \
 Output/%.cbe: Output/%.cbe.c
@@ -302,13 +281,7 @@
 
 LLI_OPTS = -force-interpreter=true $(EXTRA_LLI_OPTS)
 JIT_OPTS = -force-interpreter=false $(EXTRA_LLI_OPTS)
-
-
-# If the program requires exception handling support, enable (potentially
-# expensive) support for it.
-ifdef REQUIRES_EH_SUPPORT
-JIT_OPTS += -enable-correct-eh-support
-endif
+JIT_LS_OPTS = -force-interpreter=false -regalloc=linearscan $(EXTRA_LLI_OPTS)
 
 native: $(PROGRAMS_TO_TEST:%=Output/%.native)
 stripped-bytecode:: $(PROGRAMS_TO_TEST:%=Output/%.llvm.stripped.bc)
@@ -335,7 +308,7 @@
 
 $(PROGRAMS_TO_TEST:%=Output/%.out-jit-ls): \
 Output/%.out-jit-ls: Output/%.llvm.bc $(LLI)
-	-$(RUNSAFELY) $(STDIN_FILENAME) $@ $(LLI) -regalloc=linearscan $(JIT_OPTS) $< $(RUN_OPTIONS)
+	-$(RUNSAFELY) $(STDIN_FILENAME) $@ $(LLI) $(JIT_LS_OPTS) $< $(RUN_OPTIONS)
 ifdef PROGRAM_REQUIRED_TO_EXIT_OK
 	@if test \! -f $@.exitok; then echo "TEST (jit-ls): $* FAILED!"; rm -f $@; fi
 endif
@@ -359,12 +332,12 @@
 
 # Rules to bugpoint the GCCAS, GCCLD, LLC, or LLI commands...
 $(PROGRAMS_TO_TEST:%=Output/%.bugpoint-gccas): \
-Output/%.bugpoint-gccas: Output/%.noopt-llvm.bc $(LBUGPOINT) \
+Output/%.bugpoint-gccas: Output/%.linked.rll $(LBUGPOINT) \
                          Output/gccas-pass-args Output/%.out-nat
 	$(LBUGPOINT) $< `cat Output/gccas-pass-args` $(BUGPOINT_OPTIONS)
 
 $(PROGRAMS_TO_TEST:%=Output/%.bugpoint-gccld): \
-Output/%.bugpoint-gccld: Output/%.noopt-llvm.bc $(LBUGPOINT) \
+Output/%.bugpoint-gccld: Output/%.linked.bc $(LBUGPOINT) \
                          Output/gccld-pass-args Output/%.out-nat
 	$(LBUGPOINT) $< `cat Output/gccld-pass-args` $(BUGPOINT_OPTIONS)
 
@@ -376,32 +349,8 @@
 Output/%.bugpoint-jit: Output/%.llvm.bc $(LBUGPOINT) Output/%.out-nat
 	$(LBUGPOINT) $< -run-jit $(BUGPOINT_OPTIONS)
 
-
-LIBPROFILESO = $(LEVEL)/lib/Debug/libprofile_rt.so
-
-$(PROGRAMS_TO_TEST:%=Output/%.prof): \
-Output/%.prof: Output/%.llvm-prof.bc Output/%.out-nat $(LIBPROFILESO)
-	@rm -f $@
-	-$(RUNSAFELY) $(STDIN_FILENAME) Output/$*.out-prof $(LLI) $(JIT_OPTS) \
-            -fake-argv0 'Output/$*.llvm.bc' -load $(LIBPROFILESO) $< -llvmprof-output $@ $(RUN_OPTIONS)
-	@cmp -s Output/$*.out-prof Output/$*.out-nat || \
-		printf "***\n***\n*** WARNING: Output of profiled program (Output/$*.out-prof)\n*** doesn't match the output of the native program (Output/$*.out-nat)!\n***\n***\n";
-
 endif
 
-
-#
-# Rules to generate profiling information
-#
-$(PROGRAMS_TO_TEST:%=Output/%.llvm-prof.bc): \
-Output/%.llvm-prof.bc: Output/%.llvm.bc
-	$(LOPT) -insert-block-profiling $< -o $@ -f
-
-$(PROGRAMS_TO_TEST:%=Output/%.printprof): \
-Output/%.printprof: Output/%.llvm.bc Output/%.prof $(LPROF)
-	$(LPROF) $< Output/$*.prof
-
-
 #
 # Rules to diff test output...
 #
@@ -529,9 +478,9 @@
 TestMakefile := $(wildcard $(LEVEL)/test/Programs/TEST.$(TEST).Makefile) \
                 $(wildcard $(LEVEL)/projects/*/test/TEST.$(TEST).Makefile)
 TestReport   := $(wildcard $(LEVEL)/test/Programs/TEST.$(TEST).report) \
-                $(wildcard $(BUILD_SRC_ROOT)/projects/*/test/TEST.$(TEST).report)
+                $(wildcard $(LEVEL)/projects/*/test/TEST.$(TEST).report)
 TestGnuPlot  := $(wildcard $(LEVEL)/test/Programs/TEST.$(TEST).gnuplot) \
-                $(wildcard $(BUILD_SRC_ROOT)/projects/*/test/TEST.$(TEST).gnuplot)
+                $(wildcard $(LEVEL)/projects/*/test/TEST.$(TEST).gnuplot)
 ifneq ($(strip $(TestMakefile)),)
 -include $(TestMakefile)
 else
diff --git a/MultiSource/Applications/d/Makefile b/MultiSource/Applications/d/Makefile
index 4186346..54edadf 100644
--- a/MultiSource/Applications/d/Makefile
+++ b/MultiSource/Applications/d/Makefile
@@ -1,6 +1,6 @@
 LEVEL = ../../../../..
 PROG = make_dparser
-Sources=make_dparser.c write_ctables.c gram.c lex.c lr.c arg.c parse.c scan.c symtab.c util.c grammar.g.c
+Sources=make_dparser.c write_ctables.c gram.c lex.c lr.c arg.c parse.c scan.c symtab.c util.c
 CPPFLAGS =  -DD_BUILD_VERSION=5725
 RUN_OPTIONS="-v $(BUILD_SRC_DIR)/grammar.g"
 include ../../Makefile.multisrc
diff --git a/MultiSource/Applications/d/grammar.g b/MultiSource/Applications/d/grammar.g
new file mode 100644
index 0000000..8c72104
--- /dev/null
+++ b/MultiSource/Applications/d/grammar.g
@@ -0,0 +1,185 @@
+/*
+ Grammar Grammar
+*/
+{
+#include "gramgram.h"
+#include "d.h"
+}
+
+grammar: global_code* (production global_code*)+;
+
+global_code: curly_code { 
+	      add_global_code($g, $n0.start_loc.s+1, $n0.end-1, 
+	        $n0.start_loc.line); 
+            }
+	    | '${scanner' balanced_code+ '}' {
+	      $g->scanner.code = dup_str($n1.start_loc.s, $n1.end);
+	      $g->scanner.line = $n0.start_loc.line;
+	    }
+	    | '${declare' declarationtype identifier* '}' {
+	      if (!d_get_number_of_children(&$n2))
+	      	add_declaration($g, $n2.start_loc.s, $n2.end,  $1.kind, $n2.start_loc.line);
+              else {
+	        int i, n = d_get_number_of_children(&$n2);
+		for (i = 0; i < n; i++) {
+		  D_ParseNode *pn = d_get_child(&$n2, i);
+		  add_declaration($g, pn->start_loc.s, pn->end,  $1.kind, pn->start_loc.line);
+		}
+	      }
+	    }
+	    | '${token' token_identifier+ '}'
+	    | '${action}' { $g->action_index++; }
+	    | '${pass' identifier pass_types '}' {
+	      add_pass($g, $n1.start_loc.s, $n1.end,  $2.kind, $n1.start_loc.line);
+	    }
+	    ;
+
+pass_types: 
+	  | pass_type pass_types { $$.kind = $0.kind | $1.kind; }
+	  ;
+
+pass_type : 'preorder' { $$.kind |= D_PASS_PRE_ORDER; } 
+	  | 'postorder' { $$.kind |= D_PASS_POST_ORDER; }
+	  | 'manual' { $$.kind |= D_PASS_MANUAL; }
+	  | 'for_all'  { $$.kind |= D_PASS_FOR_ALL; }
+	  | 'for_undefined' { $$.kind |= D_PASS_FOR_UNDEFINED; }
+	  ;
+
+declarationtype: 'tokenize' { $$.kind = DECLARE_TOKENIZE; } 
+               | 'longest_match' { $$.kind = DECLARE_LONGEST_MATCH; }
+               | 'whitespace' { $$.kind = DECLARE_WHITESPACE; }
+               | 'all_matches' { $$.kind = DECLARE_ALL_MATCHES; }
+	       | 'set_op_priority_from_rule' { $$.kind = DECLARE_SET_OP_PRIORITY; }
+               | 'all_subparsers' { $$.kind = DECLARE_STATES_FOR_ALL_NTERMS; }
+               | 'subparser' { $$.kind = DECLARE_STATE_FOR; }
+               | 'save_parse_tree' { $$.kind = DECLARE_SAVE_PARSE_TREE; }
+	       ;
+
+token_identifier: identifier { new_token($g, $n0.start_loc.s, $n0.end); };
+
+production : production_name ':' rules ';' 
+           | production_name regex_production rules ';'
+           | ';';
+regex_production : '::=' { $g->p->regex = 1; };
+
+production_name : (identifier | '_')
+		{ $g->p = new_production($g, dup_str($n0.start_loc.s, $n0.end)); }
+                ;
+
+rules : rule ('|' rule)*; 
+
+rule : new_rule ((element element_modifier*)* simple_element element_modifier*)? rule_modifier* rule_code {
+  vec_add(&$g->p->rules, $g->r);
+};
+
+new_rule : { $g->r = new_rule($g, $g->p); };
+
+simple_element
+   : string { $g->e = new_string($g, $n0.start_loc.s, $n0.end, $g->r); }
+   | regex { $g->e = new_string($g, $n0.start_loc.s, $n0.end, $g->r); }
+   | identifier { $g->e = new_ident($n0.start_loc.s, $n0.end, $g->r); }
+   | '${scan' balanced_code+ '}' { $g->e = new_code($g, $n1.start_loc.s, $n1.end, $g->r); }
+   | '(' new_subrule rules ')' {
+     $g->e = new_elem_nterm($g->p, $1.r);
+     $g->p = $1.p;
+     $g->r = $1.r;
+     vec_add(&$g->r->elems, $g->e);
+   }
+   ;
+
+element
+   : simple_element
+   | bracket_code {
+     Production *p = new_internal_production($g, NULL);
+     Rule *r = new_rule($g, p);
+     vec_add(&p->rules, r);
+     r->speculative_code.code = dup_str($n0.start_loc.s + 1, $n0.end - 1);
+     r->speculative_code.line = $n0.start_loc.line;
+     $g->e = new_elem_nterm(p, $g->r);
+     vec_add(&$g->r->elems, $g->e);
+   }
+   | curly_code {
+     Production *p = new_internal_production($g, NULL);
+     Rule *r = new_rule($g, p);
+     vec_add(&p->rules, r);
+     r->final_code.code = dup_str($n0.start_loc.s + 1, $n0.end - 1);
+     r->final_code.line = $n0.start_loc.line;
+     $g->e = new_elem_nterm(p, $g->r);
+     vec_add(&$g->r->elems, $g->e);
+   }
+   ;
+
+new_subrule : {
+  $$.p = $g->p;
+  $$.r = $g->r;
+  $g->p = new_internal_production($g, $g->p);
+  $g->r = new_rule($g, $g->p);
+};
+
+element_modifier 
+: '$term' integer { 
+  if ($g->e->kind != ELEM_TERM) 
+    d_fail("terminal priority on non-terminal");
+  $g->e->e.term->term_priority = strtol($n1.start_loc.s, NULL, 0); 
+}
+| '/i' { 
+  if ($g->e->kind != ELEM_TERM) 
+    d_fail("ignore-case (/i) on non-terminal");
+  $g->e->e.term->ignore_case = 1; 
+}
+| '?' { conditional_EBNF($g); }
+| '*' { star_EBNF($g); }
+| '+' { plus_EBNF($g); } ;
+
+rule_modifier : rule_assoc rule_priority;
+
+rule_assoc
+	: '$unary_op_right' { $g->r->op_assoc = ASSOC_UNARY_RIGHT; }
+	| '$unary_op_left' { $g->r->op_assoc = ASSOC_UNARY_LEFT; }
+	| '$binary_op_right' { $g->r->op_assoc = ASSOC_BINARY_RIGHT; }
+	| '$binary_op_left' { $g->r->op_assoc = ASSOC_BINARY_LEFT; }
+	| '$unary_right' { $g->r->rule_assoc = ASSOC_UNARY_RIGHT; }
+	| '$unary_left' { $g->r->rule_assoc = ASSOC_UNARY_LEFT; }
+	| '$binary_right' { $g->r->rule_assoc = ASSOC_BINARY_RIGHT; }
+	| '$binary_left' { $g->r->rule_assoc = ASSOC_BINARY_LEFT; }
+	| '$right' { $g->r->rule_assoc = ASSOC_NARY_RIGHT; }
+	| '$left' { $g->r->rule_assoc = ASSOC_NARY_LEFT; }
+	;
+
+rule_priority : integer { 
+  if ($g->r->op_assoc) $g->r->op_priority = strtol($n0.start_loc.s, NULL, 0); 
+  else $g->r->rule_priority = strtol($n0.start_loc.s, NULL, 0); 
+};
+
+rule_code : speculative_code? final_code? pass_code* ;
+
+speculative_code : bracket_code {
+  $g->r->speculative_code.code = dup_str($n0.start_loc.s + 1, $n0.end - 1);
+  $g->r->speculative_code.line = $n0.start_loc.line;
+};
+
+final_code : curly_code {
+  $g->r->final_code.code = dup_str($n0.start_loc.s + 1, $n0.end - 1);
+  $g->r->final_code.line = $n0.start_loc.line;
+};
+
+pass_code : identifier ':' curly_code {
+  add_pass_code($g, $g->r, $n0.start_loc.s, $n0.end, $n2.start_loc.s+1,
+    $n2.end-1, $n0.start_loc.line, $n2.start_loc.line);
+};
+
+curly_code: '{' balanced_code* '}';
+bracket_code: '[' balanced_code* ']';
+balanced_code : '(' balanced_code* ')' 
+	      | '[' balanced_code* ']'
+	      | '{' balanced_code* '}'
+	      | string | identifier | regex | integer | symbols;
+symbols : "[!~`@#$%^&*\-_+=|:;\\<,>.?/]";
+string: "'([^'\\]|\\[^])*'";
+regex: "\"([^\"\\]|\\[^])*\"";
+identifier: "[a-zA-Z_][a-zA-Z_0-9]*" $term -1;
+integer: decimalint | hexint | octalint;
+decimalint: "-?[1-9][0-9]*[uUlL]?";
+hexint: "-?(0x|0X)[0-9a-fA-F]+[uUlL]?";
+octalint: "-?0[0-7]*[uUlL]?";
+
diff --git a/MultiSource/Applications/lambda-0.1.3/Makefile b/MultiSource/Applications/lambda-0.1.3/Makefile
index cc21efa..419a597 100644
--- a/MultiSource/Applications/lambda-0.1.3/Makefile
+++ b/MultiSource/Applications/lambda-0.1.3/Makefile
@@ -1,6 +1,6 @@
 LEVEL = ../../../../..
 PROG = lambda
-LDFLAGS += -lstdc++
-LIBS += -lstdc++
+LDFLAGS = -lsupc++
+LIBS += -lsupc++
 STDIN_FILENAME=$(BUILD_SRC_DIR)/input
 include ../../Makefile.multisrc
diff --git a/MultiSource/Benchmarks/Makefile b/MultiSource/Benchmarks/Makefile
index f447b87..5fe2071 100644
--- a/MultiSource/Benchmarks/Makefile
+++ b/MultiSource/Benchmarks/Makefile
@@ -3,7 +3,7 @@
 LEVEL = ../../../..
 include $(LEVEL)/Makefile.config
 
-PARALLEL_DIRS := Fhourstones McCat Olden OptimizerEval Ptrdist llubenchmark sim FreeBench MallocBench
+PARALLEL_DIRS := Fhourstones McCat Olden OptimizerEval Ptrdist llubenchmark sim FreeBench
 
 
 include $(LEVEL)/test/Programs/Makefile.programs
diff --git a/MultiSource/Makefile.multisrc b/MultiSource/Makefile.multisrc
index f78a7cb..8ac7502 100644
--- a/MultiSource/Makefile.multisrc
+++ b/MultiSource/Makefile.multisrc
@@ -15,7 +15,7 @@
 
 ## LLVM bytecode libraries that must be linked with an application
 # FIXME: LIBS SHOULD BE SPECIFIED
-LIBS += -lm
+LIBS = -lm
 
 include $(LEVEL)/test/Programs/Makefile.programs
 
@@ -42,24 +42,19 @@
 bugpoint-jit:   Output/$(PROG).bugpoint-jit
 bugpoint-llc:   Output/$(PROG).bugpoint-llc
 
-# Raw bytecode files are files created by simply assembling the output of the
-# GCC frontend, without running any optimizations.
+# Raw bytecode files are files created by simply linking the output of the GCC
+# frontend without running gccas.
 #
-Output/%.rbc: Output/%.ll $(LGCCAS)
-	$(LGCCAS) -disable-opt $< -o $@
+Output/%.rbc: Output/%.ll $(LLVMAS)
+	$(LLVMAS) -f $< -o - | $(LOPT) -f -q -funcresolve -o $@
 
 ifndef USE_PRECOMPILED_BYTECODE
 
-$(PROGRAMS_TO_TEST:%=Output/%.linked.rbc): \
-Output/%.linked.rbc: $(LObjects) $(LGCCLDPROG)
-	$(LGCCLDPROG) -link-as-library -disable-opt $(LObjects) -o $@
-
 # Output/*.linked.ll is all of the bytecode files of the program linked together
 # without any libraries linked in...
 #
-$(PROGRAMS_TO_TEST:%=Output/%.linked.rll): \
-Output/%.linked.rll: Output/%.linked.rbc $(LDIS)
-	$(LDIS) $< -o $@ -f
+Output/%.linked.rll: $(LObjects) $(LLINK) $(LOPT) $(LDIS)
+	$(LLINK) -f $(LObjects) | $(LOPT) -funcresolve -deadtypeelim -q | $(LDIS) > $@
 
 $(PROGRAMS_TO_TEST:%=Output/%.LOC.txt): \
 Output/%.LOC.txt: $(Source)
diff --git a/SingleSource/Benchmarks/Shootout-C++/Makefile b/SingleSource/Benchmarks/Shootout-C++/Makefile
index b4fb577..f338ce6 100755
--- a/SingleSource/Benchmarks/Shootout-C++/Makefile
+++ b/SingleSource/Benchmarks/Shootout-C++/Makefile
@@ -3,6 +3,5 @@
 CPPFLAGS += -Wno-deprecated
 LDFLAGS += -lm
 LIBS += -lstdc++
-REQUIRES_EH_SUPPORT=1
 
 include $(LEVEL)/test/Programs/SingleSource/Makefile.singlesrc
diff --git a/SingleSource/Benchmarks/Stanford/RealMM.c b/SingleSource/Benchmarks/Stanford/RealMM.c
index 4266e60..d8752a6 100644
--- a/SingleSource/Benchmarks/Stanford/RealMM.c
+++ b/SingleSource/Benchmarks/Stanford/RealMM.c
@@ -1,8 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#define float double
-
 #define  nil		0
 #define	 false		0
 #define  true		1
@@ -150,7 +148,7 @@
     for ( i = 1; i <= rowsize; i++ )
 		for ( j = 1; j <= rowsize; j++ ) 
 			rInnerproduct(&rmr[i][j],rma,rmb,i,j);
-	printf("%f\n", rmr[run + 1][run + 1]);
+	printf("%d\n", rmr[run + 1][run + 1]);
 }
 
 int main()
diff --git a/SingleSource/CustomChecked/Makefile b/SingleSource/CustomChecked/Makefile
index 8a66450..d8fcd1f 100644
--- a/SingleSource/CustomChecked/Makefile
+++ b/SingleSource/CustomChecked/Makefile
@@ -6,7 +6,7 @@
 
 include $(LEVEL)/test/Programs/SingleSource/Makefile.singlesrc
 
-LIBS += -lstdc++
+LIBS += -lsupc++
 LDFLAGS += -lm
 
 LLI_RUN  := $(addsuffix .run-lli, $(PREFIXED_PROGRAMS_TO_TEST))
diff --git a/SingleSource/Regression/C++/EH/Makefile b/SingleSource/Regression/C++/EH/Makefile
index 3e98881..5310dbc 100644
--- a/SingleSource/Regression/C++/EH/Makefile
+++ b/SingleSource/Regression/C++/EH/Makefile
@@ -1,7 +1,5 @@
 LEVEL = ../../../../../..
-REQUIRES_EH_SUPPORT = 1
-
 include $(LEVEL)/test/Programs/SingleSource/Makefile.singlesrc
 CFLAGS += -std=c99
-LIBS = -lstdc++
+LIBS = -lsupc++
 
diff --git a/SingleSource/Regression/C/2004-01-01-UnknownInitSize.c b/SingleSource/Regression/C/2004-01-01-UnknownInitSize.c
new file mode 100644
index 0000000..8097258
--- /dev/null
+++ b/SingleSource/Regression/C/2004-01-01-UnknownInitSize.c
@@ -0,0 +1,25 @@
+/*
+ * This regression test ensures that the C front end can compile initializers
+ * correctly when their size is not static.
+ */
+struct one
+{
+  int a;
+  int values [];
+};
+
+struct one hobbit = {5, {1, 2, 3}};
+
+int
+main ()
+{
+  int index;
+
+  for (index=0; index < 3; index++)
+  {
+    printf ("%d\n", hobbit.values[index]);
+  }
+
+  return 0;
+}
+
diff --git a/SingleSource/Regression/C/casts.c b/SingleSource/Regression/C/casts.c
index 4c4aba7..db941f1 100644
--- a/SingleSource/Regression/C/casts.c
+++ b/SingleSource/Regression/C/casts.c
@@ -5,10 +5,6 @@
 #include <inttypes.h>
 
 
-static int64_t lls[] = {
-  123ULL, -1LL, -14LL, 14, 1ULL << 63, 0
-};
-
 int
 main(int argc, char** argv)
 {
@@ -18,7 +14,7 @@
   short         S, s1;
   unsigned short us1;
 
-  int           i1, i;
+  int           i1;
   unsigned      ui1;
 
   int64_t       L, l1;
@@ -126,11 +122,5 @@
   printf("double to uint   ui1 = %u\t\t(0x%x)\n", ui1, ui1);
   printf("double to ulong  ul1 = %lu\t\t(0x%lx)\n", ul1, ul1);
 
-  for (i = 0; lls[i]; ++i) {
-    printf("double <- long long %lld = %f\n", lls[i], (double)lls[i]);
-    printf("double <- unsigned long long %llu = %f\n",
-           (unsigned long long)lls[i], (double)(unsigned long long)lls[i]);
-  }
-
   return 0;
 }
diff --git a/SingleSource/UnitTests/SetjmpLongjmp/C++Catch.cpp b/SingleSource/UnitTests/SetjmpLongjmp/C++Catch.cpp
new file mode 100644
index 0000000..730087d
--- /dev/null
+++ b/SingleSource/UnitTests/SetjmpLongjmp/C++Catch.cpp
@@ -0,0 +1,30 @@
+#include <cstdio>
+#include <csetjmp>
+
+class C {
+  const char *name;
+public:
+  C(const char *n) : name(n) {}
+  ~C() { printf("Destroying C in function %s\n", name); }
+};
+
+jmp_buf buf;
+
+void foo()
+{
+  C Obj("foo");
+  printf("Longjmping from foo() function\n");
+  longjmp(buf, 37);
+}
+
+int main()
+{
+  try {
+    C Obj("main");
+    if (!setjmp(buf)) foo();
+    printf("longjmp throw NOT caught in catch(...) block\n");
+  } catch(...) {
+    printf("Caught longjmp throw in catch(...) block\n");
+  }
+}
+
diff --git a/SingleSource/UnitTests/SetjmpLongjmp/FarJump.c b/SingleSource/UnitTests/SetjmpLongjmp/FarJump.c
new file mode 100644
index 0000000..72fa714
--- /dev/null
+++ b/SingleSource/UnitTests/SetjmpLongjmp/FarJump.c
@@ -0,0 +1,61 @@
+/*
+ * This tests that longjmp can jump from a function far down in the
+ * calling chain and past other, non-accepting setjmps.
+ */
+#include <setjmp.h>
+#include <stdio.h>
+
+void quux(jmp_buf buf)
+{
+  printf("Inside quux\n");
+  printf("Longjmping from quux: 927\n");
+  longjmp(buf, 927);
+}
+
+void qux(jmp_buf buf)
+{
+  jmp_buf local_buf;
+
+  printf("Inside qux\n");
+
+  if (!setjmp(local_buf))
+    quux(buf);
+  else
+    printf("Error: Shouldn't be here in qux\n");
+}
+
+void baz(jmp_buf buf)
+{
+  jmp_buf local_buf;
+
+  printf("Inside baz\n");
+
+  if (!setjmp(local_buf))
+    qux(buf);
+  else
+    printf("Error: Shouldn't be here in baz\n");
+}
+
+void bar(jmp_buf buf)
+{
+  printf("Inside bar\n");
+  baz(buf);
+}
+
+void foo()
+{
+  jmp_buf buf;
+
+  printf("Inside foo\n");
+
+  if (!setjmp(buf))
+    bar(buf);
+  else
+    printf("Returning from longjmp into foo\n");
+}
+
+int main()
+{
+  foo();
+  return 0;
+}
diff --git a/SingleSource/UnitTests/SetjmpLongjmp/Looping.c b/SingleSource/UnitTests/SetjmpLongjmp/Looping.c
new file mode 100644
index 0000000..0ee74bf
--- /dev/null
+++ b/SingleSource/UnitTests/SetjmpLongjmp/Looping.c
@@ -0,0 +1,15 @@
+#include <setjmp.h>
+#include <stdio.h>
+
+int main()
+{
+  jmp_buf buf;
+  volatile unsigned i = 0;
+
+  if (setjmp(buf) < 10) {
+    printf("i == %u\n", i);
+    longjmp(buf, ++i);
+  }
+
+  return 0;
+}
diff --git a/SingleSource/UnitTests/SetjmpLongjmp/Makefile b/SingleSource/UnitTests/SetjmpLongjmp/Makefile
index 45abec3..0e39e32 100644
--- a/SingleSource/UnitTests/SetjmpLongjmp/Makefile
+++ b/SingleSource/UnitTests/SetjmpLongjmp/Makefile
@@ -1,6 +1,5 @@
 # Programs/SingleSource/UnitTests/SetjmpLongjmp/Makefile
 
-DIRS = C C++
 LEVEL = ../../../../..
 include $(LEVEL)/test/Programs/SingleSource/Makefile.singlesrc
 
diff --git a/SingleSource/UnitTests/SetjmpLongjmp/MultipleSetjmp.c b/SingleSource/UnitTests/SetjmpLongjmp/MultipleSetjmp.c
new file mode 100644
index 0000000..97ee2a9
--- /dev/null
+++ b/SingleSource/UnitTests/SetjmpLongjmp/MultipleSetjmp.c
@@ -0,0 +1,26 @@
+#include <setjmp.h>
+#include <stdio.h>
+
+int bar(jmp_buf buf, int i)
+{
+  printf("Inside bar %d\n", i);
+  longjmp(buf, i);
+}
+
+int main()
+{
+  jmp_buf buf;
+  int ret;
+
+  if ((ret = setjmp(buf)) != 0) {
+    printf("returning from bar == %d\n", ret);
+
+    if ((ret = setjmp(buf)) != 0) {
+      printf("returning from bar == %d\n", ret);
+    } else {
+      bar(buf, 927);
+    }
+  } else {
+    bar(buf, 37);
+  }
+}
diff --git a/SingleSource/UnitTests/SetjmpLongjmp/SimpleC++Test.cpp b/SingleSource/UnitTests/SetjmpLongjmp/SimpleC++Test.cpp
new file mode 100644
index 0000000..12e3889
--- /dev/null
+++ b/SingleSource/UnitTests/SetjmpLongjmp/SimpleC++Test.cpp
@@ -0,0 +1,36 @@
+#include <csetjmp>
+#include <cstdio>
+
+class C {
+  const char *name;
+public:
+  C(const char *n) : name(n) {}
+  ~C() { printf("Destroying C object in %s\n", name); }
+};
+
+void bar(jmp_buf buf)
+{
+  printf("Inside bar\n");
+  longjmp(buf, 37);
+}
+
+void foo(jmp_buf buf)
+{
+  C Obj("foo");
+  bar(buf);
+}
+
+int main()
+{
+  C Obj("main");
+  jmp_buf buf;
+  int ret;
+
+  printf("Inside main\n");
+
+  if ((ret = setjmp(buf)) != 0) {
+    printf("ret == %d\n", ret);
+  } else {
+    foo(buf);
+  }
+}
diff --git a/SingleSource/UnitTests/SetjmpLongjmp/SimpleCTest.c b/SingleSource/UnitTests/SetjmpLongjmp/SimpleCTest.c
new file mode 100644
index 0000000..bc9bfd9
--- /dev/null
+++ b/SingleSource/UnitTests/SetjmpLongjmp/SimpleCTest.c
@@ -0,0 +1,23 @@
+#include <setjmp.h>
+
+void baz(jmp_buf buf)
+{
+  printf("Inside baz\n");
+  longjmp(buf, 37);
+}
+
+int main()
+{
+  jmp_buf buf;
+  int ret;
+
+  printf("Inside main\n");
+
+  if ((ret = setjmp(buf)) != 0) {
+    printf("ret == %d\n", ret);
+  } else {
+    baz(buf);
+  }
+
+  return 0;
+}
diff --git a/SingleSource/UnitTests/SetjmpLongjmp/WhileLoop.c b/SingleSource/UnitTests/SetjmpLongjmp/WhileLoop.c
new file mode 100644
index 0000000..b72d5cc
--- /dev/null
+++ b/SingleSource/UnitTests/SetjmpLongjmp/WhileLoop.c
@@ -0,0 +1,24 @@
+#include <setjmp.h>
+#include <stdio.h>
+
+void foo(jmp_buf buf, int i)
+{
+  printf("Inside foo: %d\n", i);
+  longjmp(buf, i);
+}
+
+int main()
+{
+  int i = 37;
+
+  while (i--) {
+    jmp_buf buf;
+    int ret;
+
+    if ((ret = setjmp(buf)) != 0) {
+      printf("Return from longjmp: %d\n", ret);
+    } else {
+      foo(buf, i);
+    }
+  }
+}
diff --git a/TEST.jit.report b/TEST.jit.report
index 90c8dca..c46acca 100644
--- a/TEST.jit.report
+++ b/TEST.jit.report
@@ -33,8 +33,8 @@
  ["#Glob"   , '([0-9]+).*Number of bytes of global vars'],
  [],
 # Number of transformations
- ["#store" , '([0-9]+).*Number of stores added'],
- ["#load"  , '([0-9]+).*Number of loads added'],
+ ["#spill" , '([0-9]+).*Number of registers spilled'],
+ ["#reload", '([0-9]+).*Number of registers reloaded'],
  ["#fp"    , '([0-9]+).*Number of floating point instructions'],
  ["#fxch"  , '([0-9]+).*Number of fxch instructions inserted'],
  []
diff --git a/TEST.llc.Makefile b/TEST.llc.Makefile
index cdb5d64..ec1ff85 100644
--- a/TEST.llc.Makefile
+++ b/TEST.llc.Makefile
@@ -22,6 +22,6 @@
 	@echo "---------------------------------------------------------------"
 	@cat $<
 
-# Define REPORT_DEPENDENCIES so that the report is regenerated if llc changes
+# Define REPORT_DEPENDENCIES so that the report is regenerated if lli changes
 #
 REPORT_DEPENDENCIES := $(LLC)
diff --git a/TEST.llc.report b/TEST.llc.report
index f9839bd..61e7c74 100644
--- a/TEST.llc.report
+++ b/TEST.llc.report
@@ -36,14 +36,11 @@
  [],
 # Sizes
  ["#MCInsts", '([0-9]+).*Number of machine instrs printed'],
- ["#IntOrig", '([0-9]+).*Number of original intervals'],
- ["#IntCoal", '([0-9]+).*Number of intervals after coalescing'],
+ ["#Int"   ,  '([0-9]+).*Number of intervals'],
  [],
 # Number of transformations
- ["#store" , '([0-9]+).*Number of stores added'],
- ["#load"  , '([0-9]+).*Number of loads added'],
- ["#fold"  , '([0-9]+).*Number of loads/stores folded into instructions'],
- ["#spill" , '([0-9]+).*Number of register spills'],
+ ["#spill" , '([0-9]+).*Number of registers spilled'],
+ ["#reload", '([0-9]+).*Number of registers reloaded'],
  ["#fp"    , '([0-9]+).*Number of floating point instructions'],
  ["#fxch"  , '([0-9]+).*Number of fxch instructions inserted'],
  ["#i-mov" , '([0-9]+).*Number of identity moves eliminated'],
diff --git a/TEST.micro.Makefile b/TEST.micro.Makefile
new file mode 100644
index 0000000..c647eef
--- /dev/null
+++ b/TEST.micro.Makefile
@@ -0,0 +1,37 @@
+##===- test/Programs/TEST.micro.Makefile -------------------*- Makefile -*-===##
+#
+#
+##===----------------------------------------------------------------------===##
+
+#JIT_OPTS = -force-interpreter=false -stats -time-passes
+CURDIR  := $(shell cd .; pwd)
+PROGDIR := $(shell cd $(LEVEL)/test/Programs; pwd)/
+RELDIR  := $(subst $(PROGDIR),,$(CURDIR))
+
+TIMEOPT = -time-passes -stats -info-output-file=$(CURDIR)/$@.info
+EXTRA_LLI_OPTS = $(TIMEOPT)
+
+$(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \
+Output/%.$(TEST).report.txt: Output/%.llvm.bc Output/%.LOC.txt Output/%.out-nat Output/%.out-jit Output/%.llc $(LLI) $(LOPT)
+	@echo -n "LOC: " > $@
+	-@cat Output/$*.LOC.txt >> $@
+	@echo -n "LLC SIZE: " >> $@
+	-@wc -c Output/$*.llc >> $@
+	@echo >> $@
+	@echo -n "NAT TIME: " >> $@
+	-@grep real Output/$*.out-nat.time >> $@
+	@echo -n "JIT TIME: " >> $@
+	-@grep real Output/$*.out-jit.time >> $@
+	-@cat Output/$*.out-jit.info >> $@
+	$(LOPT) -strip -stats -o /dev/null -f $< >> $@ 2>&1
+
+$(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
+test.$(TEST).%: Output/%.$(TEST).report.txt
+	@echo "---------------------------------------------------------------"
+	@echo ">>> ========= '$(RELDIR)/$*' Program"
+	@echo "---------------------------------------------------------------"
+	@cat $<
+
+# Define REPORT_DEPENDENCIES so that the report is regenerated if lli changes
+#
+REPORT_DEPENDENCIES := $(LLI) $(LOPT)
diff --git a/TEST.micro.report b/TEST.micro.report
new file mode 100644
index 0000000..f5cfebe
--- /dev/null
+++ b/TEST.micro.report
@@ -0,0 +1,161 @@
+##=== TEST.micro.report - Report for the MICRO'03 paper --------*- perl -*-===##
+#
+# This file defines a report to be generated for the micro paper.
+#
+# This report should be generated with the following command:
+#    gmake ENABLE_OPTIMIZED=1 TEST=micro RUNTIMELIMIT=120 LARGE_PROBLEM_SIZE=1 CFLAGS=-O3
+#
+##===----------------------------------------------------------------------===##
+
+# Sort by name
+$SortCol = 4;
+
+## Sort in descending order
+$SortReverse = 1;
+$SortNumeric = 1;
+
+# Helper function
+sub Ratio {
+  my ($Cols, $Col) = @_;
+  if ($Cols->[$Col-1] ne "*" and
+      $Cols->[$Col-1] != "0") {
+    return 0 if ($Cols->[$Col-2] eq "*");
+    return $Cols->[$Col-2]/$Cols->[$Col-1];
+  } else {
+    return "n/a";
+  }
+}
+sub InvRatio {
+  my ($Cols, $Col) = @_;
+  if ($Cols->[$Col-2] ne "*" and
+      $Cols->[$Col-2] != "0") {
+    return $Cols->[$Col-1]/$Cols->[$Col-2];
+  } else {
+    return "n/a";
+  }
+}
+
+sub LLVMRatio {
+  my ($Cols, $Col) = @_;
+  if ($Cols->[5] ne "*") {
+    return $Cols->[5]*1733333333/$Cols->[10];
+  } else {
+    return "n/a";
+  }
+}
+
+sub FormatSize {
+  my $Size = shift;
+  return "*" if ($Size eq "*");
+  if ($Size > 10*1024*1024) {
+    return (int $Size*10 / (1024*1024))/10 . "MB";
+  } elsif ($Size > 10*1024) {
+    return sprintf("%2.1f", $Size / 1024) . "KB";
+  } else {
+    return $Size . "B";
+  }
+}
+
+sub FormatSizeKB {
+  my $Size = shift;
+  return "*" if ($Size eq "*");
+  return sprintf("%2.1f", $Size / 1024);
+}
+
+sub FormatRatio {
+  return sprintf("%0.2f", shift);
+}
+sub FormatRatio2 {
+  return sprintf("%0.3f", shift);
+}
+
+# FormatTime - Convert a time from 1m23.45 into 83.45
+sub FormatTime {
+  my $Time = shift;
+  if ($Time =~ m/([0-9]+)[m:]([0-9.]+)/) {
+    $Time = sprintf("%7.3f", $1*60.0+$2);
+  }
+  return $Time;
+}
+
+
+@LatexColumns = (1, 15, 12,    # LOC, LLC Size, BytecodeSize
+                 10, 9, 11,     # #LLVM Insts, # MachineInsts, Ratio
+                 5, 4, 6);     # JIT Time, Nat Run Time, Ratio
+
+# Specify how to format columns nicely for printing...
+%LatexColumnFormat = (
+                       6 => \&FormatRatio2,
+                      11 => \&FormatRatio,
+                      12 => \&FormatSizeKB,
+                      15 => \&FormatSizeKB,
+                     );
+
+# For latex output, limit benchmarks and rename as appropriate
+@LatexRowMapOrder = (
+            'treeadd'    => 'Olden-treeadd',
+            'bisort'     => 'Olden-bisort',
+            'mst'        => 'Olden-mst',
+            'perimeter'  => 'Olden-perimeter',
+            'health'     => 'Olden-health',
+            'tsp'        => 'Olden-tsp',
+            'power'      => 'Olden-power',
+            'em3d'       => 'Olden-em3d',
+            'voronoi'    => 'Olden-voronoi',
+            'bh'         => 'Olden-bh',
+            '-' => '-',
+            'anagram'    => 'ptrdist-anagram',
+            'ks'         => 'ptrdist-ks',
+            'ft'         => 'ptrdist-ft',
+            'yacr2'      => 'ptrdist-yacr2',
+            'bc'         => 'ptrdist-bc',
+            '-' => '-',
+            '179.art'    => '179.art',
+            '183.equake' => '183.equake',
+            '181.mcf'    => '181.mcf',
+            '256.bzip2'  => '256.bzip2',
+            '164.gzip'   => '164.gzip',
+            '197.parser' => '197.parser',
+            '188.ammp'   => '188.ammp',
+            '175.vpr'    => '175.vpr',
+            '300.twolf'  => '300.twolf',
+            '186.crafty' => '186.crafty',
+            '255.vortex' => '255.vortex',
+            '254.gap'    => '254.gap',
+#            '-' => '-',
+#            'sgefa'      => 'sgefa',
+#            'sim'        => 'sim',
+#            'burg'       => 'burg',
+#            'fhourstones' => 'fhourstones',
+#            'optimizer-eval' => 'optimizer-eval',
+#            'flops' => 'flops',
+#            'llu' => 'llubenchmark'
+           );
+
+
+# These are the columns for the report.  The first entry is the header for the
+# column, the second is the regex to use to match the value.  Empty list create
+# seperators, and closures may be put in for custom processing.
+(
+# Name
+ ["Name:" , '\'.*/([^\']+)\' Program'],
+ ["LOC:"  , 'LOC: *([0-9]+)'],
+ [],
+# Times
+ ["Total"  , 'JIT TIME: real\s*([.0-9m:]+)', \&FormatTime],
+ ["NatTotal", 'NAT TIME: real\s*([.0-9m:]+)', \&FormatTime],
+ ["CodeGen", 'Total Execution Time: ([0-9.]+)'],
+ ["CodeGenRatio", \&InvRatio],
+ [],
+# Sizes
+ ["MCSize"   , '([0-9]+).*Number of bytes of machine code compiled'],
+ ["#MCInsts" , '([0-9]+).*Number of machine instructions emitted'],
+ ["LLVMInsts", '([0-9]+).*Number of instructions'],
+ ["mc/LLVM ratio", \&Ratio],
+ ["BytcdSize", '([0-9]+).*Number of bytecode bytes written'],
+ [],
+ ["Cycle/LLVM", \&LLVMRatio],
+ ["LLC Size", 'LLC SIZE: *([0-9]+)'],
+# Number of transformations
+ []
+);
diff --git a/TEST.nightly.Makefile b/TEST.nightly.Makefile
index e933b21..f3fca77 100644
--- a/TEST.nightly.Makefile
+++ b/TEST.nightly.Makefile
@@ -12,7 +12,7 @@
 
 REPORTS_TO_GEN := compile nat llc cbe jit
 ifdef ENABLE_LINEARSCAN
-REPORTS_TO_GEN += llc-ls jit-ls
+REPORTS_TO_GEN += llc-ls
 endif
 REPORTS_SUFFIX := $(addsuffix .report.txt, $(REPORTS_TO_GEN))
 
@@ -119,23 +119,6 @@
 	  echo "TEST-FAIL: jit $(RELDIR)/$*" >> $@;\
 	fi
 
-# JIT-linearscan tests
-$(PROGRAMS_TO_TEST:%=Output/%.nightly.jit-ls.report.txt): \
-Output/%.nightly.jit-ls.report.txt: Output/%.llvm.bc Output/%.exe-jit-ls $(JIT)
-	@echo > $@
-	-head -n 100 Output/$*.exe-jit-ls >> $@
-	@-if test -f Output/$*.exe-jit-ls; then \
-	  echo "TEST-PASS: jit-ls $(RELDIR)/$*" >> $@;\
-	  $(JIT) $< -o /dev/null -f $(TIMEOPT) >> $@ 2>&1; \
-	  printf "TEST-RESULT-jit-ls: " >> $@;\
-	  grep "Total Execution Time" $@.info >> $@;\
-	  printf "TEST-RESULT-jit-ls-time: " >> $@;\
-	  grep "^real" Output/$*.out-jit-ls.time >> $@;\
-	  echo >> $@;\
-	else  \
-	  echo "TEST-FAIL: jit-ls $(RELDIR)/$*" >> $@;\
-	fi
-
 # Overall tests: just run subordinate tests
 $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \
 Output/%.$(TEST).report.txt: $(addprefix Output/%.nightly., $(REPORTS_SUFFIX))
diff --git a/TEST.nightly.report b/TEST.nightly.report
index 2831f5c..0cfeafd 100644
--- a/TEST.nightly.report
+++ b/TEST.nightly.report
@@ -21,8 +21,8 @@
 
 sub GCCCBERatio {
   my ($Cols, $Col) = @_;
-  my $GCC = $Cols->[$Col-6];
-  my $CBE = $Cols->[$Col-5];
+  my $GCC = $Cols->[$Col-5];
+  my $CBE = $Cols->[$Col-4];
   if ($GCC ne "*" and $CBE ne "*" and $CBE != "0") {
     return sprintf("%3.2f", $GCC/$CBE);
   } else {
@@ -32,8 +32,8 @@
 
 sub GCCLLCRatio {
   my ($Cols, $Col) = @_;
-  my $GCC = $Cols->[$Col-7];
-  my $LLC = $Cols->[$Col-5];
+  my $GCC = $Cols->[$Col-6];
+  my $LLC = $Cols->[$Col-4];
   if ($GCC ne "*" and $LLC ne "*" and $LLC != "0") {
     return sprintf("%3.2f", $GCC/$LLC);
   } else {
@@ -43,8 +43,8 @@
 
 sub GCCLLC_LSRatio {
   my ($Cols, $Col) = @_;
-  my $GCC = $Cols->[$Col-8];
-  my $LLC_LS = $Cols->[$Col-5];
+  my $GCC = $Cols->[$Col-7];
+  my $LLC_LS = $Cols->[$Col-4];
   if ($GCC ne "*" and $LLC_LS ne "*" and $LLC_LS != "0") {
     return sprintf("%3.2f", $GCC/$LLC_LS);
   } else {
@@ -73,7 +73,6 @@
  ["LLC"      , 'TEST-RESULT-llc-time: real\s*([.0-9m:]+)', \&FormatTime],
  ["LLC-LS"   , 'TEST-RESULT-llc-ls-time: real\s*([.0-9m:]+)', \&FormatTime],
  ["JIT"      , 'TEST-RESULT-jit-time: real\s*([.0-9m:]+)', \&FormatTime],
- ["JIT-LS"   , 'TEST-RESULT-jit-ls-time: real\s*([.0-9m:]+)', \&FormatTime],
  ["GCC/CBE"  , \&GCCCBERatio],
  ["GCC/LLC"  , \&GCCLLCRatio],
  ["GCC/LLC-LS"  , \&GCCLLC_LSRatio]
diff --git a/TEST.vtl.Makefile b/TEST.vtl.Makefile
index 04feaa8..35b46a0 100644
--- a/TEST.vtl.Makefile
+++ b/TEST.vtl.Makefile
@@ -1,7 +1,6 @@
-##===- test/Programs/TEST.example.Makefile -----------------*- Makefile -*-===##
+##===- test/Programs/TEST.vtl.Makefile ---------------------*- Makefile -*-===##
 #
-# Example to show a custom test.  This test just prints the size of the bytecode
-# file for each program.
+# Makefile for getting performance metrics using Intel's VTune.
 #
 ##===----------------------------------------------------------------------===##
 
@@ -17,7 +16,7 @@
 P4_EVENTS := "-ec en='2nd Level Cache Read Misses' en='2nd-Level Cache Read References'"
 P3_EVENTS := "-ec en='L2 Cache Request Misses (highly correlated)'"
 
-EVENTS := $(P3_EVENTS)
+EVENTS := $(P4_EVENTS)
 
 #
 # Generate events for LLC
@@ -31,16 +30,37 @@
 	#-$(VERB) $(VTL) view > $@
 	#$(VERB)  $(VTL) delete $* -f
 
+test:: $(PROGRAMS_TO_TEST:%=test.$(TEST).pa.%)
+
 #
-# Generate events for CBE
+# 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
 #
 $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
 test.$(TEST).%: Output/%.cbe
 	@echo "========================================="
 	@echo "Running '$(TEST)' test on '$(TESTNAME)' program"
-	$(VERB) $(VTL) activity $* -d 50 -c sampling -o $(EVENTS) -app $<
+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
 
-