1 ##===- TEST.jit.Makefile -----------------------------------*- Makefile -*-===##
3 # This test tries running the Just-In-Time compiler on all of the programs to
4 # see which ones work and which ones don't. It provides a report to tabulate
5 # this nicely and provides some simple statistics.
7 ##===----------------------------------------------------------------------===##
9 JIT_OPTS = -force-interpreter=false -stats -time-passes
10 CURDIR := $(shell cd .; pwd)
11 PROGDIR := $(PROJ_SRC_ROOT)
12 RELDIR := $(subst $(PROGDIR),,$(CURDIR))
14 $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \
15 Output/%.$(TEST).report.txt: Output/%.llvm.bc $(LLI)
17 @echo "---------------------------------------------------------------" >> $@
18 @echo ">>> ========= '$(RELDIR)/$*' Program" >> $@
19 @echo "---------------------------------------------------------------" >> $@
20 -(time -p $(LLI) $(JIT_OPTS) $< $(RUN_OPTIONS) > /dev/null \
21 < $(STDIN_FILENAME)) >> $@ 2>&1
23 $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
24 test.$(TEST).%: Output/%.$(TEST).report.txt
27 # Define REPORT_DEPENDENCIES so that the report is regenerated if lli changes
29 REPORT_DEPENDENCIES := $(LLI)