Fix file mode.
[llvm-testsuite.git] / TEST.aa.Makefile
blob413dcf3c4843bd426a22aa9ae544956496aa23c7
1 ##===- TEST.aa.Makefile ------------------------------------*- Makefile -*-===##
3 # This recursively traverses the programs, computing the precision of various
4 # alias analysis passes on the programs.
6 ##===----------------------------------------------------------------------===##
8 # We require the programs to be linked with libdummy
9 include $(LEVEL)/Makefile.dummylib
11 AA_IMPLS := basic steens-fi steens ds-fi ds
13 SUFFIX = -aa-eval -time-passes -disable-output -disable-verify < $< 2> $@
15 $(PROGRAMS_TO_TEST:%=Output/%.aa.basic.txt): \
16 Output/%.aa.basic.txt: Output/%.lib.bc $(LOPT)
17         -$(LOPT) -basicaa $(SUFFIX)
19 $(PROGRAMS_TO_TEST:%=Output/%.aa.steens-fi.txt): \
20 Output/%.aa.steens-fi.txt: Output/%.lib.bc $(LOPT)
21         -$(LOPT) -steens-aa -disable-ds-field-sensitivity $(SUFFIX)
23 $(PROGRAMS_TO_TEST:%=Output/%.aa.steens.txt): \
24 Output/%.aa.steens.txt: Output/%.lib.bc $(LOPT)
25         -$(LOPT) -steens-aa $(SUFFIX)
27 $(PROGRAMS_TO_TEST:%=Output/%.aa.ds-fi.txt): \
28 Output/%.aa.ds-fi.txt: Output/%.lib.bc $(LOPT)
29         -$(LOPT) -ds-aa -disable-ds-field-sensitivity $(SUFFIX)
31 $(PROGRAMS_TO_TEST:%=Output/%.aa.ds.txt): \
32 Output/%.aa.ds.txt: Output/%.lib.bc $(LOPT)
33         -$(LOPT) -ds-aa $(SUFFIX)
36 AA_OUTPUTS := $(addsuffix .txt, $(AA_IMPLS))
38 # Overall tests: just run subordinate tests
39 $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \
40 Output/%.$(TEST).report.txt: $(addprefix Output/%.aa., $(AA_OUTPUTS))
41         $(VERB) $(RM) -f $@
42         @echo "---------------------------------------------------------------" >> $@
43         @echo ">>> ========= '$(RELDIR)/$*' Program" >> $@
44         @echo "---------------------------------------------------------------" >> $@
45         -$(LDIS) < Output/$*.lib.bc | grep ^declare >> $@
46         @-for output in $(addprefix Output/$*.aa., $(AA_OUTPUTS)); do \
47                 echo -n "$$output:" >> $@; \
48                 grep Summary $$output >> $@; \
49                 echo "" >> $@; \
50                 echo -n "$$output: " >> $@; \
51                 grep "Total Execution" $$output >> $@; \
52                 echo "" >> $@; \
53         done
55 $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
56 test.$(TEST).%: Output/%.$(TEST).report.txt
57         @cat $<
59 # Define REPORT_DEPENDENCIES so that the report is regenerated if analyze or
60 # dummylib is updated.
62 REPORT_DEPENDENCIES := $(DUMMYLIB) $(LANALYZE) $(LOPT)