@@ -76,12 +76,9 @@ pub struct ModuleConfig {
7676 /// Names of additional optimization passes to run.
7777 pub passes : Vec < String > ,
7878 /// Some(level) to optimize at a certain level, or None to run
79- /// absolutely no optimizations (used for the metadata module).
79+ /// absolutely no optimizations (used for the allocator module).
8080 pub opt_level : Option < config:: OptLevel > ,
8181
82- /// Some(level) to optimize binary size, or None to not affect program size.
83- pub opt_size : Option < config:: OptLevel > ,
84-
8582 pub pgo_gen : SwitchWithOptPath ,
8683 pub pgo_use : Option < PathBuf > ,
8784 pub pgo_sample_use : Option < PathBuf > ,
@@ -102,15 +99,13 @@ pub struct ModuleConfig {
10299 pub emit_obj : EmitObj ,
103100 pub emit_thin_lto : bool ,
104101 pub emit_thin_lto_summary : bool ,
105- pub bc_cmdline : String ,
106102
107103 // Miscellaneous flags. These are mostly copied from command-line
108104 // options.
109105 pub verify_llvm_ir : bool ,
110106 pub lint_llvm_ir : bool ,
111107 pub no_prepopulate_passes : bool ,
112108 pub no_builtins : bool ,
113- pub time_module : bool ,
114109 pub vectorize_loop : bool ,
115110 pub vectorize_slp : bool ,
116111 pub merge_functions : bool ,
@@ -171,7 +166,6 @@ impl ModuleConfig {
171166 passes : if_regular ! ( sess. opts. cg. passes. clone( ) , vec![ ] ) ,
172167
173168 opt_level : opt_level_and_size,
174- opt_size : opt_level_and_size,
175169
176170 pgo_gen : if_regular ! (
177171 sess. opts. cg. profile_generate. clone( ) ,
@@ -221,17 +215,12 @@ impl ModuleConfig {
221215 sess. opts. output_types. contains_key( & OutputType :: ThinLinkBitcode ) ,
222216 false
223217 ) ,
224- bc_cmdline : sess. target . bitcode_llvm_cmdline . to_string ( ) ,
225218
226219 verify_llvm_ir : sess. verify_llvm_ir ( ) ,
227220 lint_llvm_ir : sess. opts . unstable_opts . lint_llvm_ir ,
228221 no_prepopulate_passes : sess. opts . cg . no_prepopulate_passes ,
229222 no_builtins : no_builtins || sess. target . no_builtins ,
230223
231- // Exclude metadata and allocator modules from time_passes output,
232- // since they throw off the "LLVM passes" measurement.
233- time_module : if_regular ! ( true , false ) ,
234-
235224 // Copy what clang does by turning on loop vectorization at O2 and
236225 // slp vectorization at O3.
237226 vectorize_loop : !sess. opts . cg . no_vectorize_loops
@@ -1740,7 +1729,7 @@ fn spawn_work<'a, B: ExtraBackendMethods>(
17401729 llvm_start_time : & mut Option < VerboseTimingGuard < ' a > > ,
17411730 work : WorkItem < B > ,
17421731) {
1743- if cgcx . config ( work . module_kind ( ) ) . time_module && llvm_start_time. is_none ( ) {
1732+ if llvm_start_time. is_none ( ) {
17441733 * llvm_start_time = Some ( cgcx. prof . verbose_generic_activity ( "LLVM_passes" ) ) ;
17451734 }
17461735
0 commit comments