@@ -72,6 +72,7 @@ export const defaultCompileFilter: CompileBenchmarkFilter = {
72
72
export type Profile = "check" | "debug" | "opt" | "doc" ;
73
73
export type CodegenBackend = "llvm" | "cranelift" ;
74
74
export type Category = "primary" | "secondary" ;
75
+ export type Target = "x86_64-unknown-linux-gnu" ;
75
76
76
77
export type CompileBenchmarkMap = Dict < CompileBenchmarkMetadata > ;
77
78
@@ -95,6 +96,7 @@ export interface CompileBenchmarkComparison {
95
96
profile : Profile ;
96
97
scenario : string ;
97
98
backend : CodegenBackend ;
99
+ target : Target ;
98
100
comparison : StatComparison ;
99
101
}
100
102
@@ -103,6 +105,7 @@ export interface CompileTestCase {
103
105
profile : Profile ;
104
106
scenario : string ;
105
107
backend : CodegenBackend ;
108
+ target : Target ;
106
109
category : Category ;
107
110
}
108
111
@@ -198,6 +201,7 @@ export function computeCompileComparisonsWithNonRelevant(
198
201
profile : c . profile ,
199
202
scenario : c . scenario ,
200
203
backend : c . backend ,
204
+ target : c . target ,
201
205
category : ( benchmarkMap [ c . benchmark ] || { } ) . category || "secondary" ,
202
206
} ;
203
207
return calculateComparison ( c . comparison , testCase ) ;
@@ -242,18 +246,20 @@ export function transformDataForBackendComparison(
242
246
cranelift : number | null ;
243
247
benchmark : string ;
244
248
profile : Profile ;
249
+ target : Target ;
245
250
scenario : string ;
246
251
}
247
252
> = new Map ( ) ;
248
253
for ( const comparison of comparisons ) {
249
- const key = `${ comparison . benchmark } ;${ comparison . profile } ;${ comparison . scenario } ` ;
254
+ const key = `${ comparison . benchmark } ;${ comparison . profile } ;${ comparison . scenario } ; ${ comparison . target } ` ;
250
255
if ( ! benchmarkMap . has ( key ) ) {
251
256
benchmarkMap . set ( key , {
252
257
llvm : null ,
253
258
cranelift : null ,
254
259
benchmark : comparison . benchmark ,
255
260
profile : comparison . profile ,
256
261
scenario : comparison . scenario ,
262
+ target : comparison . target ,
257
263
} ) ;
258
264
}
259
265
const record = benchmarkMap . get ( key ) ;
@@ -271,6 +277,7 @@ export function transformDataForBackendComparison(
271
277
scenario : entry . scenario ,
272
278
// Treat LLVM as the baseline
273
279
backend : "llvm" ,
280
+ target : entry . target ,
274
281
comparison : {
275
282
statistics : [ entry . llvm , entry . cranelift ] ,
276
283
is_relevant : true ,
0 commit comments