1 ##===- TEST.libcalls.Makefile ------------------------------*- Makefile -*-===##
3 # This recursively traverses the programs, and runs the -simplify-libcalls pass
4 # on each *.linked.rbc bytecode file with -stats set so that it is possible to
5 # determine which libcalls are being optimized in which programs.
8 # make TEST=libcalls summary (short summary)
9 # make TEST=libcalls (detailed list with time passes, etc.)
10 # make TEST=libcalls report
11 # make TEST=libcalls report.html
13 ##===----------------------------------------------------------------------===##
15 CURDIR := $(shell cd .; pwd)
16 PROGDIR := $(PROJ_SRC_ROOT)
17 RELDIR := $(subst $(PROGDIR),,$(CURDIR))
19 $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
20 test.$(TEST).%: Output/%.$(TEST).report.txt
23 $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \
24 Output/%.$(TEST).report.txt: Output/%.linked.rbc $(LOPT) \
25 $(PROJ_SRC_ROOT)/TEST.libcalls.Makefile
27 @echo "---------------------------------------------------------------" >> $@
28 @echo ">>> ========= '$(RELDIR)/$*' Program" >> $@
29 @echo "---------------------------------------------------------------" >> $@
30 @-$(LOPT) -simplify-libcalls -stats -debug-only=simplify-libcalls \
31 -time-passes -disable-output $< 2>>$@
33 @$(MAKE) TEST=libcalls | egrep '======|simplify-libcalls -'
36 REPORT_DEPENDENCIES := $(LOPT)