[llvm-commits] CVS: llvm-poolalloc/test/TEST.pacompiletime.Makefile TEST.pacompiletime.report Makefile
Chris Lattner
lattner at cs.uiuc.edu
Sat Apr 2 11:54:08 PST 2005
Changes in directory llvm-poolalloc/test:
TEST.pacompiletime.Makefile added (r1.1)
TEST.pacompiletime.report added (r1.1)
Makefile updated: 1.29 -> 1.30
---
Log message:
add new pool allocation compile-time report
---
Diffs of the changes: (+130 -0)
Makefile | 6 ++++
TEST.pacompiletime.Makefile | 65 ++++++++++++++++++++++++++++++++++++++++++++
TEST.pacompiletime.report | 59 +++++++++++++++++++++++++++++++++++++++
3 files changed, 130 insertions(+)
Index: llvm-poolalloc/test/TEST.pacompiletime.Makefile
diff -c /dev/null llvm-poolalloc/test/TEST.pacompiletime.Makefile:1.1
*** /dev/null Sat Apr 2 13:54:02 2005
--- llvm-poolalloc/test/TEST.pacompiletime.Makefile Sat Apr 2 13:53:52 2005
***************
*** 0 ****
--- 1,65 ----
+ ##===- poolalloc/test/TEST.pacompiletime.Makefile ----------*- Makefile -*-===##
+ #
+ # This test figures out how much time we spend in DSA and the pool allocator
+ # compiling a program.
+ #
+ ##===----------------------------------------------------------------------===##
+
+ CFLAGS = -O2 -fno-strict-aliasing
+
+ EXTRA_PA_FLAGS :=
+
+ CURDIR := $(shell cd .; pwd)
+ PROGDIR := $(shell cd $(LLVM_SRC_ROOT)/projects/llvm-test; pwd)/
+ RELDIR := $(subst $(PROGDIR),,$(CURDIR))
+
+ # Pool allocator pass shared object
+ PA_SO := $(PROJECT_DIR)/Debug/lib/libpoolalloc$(SHLIBEXT)
+
+ # Command to run opt with the pool allocator pass loaded
+ OPT_PA := $(LOPT) -load $(PA_SO)
+
+ # OPT_PA_STATS - Run opt with the -stats and -time-passes options, capturing the
+ # output to a file.
+ OPT_PA_STATS = $(OPT_PA) -info-output-file=$(CURDIR)/$@.info -time-passes
+
+
+ # This rule runs the pool allocator on the .llvm.bc file to produce a new .bc
+ # file
+ $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).poolalloc.bc): \
+ Output/%.$(TEST).poolalloc.bc: Output/%.llvm.bc $(PA_SO) $(LOPT)
+ - at rm -f $(CURDIR)/$@.info
+ -$(OPT_PA_STATS) -poolalloc $(EXTRA_PA_FLAGS) $< -o $@ -f 2>&1 > $@.out
+
+
+ # This rule wraps everything together to build the actual output the report is
+ # generated from.
+ $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \
+ Output/%.$(TEST).report.txt: Output/%.$(TEST).poolalloc.bc Output/%.LOC.txt
+ @echo > $@
+ printf "LOC: " >> $@
+ cat Output/$*.LOC.txt >> $@
+ @echo >> $@
+ @printf "LOCTIME: " >> $@
+ @-grep "Local Data Structure" Output/$*.$(TEST).poolalloc.bc.info >>$@
+ @printf "BUTIME: " >> $@
+ @-grep " Bottom-up Data Struc" Output/$*.$(TEST).poolalloc.bc.info >>$@
+ @printf "TDTIME: " >> $@
+ @-grep "Top-down Data Structur" Output/$*.$(TEST).poolalloc.bc.info >>$@
+ @printf "COMTIME: " >> $@
+ @-grep "'Complete' Bottom-up D" Output/$*.$(TEST).poolalloc.bc.info >>$@
+ @printf "EQTIME: " >> $@
+ @-grep "Equivalence-class Bott" Output/$*.$(TEST).poolalloc.bc.info >>$@
+ @printf "PATIME: " >> $@
+ @-grep "Pool allocate disjoint" Output/$*.$(TEST).poolalloc.bc.info >>$@
+
+
+
+ $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
+ test.$(TEST).%: Output/%.$(TEST).report.txt
+ @echo "---------------------------------------------------------------"
+ @echo ">>> ========= '$(RELDIR)/$*' Program"
+ @echo "---------------------------------------------------------------"
+ @cat $<
+
+ REPORT_DEPENDENCIES := $(PA_RT_O) $(PA_SO) $(PROGRAMS_TO_TEST:%=Output/%.llvm.bc) $(LLC) $(LOPT)
Index: llvm-poolalloc/test/TEST.pacompiletime.report
diff -c /dev/null llvm-poolalloc/test/TEST.pacompiletime.report:1.1
*** /dev/null Sat Apr 2 13:54:08 2005
--- llvm-poolalloc/test/TEST.pacompiletime.report Sat Apr 2 13:53:52 2005
***************
*** 0 ****
--- 1,59 ----
+ ##=== TEST.pacompiletime.report - Report for PA Compile Time ---*- perl -*-===##
+ #
+ # This file defines a report to be generated for the pool allocator compile-time
+ # tests.
+ #
+ ##===----------------------------------------------------------------------===##
+
+ # Sort by program name
+ $SortCol = 0;
+ $TrimRepeatedPrefix = 1;
+
+ @LatexColumns = (1, 8, 10);
+
+ my $FREEBENCH = 'MultiSource/Benchmarks/FreeBench';
+ my $PTRDIST = 'MultiSource/Benchmarks/Ptrdist';
+
+ @LatexRowMapOrder = (
+ "anagram/anagram" => 'anagram',
+ "bc/bc" => 'bc',
+ "ft/ft" => 'ft',
+ "ks/ks" => 'ks',
+ "yacr2/yacr2" => 'yacr2',
+ '-' => '-',
+ '164.gzip/164.gzip' => '164.gzip',
+ '175.vpr/175.vpr' => '175.vpr',
+ '181.mcf/181.mcf' => '181.mcf',
+ '186.crafty/186.crafty' => '186.crafty',
+ '197.parser/197.parser' => '197.parser',
+ '197.parser.hacked/197.parser.hacked' => '197.parser(b)',
+ '255.vortex/255.vortex' => '255.vortex',
+ '256.bzip2/256.bzip2' => '256.bzip2',
+ '300.twolf/300.twolf' => '300.twolf',
+ '-' => '-',
+ "analyzer" => 'analyzer',
+ "llu" => 'llu-bench',
+ );
+
+
+ # 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.
+ my $USERSYSTTIME = '([0-9.]+)[ 0-9.]+\([^)]+\)[ 0-9.]+\([^)]+\) +';
+ (
+ # Name
+ ["Name:" , '\'([^\']+)\' Program'],
+ ["LOC" , 'LOC:\s*([0-9]+)'],
+ [],
+ # DSA Times
+ ["LOC", "${USERSYSTTIME}Local"],
+ ["BU", "${USERSYSTTIME}Bottom-up"],
+ ["TD", "${USERSYSTTIME}Top-down"],
+ ["COM", "${USERSYSTTIME}'Complete'"],
+ ["EQ", "${USERSYSTTIME}Equivalence"],
+ ["DSASUM", sub { return SumCols(@_, 5); }],
+ [],
+ ["PA Time", "${USERSYSTTIME}Pool allocate"],
+ []
+ );
+
Index: llvm-poolalloc/test/Makefile
diff -u llvm-poolalloc/test/Makefile:1.29 llvm-poolalloc/test/Makefile:1.30
--- llvm-poolalloc/test/Makefile:1.29 Thu Mar 3 21:35:11 2005
+++ llvm-poolalloc/test/Makefile Sat Apr 2 13:53:52 2005
@@ -146,6 +146,12 @@
GET_STABLE_NUMBERS=1 report report.html)
@printf "\a"; sleep 1; printf "\a"; sleep 1; printf "\a"
+pacompiletime::
+ (cd $(LLVM_OBJ_ROOT)/projects/llvm-test/$(SUBDIR); \
+ PROJECT_DIR=$(PROJ_OBJ_ROOT) $(MAKE) -j1 TEST=pacompiletime \
+ report report.html)
+ @printf "\a"; sleep 1; printf "\a"; sleep 1; printf "\a"
+
ptrcomp::
(cd $(LLVM_OBJ_ROOT)/projects/llvm-test/$(SUBDIR); \
PROJECT_DIR=$(PROJ_OBJ_ROOT) $(MAKE) -j1 TEST=ptrcomp \
More information about the llvm-commits
mailing list