@@ -3,7 +3,7 @@ use crate::compile::benchmark::codegen_backend::CodegenBackend;
33use crate :: compile:: benchmark:: patch:: Patch ;
44use crate :: compile:: benchmark:: profile:: Profile ;
55use crate :: compile:: benchmark:: scenario:: Scenario ;
6- use crate :: compile:: benchmark:: compiler_target :: CompilerTarget ;
6+ use crate :: compile:: benchmark:: target :: Target ;
77use crate :: compile:: execute:: { CargoProcess , Processor } ;
88use crate :: toolchain:: Toolchain ;
99use crate :: utils:: wait_for_future;
@@ -21,7 +21,7 @@ pub mod codegen_backend;
2121pub ( crate ) mod patch;
2222pub mod profile;
2323pub mod scenario;
24- pub mod compiler_target ;
24+ pub mod target ;
2525
2626fn default_runs ( ) -> usize {
2727 3
@@ -182,7 +182,7 @@ impl Benchmark {
182182 cwd : & ' a Path ,
183183 profile : Profile ,
184184 backend : CodegenBackend ,
185- compiler_target : & ' a CompilerTarget ,
185+ target : Target ,
186186 ) -> CargoProcess < ' a > {
187187 let mut cargo_args = self
188188 . config
@@ -223,7 +223,7 @@ impl Benchmark {
223223 . collect ( ) ,
224224 touch_file : self . config . touch_file . clone ( ) ,
225225 jobserver : None ,
226- compiler_target ,
226+ target ,
227227 }
228228 }
229229
@@ -236,7 +236,7 @@ impl Benchmark {
236236 backends : & [ CodegenBackend ] ,
237237 toolchain : & Toolchain ,
238238 iterations : Option < usize > ,
239- compiler_targets : & [ CompilerTarget ]
239+ targets : & [ Target ]
240240 ) -> anyhow:: Result < ( ) > {
241241 if self . config . disabled {
242242 eprintln ! ( "Skipping {}: disabled" , self . name) ;
@@ -268,11 +268,11 @@ impl Benchmark {
268268 }
269269
270270 eprintln ! ( "Preparing {}" , self . name) ;
271- let mut target_dirs: Vec < ( ( CodegenBackend , Profile , & CompilerTarget ) , TempDir ) > = vec ! [ ] ;
271+ let mut target_dirs: Vec < ( ( CodegenBackend , Profile , Target ) , TempDir ) > = vec ! [ ] ;
272272 for backend in backends {
273273 for profile in & profiles {
274- for compiler_target in compiler_targets {
275- target_dirs. push ( ( ( * backend, * profile, & compiler_target ) , self . make_temp_dir ( & self . path ) ?) ) ;
274+ for target in targets {
275+ target_dirs. push ( ( ( * backend, * profile, * target ) , self . make_temp_dir ( & self . path ) ?) ) ;
276276 }
277277 }
278278 }
@@ -311,12 +311,12 @@ impl Benchmark {
311311 )
312312 . context ( "jobserver::new" ) ?;
313313 let mut threads = Vec :: with_capacity ( target_dirs. len ( ) ) ;
314- for ( ( backend, profile, compiler_target ) , prep_dir) in & target_dirs {
314+ for ( ( backend, profile, target ) , prep_dir) in & target_dirs {
315315 let server = server. clone ( ) ;
316316 let thread = s. spawn :: < _ , anyhow:: Result < ( ) > > ( move || {
317317 wait_for_future ( async move {
318318 let server = server. clone ( ) ;
319- self . mk_cargo_process ( toolchain, prep_dir. path ( ) , * profile, * backend, compiler_target )
319+ self . mk_cargo_process ( toolchain, prep_dir. path ( ) , * profile, * backend, * target )
320320 . jobserver ( server)
321321 . run_rustc ( false )
322322 . await ?;
@@ -350,13 +350,13 @@ impl Benchmark {
350350 let mut timing_dirs: Vec < ManuallyDrop < TempDir > > = vec ! [ ] ;
351351
352352 let benchmark_start = std:: time:: Instant :: now ( ) ;
353- for ( ( backend, profile, compiler_target ) , prep_dir) in & target_dirs {
353+ for ( ( backend, profile, target ) , prep_dir) in & target_dirs {
354354 let backend = * backend;
355355 let profile = * profile;
356- let compiler_target = * compiler_target ;
356+ let target = * target ;
357357 eprintln ! (
358358 "Running {}: {:?} + {:?} + {:?} + {:?}" ,
359- self . name, profile, scenarios, backend, compiler_target ,
359+ self . name, profile, scenarios, backend, target ,
360360 ) ;
361361
362362 // We want at least two runs for all benchmarks (since we run
@@ -378,7 +378,7 @@ impl Benchmark {
378378
379379 // A full non-incremental build.
380380 if scenarios. contains ( & Scenario :: Full ) {
381- self . mk_cargo_process ( toolchain, cwd, profile, backend, & compiler_target )
381+ self . mk_cargo_process ( toolchain, cwd, profile, backend, target )
382382 . processor ( processor, Scenario :: Full , "Full" , None )
383383 . run_rustc ( true )
384384 . await ?;
@@ -389,7 +389,7 @@ impl Benchmark {
389389 // An incremental from scratch (slowest incremental case).
390390 // This is required for any subsequent incremental builds.
391391 if scenarios. iter ( ) . any ( |s| s. is_incr ( ) ) {
392- self . mk_cargo_process ( toolchain, cwd, profile, backend, & compiler_target )
392+ self . mk_cargo_process ( toolchain, cwd, profile, backend, target )
393393 . incremental ( true )
394394 . processor ( processor, Scenario :: IncrFull , "IncrFull" , None )
395395 . run_rustc ( true )
@@ -398,7 +398,7 @@ impl Benchmark {
398398
399399 // An incremental build with no changes (fastest incremental case).
400400 if scenarios. contains ( & Scenario :: IncrUnchanged ) {
401- self . mk_cargo_process ( toolchain, cwd, profile, backend, & compiler_target )
401+ self . mk_cargo_process ( toolchain, cwd, profile, backend, target )
402402 . incremental ( true )
403403 . processor ( processor, Scenario :: IncrUnchanged , "IncrUnchanged" , None )
404404 . run_rustc ( true )
@@ -413,7 +413,7 @@ impl Benchmark {
413413 // An incremental build with some changes (realistic
414414 // incremental case).
415415 let scenario_str = format ! ( "IncrPatched{}" , i) ;
416- self . mk_cargo_process ( toolchain, cwd, profile, backend, & compiler_target )
416+ self . mk_cargo_process ( toolchain, cwd, profile, backend, target )
417417 . incremental ( true )
418418 . processor (
419419 processor,
0 commit comments