@@ -75,12 +75,9 @@ pub struct ModuleConfig {
7575 /// Names of additional optimization passes to run.
7676 pub passes : Vec < String > ,
7777 /// Some(level) to optimize at a certain level, or None to run
78- /// absolutely no optimizations (used for the metadata module).
78+ /// absolutely no optimizations (used for the allocator module).
7979 pub opt_level : Option < config:: OptLevel > ,
8080
81- /// Some(level) to optimize binary size, or None to not affect program size.
82- pub opt_size : Option < config:: OptLevel > ,
83-
8481 pub pgo_gen : SwitchWithOptPath ,
8582 pub pgo_use : Option < PathBuf > ,
8683 pub pgo_sample_use : Option < PathBuf > ,
@@ -101,15 +98,13 @@ pub struct ModuleConfig {
10198 pub emit_obj : EmitObj ,
10299 pub emit_thin_lto : bool ,
103100 pub emit_thin_lto_summary : bool ,
104- pub bc_cmdline : String ,
105101
106102 // Miscellaneous flags. These are mostly copied from command-line
107103 // options.
108104 pub verify_llvm_ir : bool ,
109105 pub lint_llvm_ir : bool ,
110106 pub no_prepopulate_passes : bool ,
111107 pub no_builtins : bool ,
112- pub time_module : bool ,
113108 pub vectorize_loop : bool ,
114109 pub vectorize_slp : bool ,
115110 pub merge_functions : bool ,
@@ -170,7 +165,6 @@ impl ModuleConfig {
170165 passes : if_regular ! ( sess. opts. cg. passes. clone( ) , vec![ ] ) ,
171166
172167 opt_level : opt_level_and_size,
173- opt_size : opt_level_and_size,
174168
175169 pgo_gen : if_regular ! (
176170 sess. opts. cg. profile_generate. clone( ) ,
@@ -220,17 +214,12 @@ impl ModuleConfig {
220214 sess. opts. output_types. contains_key( & OutputType :: ThinLinkBitcode ) ,
221215 false
222216 ) ,
223- bc_cmdline : sess. target . bitcode_llvm_cmdline . to_string ( ) ,
224217
225218 verify_llvm_ir : sess. verify_llvm_ir ( ) ,
226219 lint_llvm_ir : sess. opts . unstable_opts . lint_llvm_ir ,
227220 no_prepopulate_passes : sess. opts . cg . no_prepopulate_passes ,
228221 no_builtins : no_builtins || sess. target . no_builtins ,
229222
230- // Exclude metadata and allocator modules from time_passes output,
231- // since they throw off the "LLVM passes" measurement.
232- time_module : if_regular ! ( true , false ) ,
233-
234223 // Copy what clang does by turning on loop vectorization at O2 and
235224 // slp vectorization at O3.
236225 vectorize_loop : !sess. opts . cg . no_vectorize_loops
@@ -1726,7 +1715,7 @@ fn spawn_work<'a, B: ExtraBackendMethods>(
17261715 llvm_start_time : & mut Option < VerboseTimingGuard < ' a > > ,
17271716 work : WorkItem < B > ,
17281717) {
1729- if cgcx . config ( work . module_kind ( ) ) . time_module && llvm_start_time. is_none ( ) {
1718+ if llvm_start_time. is_none ( ) {
17301719 * llvm_start_time = Some ( cgcx. prof . verbose_generic_activity ( "LLVM_passes" ) ) ;
17311720 }
17321721
0 commit comments