forked from intel/llvm-test-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TEST.libcalls.Makefile
36 lines (32 loc) · 1.37 KB
/
TEST.libcalls.Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
##===- TEST.libcalls.Makefile ------------------------------*- Makefile -*-===##
#
# This recursively traverses the programs, and runs the -simplify-libcalls pass
# on each *.linked.rbc bytecode file with -stats set so that it is possible to
# determine which libcalls are being optimized in which programs.
#
# Usage:
# make TEST=libcalls summary (short summary)
# make TEST=libcalls (detailed list with time passes, etc.)
# make TEST=libcalls report
# make TEST=libcalls report.html
#
##===----------------------------------------------------------------------===##
CURDIR := $(shell cd .; pwd)
PROGDIR := $(PROJ_SRC_ROOT)
RELDIR := $(subst $(PROGDIR),,$(CURDIR))
$(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
test.$(TEST).%: Output/%.$(TEST).report.txt
@cat $<
$(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \
Output/%.$(TEST).report.txt: Output/%.linked.rbc $(LOPT) \
$(PROJ_SRC_ROOT)/TEST.libcalls.Makefile
$(VERB) $(RM) -f $@
@echo "---------------------------------------------------------------" >> $@
@echo ">>> ========= '$(RELDIR)/$*' Program" >> $@
@echo "---------------------------------------------------------------" >> $@
@-$(LOPT) -simplify-libcalls -stats -debug-only=simplify-libcalls \
-time-passes -disable-output $< 2>>$@
summary:
@$(MAKE) TEST=libcalls | egrep '======|simplify-libcalls -'
.PHONY: summary
REPORT_DEPENDENCIES := $(LOPT)