[llvm-commits] CVS: llvm/test/Programs/TEST.llc.Makefile TEST.llc.report
Alkis Evlogimenos
alkis at cs.uiuc.edu
Tue Jan 13 18:26:00 PST 2004
Changes in directory llvm/test/Programs:
TEST.llc.Makefile added (r1.1)
TEST.llc.report added (r1.1)
---
Log message:
Add llc report. Similar to the jit report but it runs faster since it doesn't run the actual program
---
Diffs of the changes: (+77 -0)
Index: llvm/test/Programs/TEST.llc.Makefile
diff -c /dev/null llvm/test/Programs/TEST.llc.Makefile:1.1
*** /dev/null Tue Jan 13 18:25:40 2004
--- llvm/test/Programs/TEST.llc.Makefile Tue Jan 13 18:25:30 2004
***************
*** 0 ****
--- 1,27 ----
+ ##===- test/Programs/TEST.llc.Makefile ---------------------*- Makefile -*-===##
+ #
+ # This test tries running the Just-In-Time compiler on all of the programs to
+ # see which ones work and which ones don't. It provides a report to tabulate
+ # this nicely and provides some simple statistics.
+ #
+ ##===----------------------------------------------------------------------===##
+
+ LLC_OPTS = -f -o=/dev/null -stats -time-passes -regalloc=linearscan
+ CURDIR := $(shell cd .; pwd)
+ PROGDIR := $(shell cd $(LEVEL)/test/Programs; pwd)/
+ RELDIR := $(subst $(PROGDIR),,$(CURDIR))
+
+ $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \
+ Output/%.$(TEST).report.txt: Output/%.llvm.bc $(LLC)
+ -(time -p $(LLC) $(LLC_OPTS) $<) > $@ 2>&1
+
+ $(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 lli changes
+ #
+ REPORT_DEPENDENCIES := $(LLC)
Index: llvm/test/Programs/TEST.llc.report
diff -c /dev/null llvm/test/Programs/TEST.llc.report:1.1
*** /dev/null Tue Jan 13 18:25:40 2004
--- llvm/test/Programs/TEST.llc.report Tue Jan 13 18:25:30 2004
***************
*** 0 ****
--- 1,50 ----
+ ##=== TEST.jit.report - Report description for jit tests -------*- perl -*-===##
+ #
+ # This file defines a report to be generated for the jit test.
+ #
+ ##===----------------------------------------------------------------------===##
+
+ # Sort by name
+ $SortCol = 1;
+ $TrimRepeatedPrefix = 1;
+
+ sub TotalInstrEliminations {
+ my ($Cols, $Col) = @_;
+ $iMov = $Cols->[$Col-2];
+ $peep = $Cols->[$Col-1];
+ if ($iMov eq "*") { $iMov = 0; }
+ if ($peep eq "*") { $peep = 0; }
+
+ return $iMov + $peep;
+ }
+
+ # 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'],
+ [],
+ # Times
+ ["Total" , 'real ([0-9.]+)'],
+ ["CodeGen", 'Total Execution Time: ([0-9.]+)'],
+ ["InstSel", '([0-9.]+) \([^)]+\)[ 0-9A-Za-z]+Instruction Selection'],
+ ["LiveVar", '([0-9.]+) \([^)]+\)[ 0-9A-Za-z]+Live Variable'],
+ ["RA" , '([0-9.]+) \([^)]+\)[ 0-9A-Za-z]+Register Allocator'],
+ ["FPStack", '([0-9.]+) \([^)]+\)[ 0-9]+X86 FP Stackifier'],
+ ["Peep" , '([0-9.]+) \([^)]+\)[- 0-9]+X86 Peephole Optimizer'],
+ [],
+ # Sizes
+ ["#MCInsts", '([0-9]+).*Number of machine instrs printed'],
+ ["#Int" , '([0-9]+).*Number of intervals'],
+ [],
+ # Number of transformations
+ ["#spill" , '([0-9]+).*Number of registers spilled'],
+ ["#reload", '([0-9]+).*Number of registers reloaded'],
+ ["#fp" , '([0-9]+).*Number of floating point instructions'],
+ ["#fxch" , '([0-9]+).*Number of fxch instructions inserted'],
+ ["#i-mov" , '([0-9]+).*Number of identity moves eliminated'],
+ ["#peep" , '([0-9]+).*Number of peephole optimization performed'],
+ ["#tot-el", \&TotalInstrEliminations],
+ []
+ );
More information about the llvm-commits
mailing list