[llvm-commits] [poolalloc] r130265 - in /poolalloc/trunk/test: TEST.types.Makefile TEST.types.report
Arushi Aggarwal
aggarwa4 at illinois.edu
Tue Apr 26 17:20:50 PDT 2011
Author: aggarwa4
Date: Tue Apr 26 19:20:50 2011
New Revision: 130265
URL: http://llvm.org/viewvc/llvm-project?rev=130265&view=rev
Log:
1. Update the makefiles to not use the gep-args
pass. Merged with gep-expr-arg pass.
2. Update the tests to generate the dynamic
typesafety numbers.
Modified:
poolalloc/trunk/test/TEST.types.Makefile
poolalloc/trunk/test/TEST.types.report
Modified: poolalloc/trunk/test/TEST.types.Makefile
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/TEST.types.Makefile?rev=130265&r1=130264&r2=130265&view=diff
==============================================================================
--- poolalloc/trunk/test/TEST.types.Makefile (original)
+++ poolalloc/trunk/test/TEST.types.Makefile Tue Apr 26 19:20:50 2011
@@ -27,6 +27,7 @@
PASS := td
TYPE_RT_O := $(PADIR)/$(CONFIGURATION)/lib/libtypechecks_rt.a
+DYNCOUNT_RT_O := $(PADIR)/$(CONFIGURATION)/lib/libcount.a
ANALYZE_OPTS := -stats -time-passes -disable-output -dsstats
#ANALYZE_OPTS := -stats -time-passes -dsstats
ANALYZE_OPTS += -instcount -disable-verify
@@ -50,21 +51,51 @@
$(PROGRAMS_TO_TEST:%=Output/%.opt.bc): \
Output/%.opt.bc: Output/%.llvm1.bc $(LOPT) $(ASSIST_SO)
- -$(RUNOPT) -load $(ASSIST_SO) -disable-opt -info-output-file=$(CURDIR)/$@.info -instnamer -internalize -mem2reg -dce -basiccg -inline -dce -dce -varargsfunc -indclone -funcspec -ipsccp -deadargelim -simplify-gep -die -die -mergearrgep -die -globaldce -simplifycfg -deadargelim -arg-simplify -die -varargsfunc -die -simplifycfg -globaldce -indclone -funcspec -deadargelim -globaldce -die -simplifycfg -gep-args -deadargelim -die -mergefunc -die -die -mergearrgep -die -globaldce -int2ptrcmp -die -dce -dce -inline -mem2reg -dce -arg-cast -dce -struct-ret -deadargelim -simplify-ev -simplify-iv -dce -ld-args -gep-args -deadargelim -mergefunc -globaldce -dce -typechecks -ipsccp -dce -stats -time-passes $< -f -o $@
+ -$(RUNOPT) -load $(ASSIST_SO) -disable-opt -info-output-file=$(CURDIR)/$@.info -instnamer -internalize -mem2reg -dce -basiccg -inline -dce -varargsfunc -indclone -funcspec -ipsccp -deadargelim -simplify-gep -die -die -mergearrgep -die -globaldce -simplifycfg -deadargelim -arg-simplify -die -varargsfunc -die -simplifycfg -globaldce -indclone -funcspec -deadargelim -globaldce -die -simplifycfg -gep-expr-arg -deadargelim -die -mergefunc -die -die -mergearrgep -die -globaldce -int2ptrcmp -die -dce -inline -mem2reg -dce -arg-cast -dce -struct-ret -deadargelim -simplify-ev -simplify-iv -dce -ld-args -gep-expr-arg -deadargelim -mergefunc -dce -stats -time-passes $< -f -o $@
+$(PROGRAMS_TO_TEST:%=Output/%.count.bc): \
+Output/%.count.bc: Output/%.opt.bc $(LOPT) $(ASSIST_SO)
+ -$(RUNOPT) -enable-type-inference-opts -dsa-stdlib-no-fold -dyncount -disable-opt -info-output-file=$(CURDIR)/$@.info $< -f -o $@
+
+$(PROGRAMS_TO_TEST:%=Output/%.count1.bc): \
+Output/%.count1.bc: Output/%.opt.bc $(LOPT) $(ASSIST_SO)
+ -$(RUNOPT) -dyncount -disable-opt -info-output-file=$(CURDIR)/$@.info $< -f -o $@
+
+$(PROGRAMS_TO_TEST:%=Output/%.tc.bc): \
+Output/%.tc.bc: Output/%.opt.bc $(LOPT) $(ASSIST_SO)
+ -$(RUNOPT) -load $(ASSIST_SO) -typechecks -dce -ipsccp -info-output-file=$(CURDIR)/$@.info $< -f -o $@
+
+$(PROGRAMS_TO_TEST:%=Output/%.count.s): \
+Output/%.count.s: Output/%.count.bc $(LLC)
+ -$(LLC) -f $< -o $@
+$(PROGRAMS_TO_TEST:%=Output/%.count1.s): \
+Output/%.count1.s: Output/%.count1.bc $(LLC)
+ -$(LLC) -f $< -o $@
$(PROGRAMS_TO_TEST:%=Output/%.opt.s): \
Output/%.opt.s: Output/%.opt.bc $(LLC)
-$(LLC) -f $< -o $@
$(PROGRAMS_TO_TEST:%=Output/%.llvm1.s): \
Output/%.llvm1.s: Output/%.llvm1.bc $(LLC)
-$(LLC) -f $< -o $@
+$(PROGRAMS_TO_TEST:%=Output/%.tc.s): \
+Output/%.tc.s: Output/%.tc.bc $(LLC)
+ -$(LLC) -f $< -o $@
$(PROGRAMS_TO_TEST:%=Output/%.opt): \
-Output/%.opt: Output/%.opt.s $(TYPE_RT_O)
+Output/%.opt: Output/%.opt.s
+ -$(CC) $(CFLAGS) $< $(LLCLIBS) $(LDFLAGS) -o $@
+$(PROGRAMS_TO_TEST:%=Output/%.tc): \
+Output/%.tc: Output/%.tc.s $(TYPE_RT_O)
-$(CC) $(CFLAGS) $< $(LLCLIBS) $(TYPE_RT_O) $(LDFLAGS) -o $@
$(PROGRAMS_TO_TEST:%=Output/%.llvm1): \
Output/%.llvm1: Output/%.llvm1.s
-$(CC) $(CFLAGS) $< $(LLCLIBS) $(LDFLAGS) -o $@
+$(PROGRAMS_TO_TEST:%=Output/%.count): \
+Output/%.count: Output/%.count.s
+ -$(CC) $(CFLAGS) $< $(LLCLIBS) $(DYNCOUNT_RT_O) $(LDFLAGS) -o $@
+$(PROGRAMS_TO_TEST:%=Output/%.count1): \
+Output/%.count1: Output/%.count1.s
+ -$(CC) $(CFLAGS) $< $(LLCLIBS) $(DYNCOUNT_RT_O) $(LDFLAGS) -o $@
ifndef PROGRAMS_HAVE_CUSTOM_RUN_RULES
@@ -74,6 +105,17 @@
$(PROGRAMS_TO_TEST:%=Output/%.llvm1.out): \
Output/%.llvm1.out: Output/%.llvm1
-$(RUNSAFELY) $(STDIN_FILENAME) $@ $< $(RUN_OPTIONS)
+$(PROGRAMS_TO_TEST:%=Output/%.count1.out): \
+Output/%.count1.out: Output/%.count1
+ -$(RUNSAFELY) $(STDIN_FILENAME) $@ $< $(RUN_OPTIONS)
+ -cp lsstats lsstats1
+$(PROGRAMS_TO_TEST:%=Output/%.count.out): \
+Output/%.count.out: Output/%.count
+ -$(RUNSAFELY) $(STDIN_FILENAME) $@ $< $(RUN_OPTIONS)
+ -cp lsstats lsstats2
+$(PROGRAMS_TO_TEST:%=Output/%.tc.out): \
+Output/%.tc.out: Output/%.tc
+ -$(RUNSAFELY) $(STDIN_FILENAME) $@ $< $(RUN_OPTIONS)
else
$(PROGRAMS_TO_TEST:%=Output/%.opt.out): \
@@ -88,8 +130,31 @@
-$(SPEC_SANDBOX) llvm1-$(RUN_TYPE) $@ $(REF_IN_DIR) \
$(RUNSAFELY) $(STDIN_FILENAME) $(STDOUT_FILENAME) \
../../$< $(RUN_OPTIONS)
- -(cd Output/opt-$(RUN_TYPE); cat $(LOCAL_OUTPUTS)) > $@
- -cp Output/opt-$(RUN_TYPE)/$(STDOUT_FILENAME).time $@.time
+ -(cd Output/llvm1-$(RUN_TYPE); cat $(LOCAL_OUTPUTS)) > $@
+ -cp Output/llvm1-$(RUN_TYPE)/$(STDOUT_FILENAME).time $@.time
+$(PROGRAMS_TO_TEST:%=Output/%.tc.out): \
+Output/%.tc.out: Output/%.tc
+ -$(SPEC_SANDBOX) tc-$(RUN_TYPE) $@ $(REF_IN_DIR) \
+ $(RUNSAFELY) $(STDIN_FILENAME) $(STDOUT_FILENAME) \
+ ../../$< $(RUN_OPTIONS)
+ -(cd Output/tc-$(RUN_TYPE); cat $(LOCAL_OUTPUTS)) > $@
+ -cp Output/tc-$(RUN_TYPE)/$(STDOUT_FILENAME).time $@.time
+$(PROGRAMS_TO_TEST:%=Output/%.count.out): \
+Output/%.count.out: Output/%.count
+ -$(SPEC_SANDBOX) count-$(RUN_TYPE) $@ $(REF_IN_DIR) \
+ $(RUNSAFELY) $(STDIN_FILENAME) $(STDOUT_FILENAME) \
+ ../../$< $(RUN_OPTIONS)
+ -(cd Output/count-$(RUN_TYPE); cat $(LOCAL_OUTPUTS)) > $@
+ -cp Output/count-$(RUN_TYPE)/$(STDOUT_FILENAME).time $@.time
+ -cp Output/count-$(RUN_TYPE)/lsstats lsstats2
+$(PROGRAMS_TO_TEST:%=Output/%.count1.out): \
+Output/%.count1.out: Output/%.count1
+ -$(SPEC_SANDBOX) count1-$(RUN_TYPE) $@ $(REF_IN_DIR) \
+ $(RUNSAFELY) $(STDIN_FILENAME) $(STDOUT_FILENAME) \
+ ../../$< $(RUN_OPTIONS)
+ -(cd Output/count1-$(RUN_TYPE); cat $(LOCAL_OUTPUTS)) > $@
+ -cp Output/count1-$(RUN_TYPE)/$(STDOUT_FILENAME).time $@.time
+ -cp Output/count1-$(RUN_TYPE)/lsstats lsstats1
endif
@@ -97,15 +162,28 @@
Output/%.opt.diff-nat: Output/%.out-nat Output/%.opt.out
@cp Output/$*.out-nat Output/$*.opt.out-nat
-$(DIFFPROG) nat $*.opt $(HIDEDIFF)
+$(PROGRAMS_TO_TEST:%=Output/%.tc.diff-nat): \
+Output/%.tc.diff-nat: Output/%.out-nat Output/%.tc.out
+ @cp Output/$*.out-nat Output/$*.tc.out-nat
+ -$(DIFFPROG) nat $*.tc $(HIDEDIFF)
$(PROGRAMS_TO_TEST:%=Output/%.llvm1.diff-nat): \
Output/%.llvm1.diff-nat: Output/%.out-nat Output/%.llvm1.out
@cp Output/$*.out-nat Output/$*.llvm1.out-nat
- -$(DIFFPROG) nat $*.opt $(HIDEDIFF)
+ -$(DIFFPROG) nat $*.llvm1 $(HIDEDIFF)
+
+$(PROGRAMS_TO_TEST:%=Output/%.count.diff-nat): \
+Output/%.count.diff-nat: Output/%.out-nat Output/%.count.out
+ @cp Output/$*.out-nat Output/$*.count.out-nat
+ -$(DIFFPROG) nat $*.count $(HIDEDIFF)
+$(PROGRAMS_TO_TEST:%=Output/%.count1.diff-nat): \
+Output/%.count1.diff-nat: Output/%.out-nat Output/%.count1.out
+ @cp Output/$*.out-nat Output/$*.count1.out-nat
+ -$(DIFFPROG) nat $*.count1 $(HIDEDIFF)
$(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \
-Output/%.$(TEST).report.txt: Output/%.opt.bc Output/%.LOC.txt $(LOPT) Output/%.out-nat Output/%.opt.diff-nat
+Output/%.$(TEST).report.txt: Output/%.opt.bc Output/%.LOC.txt $(LOPT) Output/%.out-nat Output/%.opt.diff-nat Output/%.count.diff-nat Output/%.count1.diff-nat
@# Gather data
-($(RUNOPT) -dsa-$(PASS) -enable-type-inference-opts -dsa-stdlib-no-fold $(ANALYZE_OPTS) $<)> $@.time.1 2>&1
-($(RUNOPT) -dsa-$(PASS) $(ANALYZE_OPTS) $<)> $@.time.2 2>&1
@@ -176,8 +254,8 @@
@/bin/echo -n "ACCESSES U: " >> $@
- at grep 'Number of loads/stores which are on unknown nodes' $@.time.1 >> $@
@echo >> $@
- @/bin/echo -n "STD_LIB_FOLD: " >> $@
- - at grep 'Number of nodes folded in std lib' $@.time.1 >> $@
+ @/bin/echo -n "ACCESSES I2P: " >> $@
+ - at grep 'Number of loads/stores which are on inttoptr nodes' $@.time.1 >> $@
@echo >> $@
@/bin/echo -n "I2PB: " >> $@
- at grep 'Number of inttoptr used only in cmp' $@.time.1 >> $@
@@ -226,6 +304,18 @@
@/bin/echo -n "INDCALLS: " >> $@
- at grep 'Number of unresolved IndCalls' $@.time.1 >> $@
@echo >> $@
+ @/bin/echo -n "DTOTALO: " >> $@
+ - at grep 'Total' lsstats2 >> $@
+ @echo >> $@
+ @/bin/echo -n "DSAFEO: " >> $@
+ - at grep 'Safe' lsstats2 >> $@
+ @echo >> $@
+ @/bin/echo -n "DTOTAL: " >> $@
+ - at grep 'Total' lsstats1 >> $@
+ @echo >> $@
+ @/bin/echo -n "DSAFE: " >> $@
+ - at grep 'Safe' lsstats1 >> $@
+ @echo >> $@
$(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
@@ -238,5 +328,5 @@
# Define REPORT_DEPENDENCIES so that the report is regenerated if analyze or
# dummylib is updated.
#
-REPORT_DEPENDENCIES := $(DUMMYLIB) $(LOPT)
+REPORT_DEPENDENCIES := $(DUMMYLIB) $(LOPT) $(ASSIST_SO)
Modified: poolalloc/trunk/test/TEST.types.report
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/TEST.types.report?rev=130265&r1=130264&r2=130265&view=diff
==============================================================================
--- poolalloc/trunk/test/TEST.types.report (original)
+++ poolalloc/trunk/test/TEST.types.report Tue Apr 26 19:20:50 2011
@@ -15,7 +15,7 @@
my ($Cols, $Col) = @_;
if ($Cols->[$Col-2] ne "*" and
$Cols->[$Col-2] != "0") {
- return $Cols->[$Col-1]/$Cols->[$Col-2];
+ return sprintf("%4.1f%%", 100*($Cols->[$Col-1]/$Cols->[$Col-2]));
} else {
return "n/a";
}
@@ -159,6 +159,7 @@
["E", "ACCESSES E: *([0-9]+)"],
["F", "ACCESSES F: *([0-9]+)"],
["U", "ACCESSES U: *([0-9]+)"],
+ ["I2P", "ACCESSES I2P: *([0-9]+)"],
# Nodes Folded
[],
["VAFUNC", "VARARGS_CALLS: *([0-9]+)"],
@@ -166,7 +167,6 @@
["ARGSMPL", "ARG_SMPL: *([0-9]+)"],
["FUNCSPEC", "CLONED_FUNCSPEC: *([0-9]+)"],
["INDCLONE", "CLONED_INDCLONE: *([0-9]+)"],
- ["StdLibFold", "STD_LIB_FOLD: *([0-9]+)"],
["I2PB", "I2PB: *([0-9]+)"],
["I2PS", "I2PS: *([0-9]+)"],
["EV", "EV: *([0-9]+)"],
@@ -174,4 +174,12 @@
["DE", "DEALLOC: *([0-9]+)"],
["CAST", "CAST: *([0-9]+)"],
["Calls", "INDCALLS: *([0-9]+)"],
+ [],
+ ["DTotal", "DTOTAL: *([0-9]+)"],
+ ["DSafe", "DSAFE: *([0-9]+)"],
+ ["DTS %" , sub { return Ratio(@_); }],
+ [],
+ ["DTotalO", "DTOTALO: *([0-9]+)"],
+ ["DSafeO", "DSAFEO: *([0-9]+)"],
+ ["DTS %" , sub { return Ratio(@_); }],
);
More information about the llvm-commits
mailing list