1 ##===- TEST.llc.Makefile -----------------------------------*- Makefile -*-===##
3 # This test tries running the compiler on all of the programs and
4 # reports on detailed pass execution times and register allocation and
5 # peephole optimization statistics.
7 ##===----------------------------------------------------------------------===##
9 LLC_OPTS = $(LLCFLAGS) -f -o=/dev/null -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 $(LLC)
17 @echo "---------------------------------------------------------------" >> $@
18 @echo ">>> ========= '$(RELDIR)/$*' Program" >> $@
19 @echo "---------------------------------------------------------------" >> $@
20 -(time -p $(LLC) $(LLC_OPTS) $<) >> $@ 2>&1
22 $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
23 test.$(TEST).%: Output/%.$(TEST).report.txt
26 # Define REPORT_DEPENDENCIES so that the report is regenerated if llc changes
28 REPORT_DEPENDENCIES := $(LLC)