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