forked from intel/llvm-test-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add llc report. Similar to the jit report but it runs faster since it…
… doesn't run the actual program llvm-svn: 10836
- Loading branch information
Showing
2 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,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], | ||
[] | ||
); |