@@ -75,12 +75,9 @@ pub struct ModuleConfig {
75
75
/// Names of additional optimization passes to run.
76
76
pub passes : Vec < String > ,
77
77
/// 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).
79
79
pub opt_level : Option < config:: OptLevel > ,
80
80
81
- /// Some(level) to optimize binary size, or None to not affect program size.
82
- pub opt_size : Option < config:: OptLevel > ,
83
-
84
81
pub pgo_gen : SwitchWithOptPath ,
85
82
pub pgo_use : Option < PathBuf > ,
86
83
pub pgo_sample_use : Option < PathBuf > ,
@@ -101,15 +98,13 @@ pub struct ModuleConfig {
101
98
pub emit_obj : EmitObj ,
102
99
pub emit_thin_lto : bool ,
103
100
pub emit_thin_lto_summary : bool ,
104
- pub bc_cmdline : String ,
105
101
106
102
// Miscellaneous flags. These are mostly copied from command-line
107
103
// options.
108
104
pub verify_llvm_ir : bool ,
109
105
pub lint_llvm_ir : bool ,
110
106
pub no_prepopulate_passes : bool ,
111
107
pub no_builtins : bool ,
112
- pub time_module : bool ,
113
108
pub vectorize_loop : bool ,
114
109
pub vectorize_slp : bool ,
115
110
pub merge_functions : bool ,
@@ -170,7 +165,6 @@ impl ModuleConfig {
170
165
passes : if_regular ! ( sess. opts. cg. passes. clone( ) , vec![ ] ) ,
171
166
172
167
opt_level : opt_level_and_size,
173
- opt_size : opt_level_and_size,
174
168
175
169
pgo_gen : if_regular ! (
176
170
sess. opts. cg. profile_generate. clone( ) ,
@@ -220,17 +214,12 @@ impl ModuleConfig {
220
214
sess. opts. output_types. contains_key( & OutputType :: ThinLinkBitcode ) ,
221
215
false
222
216
) ,
223
- bc_cmdline : sess. target . bitcode_llvm_cmdline . to_string ( ) ,
224
217
225
218
verify_llvm_ir : sess. verify_llvm_ir ( ) ,
226
219
lint_llvm_ir : sess. opts . unstable_opts . lint_llvm_ir ,
227
220
no_prepopulate_passes : sess. opts . cg . no_prepopulate_passes ,
228
221
no_builtins : no_builtins || sess. target . no_builtins ,
229
222
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
-
234
223
// Copy what clang does by turning on loop vectorization at O2 and
235
224
// slp vectorization at O3.
236
225
vectorize_loop : !sess. opts . cg . no_vectorize_loops
@@ -1726,7 +1715,7 @@ fn spawn_work<'a, B: ExtraBackendMethods>(
1726
1715
llvm_start_time : & mut Option < VerboseTimingGuard < ' a > > ,
1727
1716
work : WorkItem < B > ,
1728
1717
) {
1729
- if cgcx . config ( work . module_kind ( ) ) . time_module && llvm_start_time. is_none ( ) {
1718
+ if llvm_start_time. is_none ( ) {
1730
1719
* llvm_start_time = Some ( cgcx. prof . verbose_generic_activity ( "LLVM_passes" ) ) ;
1731
1720
}
1732
1721
0 commit comments