[llvm-commits] CVS: llvm-test/TEST.dsprecision.Makefile TEST.dsprecision.report

Chris Lattner lattner at cs.uiuc.edu
Thu Mar 17 11:59:18 PST 2005



Changes in directory llvm-test:

TEST.dsprecision.Makefile added (r1.1)
TEST.dsprecision.report added (r1.1)
---
Log message:

add a report for comparing the AA and mod/ref precision of basic-aa,
steensgaards, steensgaards with field sensitivity, and DSA.


---
Diffs of the changes:  (+96 -0)

 TEST.dsprecision.Makefile |   51 ++++++++++++++++++++++++++++++++++++++++++++++
 TEST.dsprecision.report   |   45 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 96 insertions(+)


Index: llvm-test/TEST.dsprecision.Makefile
diff -c /dev/null llvm-test/TEST.dsprecision.Makefile:1.1
*** /dev/null	Thu Mar 17 13:59:15 2005
--- llvm-test/TEST.dsprecision.Makefile	Thu Mar 17 13:59:05 2005
***************
*** 0 ****
--- 1,51 ----
+ ##===- TEST.dsprecision.Makefile ---------------------------*- Makefile -*-===##
+ #
+ # This recursively traverses the programs, running -aa-eval on them with various
+ # different aa implementations.
+ #
+ ##===----------------------------------------------------------------------===##
+ 
+ RELDIR  := $(subst $(PROJ_OBJ_ROOT),,$(PROJ_OBJ_DIR))
+ 
+ # We require the programs to be linked with libdummy
+ include $(LEVEL)/Makefile.dummylib
+ 
+ $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \
+ Output/%.$(TEST).report.txt: Output/%.lib.bc $(LOPT)
+ 	@echo > $@
+ 	-($(LOPT) -basicaa -aa-eval -disable-output $<) > Output/$*.basicaa.out 2>&1
+ 	@echo -n "BASIC MA: " >> $@
+ 	- at grep 'may alias responses' Output/$*.basicaa.out >> $@
+ 	@echo -n "BASIC MR: " >> $@
+ 	- at grep 'mod & ref responses' Output/$*.basicaa.out >> $@
+ 	@
+ 	-($(LOPT) -steens-aa -disable-ds-field-sensitivity -aa-eval \
+                            -disable-output $<) > Output/$*.steensfiaa.out 2>&1
+ 	@echo -n "STEENS-FI MA: " >> $@
+ 	- at grep 'may alias responses' Output/$*.steensfiaa.out >> $@
+ 	@echo -n "STEENS-FI MR: " >> $@
+ 	- at grep 'mod & ref responses' Output/$*.steensfiaa.out >> $@
+ 	@
+ 	-($(LOPT) -steens-aa -aa-eval -disable-output $<) > Output/$*.steensfsaa.out 2>&1
+ 	@echo -n "STEENS-FS MA: " >> $@
+ 	- at grep 'may alias responses' Output/$*.steensfsaa.out >> $@
+ 	@echo -n "STEENS-FS MR: " >> $@
+ 	- at grep 'mod & ref responses' Output/$*.steensfsaa.out >> $@
+ 	-($(LOPT) -ds-aa -aa-eval -disable-output $<) > Output/$*.dsaa.out 2>&1
+ 	@echo -n "DS MA: " >> $@
+ 	- at grep 'may alias responses' Output/$*.dsaa.out >> $@
+ 	@echo -n "DS MR: " >> $@
+ 	- at grep 'mod & ref responses' Output/$*.dsaa.out >> $@
+ 
+ $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
+ test.$(TEST).%: Output/%.$(TEST).report.txt
+ 	@echo "---------------------------------------------------------------"
+ 	@echo ">>> ========= '$(RELDIR)/$*' Program"
+ 	@echo "---------------------------------------------------------------"
+ 	@cat $<
+ 
+ # Define REPORT_DEPENDENCIES so that the report is regenerated if analyze or
+ # dummylib is updated.
+ #
+ REPORT_DEPENDENCIES := $(DUMMYLIB) $(LOPT)
+ 


Index: llvm-test/TEST.dsprecision.report
diff -c /dev/null llvm-test/TEST.dsprecision.report:1.1
*** /dev/null	Thu Mar 17 13:59:18 2005
--- llvm-test/TEST.dsprecision.report	Thu Mar 17 13:59:05 2005
***************
*** 0 ****
--- 1,45 ----
+ ##=== TEST.dsprecision.report - Report for precision tests -----*- perl -*-===##
+ #
+ # This file defines a report to be generated for the precision comparison
+ # test.
+ #
+ ##===----------------------------------------------------------------------===##
+ 
+ # Helper function
+ sub Ratio {
+   my ($Cols, $Col) = @_;
+   if ($Cols->[$Col-2] ne "*" and
+       $Cols->[$Col-2] != "0") {
+     return $Cols->[$Col-1]/$Cols->[$Col-2];
+   } else {
+     return "n/a";
+   }
+ }
+ 
+ $SortCol = 0;
+ #$SortNumeric = 1;
+ $TrimRepeatedPrefix = 1;
+ 
+ # Sort in ascending order
+ $SortReverse = 0;
+ 
+ # These are the columns for the report.  The first entry is the header for the
+ # column, the second is the regex to use to match the value.  Empty list create
+ # seperators, and closures may be put in for custom processing.
+ (
+ # Name
+             ["Name:",     '\'([^\']+)\' Program'],
+             [],
+ # AA Precision
+             ["basic",     'BASIC MA:.* \((.*)\)'],
+             ["steens-fi", 'STEENS-FI MA:.* \((.*)\)'],
+             ["steens-fs", 'STEENS-FS MA:.* \((.*)\)'],
+             ["ds",        'DS MA:.* \((.*)\)'],
+             [],
+ # MR Precision
+             ["basic",     'BASIC MR:.* \((.*)\)'],
+             ["steens-fi", 'STEENS-FI MR:.* \((.*)\)'],
+             ["steens-fs", 'STEENS-FS MR:.* \((.*)\)'],
+             ["ds",        'DS MR:.* \((.*)\)'],
+             [],
+ );






More information about the llvm-commits mailing list