[llvm-commits] [poolalloc] r131167 - in /poolalloc/trunk/test: TEST.types.Makefile TEST.types.report

Arushi Aggarwal aggarwa4 at illinois.edu
Tue May 10 15:56:03 PDT 2011


Author: aggarwa4
Date: Tue May 10 17:56:03 2011
New Revision: 131167

URL: http://llvm.org/viewvc/llvm-project?rev=131167&view=rev
Log:
Added more stats for runtime of instrumented functions.

This is cluttered makefile, which gives all the stats.
Choose as per need.

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=131167&r1=131166&r2=131167&view=diff
==============================================================================
--- poolalloc/trunk/test/TEST.types.Makefile (original)
+++ poolalloc/trunk/test/TEST.types.Makefile Tue May 10 17:56:03 2011
@@ -51,7 +51,7 @@
 
 $(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 -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 $@ 
+	-$(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 -sretpromotion -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)
@@ -63,7 +63,11 @@
 
 $(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 $@ 
+	-$(RUNOPT) -load $(ASSIST_SO) -typechecks -dce -ipsccp -stats -info-output-file=$(CURDIR)/$@.info $< -f -o $@ 
+
+$(PROGRAMS_TO_TEST:%=Output/%.tco.bc): \
+Output/%.tco.bc: Output/%.opt.bc $(LOPT) $(ASSIST_SO)
+	-$(RUNOPT) -load $(ASSIST_SO) -typechecks -enable-type-safe-opt -dce -ipsccp -stats -info-output-file=$(CURDIR)/$@.info $< -f -o $@ 
 
 $(PROGRAMS_TO_TEST:%=Output/%.count.s): \
 Output/%.count.s: Output/%.count.bc $(LLC)
@@ -80,6 +84,9 @@
 $(PROGRAMS_TO_TEST:%=Output/%.tc.s): \
 Output/%.tc.s: Output/%.tc.bc $(LLC)
 	-$(LLC) -f $< -o $@
+$(PROGRAMS_TO_TEST:%=Output/%.tco.s): \
+Output/%.tco.s: Output/%.tco.bc $(LLC)
+	-$(LLC) -f $< -o $@
 
 $(PROGRAMS_TO_TEST:%=Output/%.opt): \
 Output/%.opt: Output/%.opt.s
@@ -87,6 +94,9 @@
 $(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/%.tco): \
+Output/%.tco: Output/%.tco.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 $@
@@ -116,6 +126,9 @@
 $(PROGRAMS_TO_TEST:%=Output/%.tc.out): \
 Output/%.tc.out: Output/%.tc
 	-$(RUNSAFELY) $(STDIN_FILENAME) $@ $< $(RUN_OPTIONS)
+$(PROGRAMS_TO_TEST:%=Output/%.tco.out): \
+Output/%.tco.out: Output/%.tco
+	-$(RUNSAFELY) $(STDIN_FILENAME) $@ $< $(RUN_OPTIONS)
 
 else
 $(PROGRAMS_TO_TEST:%=Output/%.opt.out): \
@@ -139,6 +152,13 @@
                   ../../$< $(RUN_OPTIONS)
 	-(cd Output/tc-$(RUN_TYPE); cat $(LOCAL_OUTPUTS)) > $@
 	-cp Output/tc-$(RUN_TYPE)/$(STDOUT_FILENAME).time $@.time
+$(PROGRAMS_TO_TEST:%=Output/%.tco.out): \
+Output/%.tco.out: Output/%.tco
+	-$(SPEC_SANDBOX) tco-$(RUN_TYPE) $@ $(REF_IN_DIR) \
+             $(RUNSAFELY) $(STDIN_FILENAME) $(STDOUT_FILENAME) \
+                  ../../$< $(RUN_OPTIONS)
+	-(cd Output/tco-$(RUN_TYPE); cat $(LOCAL_OUTPUTS)) > $@
+	-cp Output/tco-$(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) \
@@ -167,6 +187,11 @@
 	@cp Output/$*.out-nat Output/$*.tc.out-nat
 	-$(DIFFPROG) nat $*.tc $(HIDEDIFF)
 
+$(PROGRAMS_TO_TEST:%=Output/%.tco.diff-nat): \
+Output/%.tco.diff-nat: Output/%.out-nat Output/%.tco.out
+	@cp Output/$*.out-nat Output/$*.tco.out-nat
+	-$(DIFFPROG) nat $*.tco $(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
@@ -183,7 +208,7 @@
 
 
 $(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/%.count.diff-nat Output/%.count1.diff-nat
+Output/%.$(TEST).report.txt: Output/%.opt.bc Output/%.LOC.txt $(LOPT) Output/%.out-nat Output/%.opt.diff-nat Output/%.tc.diff-nat Output/%.count.diff-nat Output/%.count1.diff-nat Output/%.tco.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
@@ -242,6 +267,9 @@
 	@/bin/echo -n "IGN: " >> $@
 	- at grep 'Number of instructions ignored' $@.time.1 >> $@
 	@echo >> $@
+	@/bin/echo -n "GEPI: " >> $@
+	- at grep 'Number of gep instructions ignored' $@.time.1 >> $@
+	@echo >> $@
 	@/bin/echo -n "ACCESSES I: " >> $@
 	- at grep 'Number of loads/stores which are on incomplete nodes' $@.time.1 >> $@
 	@echo >> $@
@@ -273,6 +301,19 @@
 	@/bin/echo -n "TIME: " >> $@
 	- at grep '  Top-down Data Structure' $@.time.1 >> $@
 	@echo >> $@
+	@# Emit runtime data.
+	@-if test -f Output/$*.opt.diff-nat; then \
+	  printf "OPT-RUN_TIME: " >> $@;\
+	  grep 'program' Output/$*.opt.out.time >> $@;\
+	fi
+	@-if test -f Output/$*.tc.diff-nat; then \
+	  printf "TC-RUN_TIME: " >> $@;\
+	  grep 'program' Output/$*.tc.out.time >> $@;\
+	fi
+	@-if test -f Output/$*.tco.diff-nat; then \
+	  printf "TCO-RUN_TIME: " >> $@;\
+	  grep 'program' Output/$*.tco.out.time >> $@;\
+	fi
 	@# Emit AssistDS stats
 	@/bin/echo -n "CLONED_FUNCSPEC: " >> $@
 	- at grep 'Number of Functions Cloned in FuncSpec' $<.info >> $@
@@ -316,7 +357,12 @@
 	@/bin/echo -n "DSAFE: " >> $@
 	- at grep 'Safe' lsstats1 >> $@
 	@echo >> $@
-
+	@/bin/echo -n "LCHK: " >> $@
+	- at grep 'Number of Load Insts that need type checks' $<.info >> $@
+	@echo >> $@
+	@/bin/echo -n "SCHK: " >> $@
+	- at grep 'Number of Store Insts that need type checks' $<.info >> $@
+	@echo >> $@
 
 $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
 test.$(TEST).%: Output/%.$(TEST).report.txt

Modified: poolalloc/trunk/test/TEST.types.report
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/TEST.types.report?rev=131167&r1=131166&r2=131167&view=diff
==============================================================================
--- poolalloc/trunk/test/TEST.types.report (original)
+++ poolalloc/trunk/test/TEST.types.report Tue May 10 17:56:03 2011
@@ -150,6 +150,7 @@
             ["TS %" , sub { return TypeSafeRatio(@_); }],
             [],
             ["Ign", "IGN: *([0-9]+)"],
+            ["GEP-Ign", "GEPI: *([0-9]+)"],
             ["Type0", "ACCESSES TYPED0: *([0-9]+)"],
             ["Type1", "ACCESSES TYPED1: *([0-9]+)"],
             ["Type2", "ACCESSES TYPED2: *([0-9]+)"],
@@ -182,4 +183,11 @@
             ["DTotalO", "DTOTALO: *([0-9]+)"],
             ["DSafeO", "DSAFEO: *([0-9]+)"],
             ["DTS %" , sub { return Ratio(@_); }],
+            #[],
+            #["LoadChk", "LCHK: *([0-9]+)"],
+            #["StoreChk", "SCHK: *([0-9]+)"],
+            [],
+            ["OptTime", "OPT-RUN_TIME: program *([.0-9]+)"],
+            ["TcTime", "TC-RUN_TIME: program *([.0-9]+)"],
+            ["TcoTime", "TCO-RUN_TIME: program *([.0-9]+)"],
            );





More information about the llvm-commits mailing list