diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-08-15 16:16:33 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-15 16:16:33 +1000 |
| commit | 60cb5502c14662f7a2bf95f5f511821ba6eaf9da (patch) | |
| tree | 7d07a5ded1c6a06e9624245e9b6381d0a0cb2df9 /compiler/rustc_codegen_ssa/src/back | |
| parent | 65e2a8b6d89b2160827bd3e91d7eb523c82084ad (diff) | |
| parent | 8f648d7185a8455151951f30357b93dee726c6cb (diff) | |
| download | rust-60cb5502c14662f7a2bf95f5f511821ba6eaf9da.tar.gz rust-60cb5502c14662f7a2bf95f5f511821ba6eaf9da.zip | |
Rollup merge of #145004 - bjorn3:remove_unused_fields, r=WaffleLapkin
Couple of minor cleanups
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/write.rs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs index 2e8122798d1..26d089a1171 100644 --- a/compiler/rustc_codegen_ssa/src/back/write.rs +++ b/compiler/rustc_codegen_ssa/src/back/write.rs @@ -75,12 +75,9 @@ pub struct ModuleConfig { /// Names of additional optimization passes to run. pub passes: Vec<String>, /// Some(level) to optimize at a certain level, or None to run - /// absolutely no optimizations (used for the metadata module). + /// absolutely no optimizations (used for the allocator module). pub opt_level: Option<config::OptLevel>, - /// Some(level) to optimize binary size, or None to not affect program size. - pub opt_size: Option<config::OptLevel>, - pub pgo_gen: SwitchWithOptPath, pub pgo_use: Option<PathBuf>, pub pgo_sample_use: Option<PathBuf>, @@ -101,7 +98,6 @@ pub struct ModuleConfig { pub emit_obj: EmitObj, pub emit_thin_lto: bool, pub emit_thin_lto_summary: bool, - pub bc_cmdline: String, // Miscellaneous flags. These are mostly copied from command-line // options. @@ -109,7 +105,6 @@ pub struct ModuleConfig { pub lint_llvm_ir: bool, pub no_prepopulate_passes: bool, pub no_builtins: bool, - pub time_module: bool, pub vectorize_loop: bool, pub vectorize_slp: bool, pub merge_functions: bool, @@ -170,7 +165,6 @@ impl ModuleConfig { passes: if_regular!(sess.opts.cg.passes.clone(), vec![]), opt_level: opt_level_and_size, - opt_size: opt_level_and_size, pgo_gen: if_regular!( sess.opts.cg.profile_generate.clone(), @@ -220,17 +214,12 @@ impl ModuleConfig { sess.opts.output_types.contains_key(&OutputType::ThinLinkBitcode), false ), - bc_cmdline: sess.target.bitcode_llvm_cmdline.to_string(), verify_llvm_ir: sess.verify_llvm_ir(), lint_llvm_ir: sess.opts.unstable_opts.lint_llvm_ir, no_prepopulate_passes: sess.opts.cg.no_prepopulate_passes, no_builtins: no_builtins || sess.target.no_builtins, - // Exclude metadata and allocator modules from time_passes output, - // since they throw off the "LLVM passes" measurement. - time_module: if_regular!(true, false), - // Copy what clang does by turning on loop vectorization at O2 and // slp vectorization at O3. vectorize_loop: !sess.opts.cg.no_vectorize_loops @@ -1726,7 +1715,7 @@ fn spawn_work<'a, B: ExtraBackendMethods>( llvm_start_time: &mut Option<VerboseTimingGuard<'a>>, work: WorkItem<B>, ) { - if cgcx.config(work.module_kind()).time_module && llvm_start_time.is_none() { + if llvm_start_time.is_none() { *llvm_start_time = Some(cgcx.prof.verbose_generic_activity("LLVM_passes")); } |
