forked from llvm/llvm-test-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTEST.micro.report
146 lines (134 loc) · 4.2 KB
/
TEST.micro.report
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
##=== TEST.micro.report - Report for the MICRO'03 paper --------*- perl -*-===##
#
# This file defines a report to be generated for the micro paper.
#
# This report should be generated with the following command:
# gmake ENABLE_OPTIMIZED=1 TEST=micro RUNTIMELIMIT=120 LARGE_PROBLEM_SIZE=1 CFLAGS=-O3
#
##===----------------------------------------------------------------------===##
# Sort by name
$SortCol = 4;
## Sort in descending order
$SortReverse = 1;
$SortNumeric = 1;
# Helper function
sub Ratio {
my ($Cols, $Col) = @_;
if ($Cols->[$Col-1] ne "*" and
$Cols->[$Col-1] != "0") {
return 0 if ($Cols->[$Col-2] eq "*");
return $Cols->[$Col-2]/$Cols->[$Col-1];
} else {
return "n/a";
}
}
sub InvRatio {
my ($Cols, $Col) = @_;
if ($Cols->[$Col-2] ne "*" and
$Cols->[$Col-2] != "0") {
return $Cols->[$Col-1]/$Cols->[$Col-2];
} else {
return "n/a";
}
}
sub LLVMRatio {
my ($Cols, $Col) = @_;
if ($Cols->[5] ne "*") {
return $Cols->[5]*1733333333/$Cols->[10];
} else {
return "n/a";
}
}
sub FormatSize {
my $Size = shift;
return "*" if ($Size eq "*");
if ($Size > 10*1024*1024) {
return (int $Size*10 / (1024*1024))/10 . "MB";
} elsif ($Size > 10*1024) {
return sprintf("%2.1f", $Size / 1024) . "KB";
} else {
return $Size . "B";
}
}
sub FormatSizeKB {
my $Size = shift;
return "*" if ($Size eq "*");
return sprintf("%2.1f", $Size / 1024);
}
sub FormatRatio {
return sprintf("%0.2f", shift);
}
sub FormatRatio2 {
return sprintf("%0.3f", shift);
}
@LatexColumns = (1, 15, 12, # LOC, LLC Size, BytecodeSize
10, 9, 11, # #LLVM Insts, # MachineInsts, Ratio
5, 4, 6); # JIT Time, Nat Run Time, Ratio
# Specify how to format columns nicely for printing...
%LatexColumnFormat = (
6 => \&FormatRatio2,
11 => \&FormatRatio,
12 => \&FormatSizeKB,
15 => \&FormatSizeKB,
);
# For latex output, limit benchmarks and rename as appropriate
@LatexRowMapOrder = (
'treeadd' => 'Olden-treeadd',
'bisort' => 'Olden-bisort',
'mst' => 'Olden-mst',
'perimeter' => 'Olden-perimeter',
'health' => 'Olden-health',
'tsp' => 'Olden-tsp',
'power' => 'Olden-power',
'em3d' => 'Olden-em3d',
'voronoi' => 'Olden-voronoi',
'bh' => 'Olden-bh',
'-' => '-',
'anagram' => 'ptrdist-anagram',
'ks' => 'ptrdist-ks',
'ft' => 'ptrdist-ft',
'yacr2' => 'ptrdist-yacr2',
'bc' => 'ptrdist-bc',
'-' => '-',
'181.mcf' => '181.mcf',
'256.bzip2' => '256.bzip2',
'164.gzip' => '164.gzip',
'197.parser' => '197.parser',
'175.vpr' => '175.vpr',
'186.crafty' => '186.crafty',
'255.vortex' => '255.vortex',
# '-' => '-',
# 'sgefa' => 'sgefa',
# 'sim' => 'sim',
# 'burg' => 'burg',
# 'fhourstones' => 'fhourstones',
# 'optimizer-eval' => 'optimizer-eval',
# 'flops' => 'flops',
# 'llu' => 'llubenchmark'
);
# 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'],
["LOC:" , 'LOC: *([0-9]+)'],
[],
# Times
["Total" , 'JIT TIME: real ([0-9.]+)'],
["NatTotal", 'NAT TIME: real ([0-9.]+)'],
["CodeGen", 'Total Execution Time: ([0-9.]+)'],
["CodeGenRatio", \&InvRatio],
[],
# Sizes
["MCSize" , '([0-9]+).*Number of bytes of machine code compiled'],
["#MCInsts" , '([0-9]+).*Number of machine instructions emitted'],
["LLVMInsts", '([0-9]+).*Number of instructions'],
["mc/LLVM ratio", \&Ratio],
["BytcdSize", '([0-9]+).*Number of bytecode bytes written'],
[],
["Cycle/LLVM", \&LLVMRatio],
["LLC Size", 'LLC SIZE: *([0-9]+)'],
# Number of transformations
[]
);