Fix file mode.
[llvm-testsuite.git] / TEST.pollyscops.Makefile
blob622bf23b2dde29cc7eaaa4027da8914939c7066b
1 ##===- TEST.pollyscops.Makefile ----------------------------*- Makefile -*-===##
3 # This recursively traverses the programs, and runs the -polly-scop-info pass
4 # on each *.llvm.bc bytecode so that it is possible to tell us if polly-scop-info 
5 # pass the testsuite and do some statistics on extracted SCoPs and regions that not
6 # a legal part of SCoP 
7
8 # Usage: 
9 #     make TEST=pollyscops quiet (do not output anything)
10 #     make TEST=pollyscops (detailed list with time passes, etc.)
11 #     make TEST=pollyscops report
12 #     make TEST=pollyscops report.html
14 ##===----------------------------------------------------------------------===##
16 CURDIR  := $(shell cd .; pwd)
17 PROGDIR := $(PROJ_SRC_ROOT)
18 RELDIR  := $(subst $(PROGDIR),,$(CURDIR))
19 POLLY := $(LLVM_OBJ_ROOT)/tools/polly/$(CONFIGURATION)/lib/LLVMPolly.so
20 SCOP_OPTS = -load $(POLLY)  -mem2reg -loop-simplify -indvars  -basicaa \
21 -polly-prepare -polly-region-simplify -scev-aa -polly-analyze-ir -disable-output
23 $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
24 test.$(TEST).%: Output/%.$(TEST).report.txt
25         @cat $<
27 $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt):  \
28 Output/%.$(TEST).report.txt: Output/%.llvm.bc $(LOPT) \
29         $(PROJ_SRC_ROOT)/TEST.pollyscops.Makefile 
30         $(VERB) $(RM) -f $@
31         @echo "---------------------------------------------------------------" >> $@
32         @echo ">>> ========= '$(RELDIR)/$*' Program" >> $@
33         @echo "---------------------------------------------------------------" >> $@
34         @-$(LOPT) $(SCOP_OPTS) -stats $< 2>>$@ 
35 quiet:
36         @-$(LOPT) $(SCOP_OPTS) $< 2>>$@ 
38 .PHONY: quiet
39 REPORT_DEPENDENCIES := $(LOPT) $(POLLY)