Fix file mode.
[llvm-testsuite.git] / TEST.pollyexport.Makefile
blobaeba69ec89dd5dd866b834587c66646f8fcc8157
1 ##===- TEST.pollyexport.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=pollyscopinfo quiet (do not output anything)
10 #     make TEST=pollyscopinfo (detailed list with time passes, etc.)
11 #     make TEST=pollyscopinfo report
12 #     make TEST=pollyscopinfo 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
21 SCOP_OPTS = -load $(POLLY) -mem2reg -loop-simplify -indvars  -basicaa -polly-prepare \
22 -polly-region-simplify -scev-aa -polly-export -disable-output
24 $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
25 test.$(TEST).%: Output/%.$(TEST).report.txt
26         @cat $<
28 $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt):  \
29 Output/%.$(TEST).report.txt: Output/%.llvm.bc $(LOPT) \
30         $(PROJ_SRC_ROOT)/TEST.pollyscopinfo.Makefile 
31         $(VERB) $(RM) -f $@
32         @echo "---------------------------------------------------------------" >> $@
33         @echo ">>> ========= '$(RELDIR)/$*' Program" >> $@
34         @echo "---------------------------------------------------------------" >> $@
35         @-$(LOPT) $(SCOP_OPTS) -stats $< 2>>$@ 
36 quiet:
37         @-$(LOPT) $(SCOP_OPTS) $< 2>>$@ 
39 .PHONY: quiet
40 REPORT_DEPENDENCIES := $(LOPT) $(POLLY)