@@ -72,6 +72,7 @@ export const defaultCompileFilter: CompileBenchmarkFilter = {
7272export type Profile = "check" | "debug" | "opt" | "doc" ;
7373export type CodegenBackend = "llvm" | "cranelift" ;
7474export type Category = "primary" | "secondary" ;
75+ export type Target = "x86_64-unknown-linux-gnu" ;
7576
7677export type CompileBenchmarkMap = Dict < CompileBenchmarkMetadata > ;
7778
@@ -95,6 +96,7 @@ export interface CompileBenchmarkComparison {
9596 profile : Profile ;
9697 scenario : string ;
9798 backend : CodegenBackend ;
99+ target : Target ;
98100 comparison : StatComparison ;
99101}
100102
@@ -103,6 +105,7 @@ export interface CompileTestCase {
103105 profile : Profile ;
104106 scenario : string ;
105107 backend : CodegenBackend ;
108+ target : Target ;
106109 category : Category ;
107110}
108111
@@ -198,6 +201,7 @@ export function computeCompileComparisonsWithNonRelevant(
198201 profile : c . profile ,
199202 scenario : c . scenario ,
200203 backend : c . backend ,
204+ target : c . target ,
201205 category : ( benchmarkMap [ c . benchmark ] || { } ) . category || "secondary" ,
202206 } ;
203207 return calculateComparison ( c . comparison , testCase ) ;
@@ -242,18 +246,20 @@ export function transformDataForBackendComparison(
242246 cranelift : number | null ;
243247 benchmark : string ;
244248 profile : Profile ;
249+ target : Target ;
245250 scenario : string ;
246251 }
247252 > = new Map ( ) ;
248253 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 } ` ;
250255 if ( ! benchmarkMap . has ( key ) ) {
251256 benchmarkMap . set ( key , {
252257 llvm : null ,
253258 cranelift : null ,
254259 benchmark : comparison . benchmark ,
255260 profile : comparison . profile ,
256261 scenario : comparison . scenario ,
262+ target : comparison . target ,
257263 } ) ;
258264 }
259265 const record = benchmarkMap . get ( key ) ;
@@ -271,6 +277,7 @@ export function transformDataForBackendComparison(
271277 scenario : entry . scenario ,
272278 // Treat LLVM as the baseline
273279 backend : "llvm" ,
280+ target : entry . target ,
274281 comparison : {
275282 statistics : [ entry . llvm , entry . cranelift ] ,
276283 is_relevant : true ,
0 commit comments