Make -Z new-llvm-pass-manager an Option<bool>
To allow it to have an LLVM version dependent default.
This commit is contained in:
parent
50e1dc1536
commit
0318883cd6
4 changed files with 4 additions and 4 deletions
|
@ -410,7 +410,7 @@ fn get_pgo_use_path(config: &ModuleConfig) -> Option<CString> {
|
|||
|
||||
pub(crate) fn should_use_new_llvm_pass_manager(config: &ModuleConfig) -> bool {
|
||||
// The new pass manager is disabled by default.
|
||||
config.new_llvm_pass_manager
|
||||
config.new_llvm_pass_manager.unwrap_or(false)
|
||||
}
|
||||
|
||||
pub(crate) unsafe fn optimize_with_new_llvm_pass_manager(
|
||||
|
|
|
@ -108,7 +108,7 @@ pub struct ModuleConfig {
|
|||
pub vectorize_slp: bool,
|
||||
pub merge_functions: bool,
|
||||
pub inline_threshold: Option<u32>,
|
||||
pub new_llvm_pass_manager: bool,
|
||||
pub new_llvm_pass_manager: Option<bool>,
|
||||
pub emit_lifetime_markers: bool,
|
||||
}
|
||||
|
||||
|
|
|
@ -709,7 +709,7 @@ fn test_debugging_options_tracking_hash() {
|
|||
tracked!(mir_emit_retag, true);
|
||||
tracked!(mir_opt_level, Some(4));
|
||||
tracked!(mutable_noalias, Some(true));
|
||||
tracked!(new_llvm_pass_manager, true);
|
||||
tracked!(new_llvm_pass_manager, Some(true));
|
||||
tracked!(no_codegen, true);
|
||||
tracked!(no_generate_arange_section, true);
|
||||
tracked!(no_link, true);
|
||||
|
|
|
@ -1112,7 +1112,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
|
|||
"MIR optimization level (0-4; default: 1 in non optimized builds and 2 in optimized builds)"),
|
||||
mutable_noalias: Option<bool> = (None, parse_opt_bool, [TRACKED],
|
||||
"emit noalias metadata for mutable references (default: yes for LLVM >= 12, otherwise no)"),
|
||||
new_llvm_pass_manager: bool = (false, parse_bool, [TRACKED],
|
||||
new_llvm_pass_manager: Option<bool> = (None, parse_opt_bool, [TRACKED],
|
||||
"use new LLVM pass manager (default: no)"),
|
||||
nll_facts: bool = (false, parse_bool, [UNTRACKED],
|
||||
"dump facts from NLL analysis into side files (default: no)"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue