Auto merge of #136332 - jhpratt:rollup-aa69d0e, r=jhpratt
Rollup of 9 pull requests Successful merges: - #132156 (When encountering unexpected closure return type, point at return type/expression) - #133429 (Autodiff Upstreaming - rustc_codegen_ssa, rustc_middle) - #136281 (`rustc_hir_analysis` cleanups) - #136297 (Fix a typo in profile-guided-optimization.md) - #136300 (atomic: extend compare_and_swap migration docs) - #136310 (normalize `*.long-type.txt` paths for compare-mode tests) - #136312 (Disable `overflow_delimited_expr` in edition 2024) - #136313 (Filter out RPITITs when suggesting unconstrained assoc type on too many generics) - #136323 (Fix a typo in conventions.md) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
7f36543a48
95 changed files with 1077 additions and 563 deletions
|
@ -398,6 +398,7 @@ mod desc {
|
|||
pub(crate) const parse_list: &str = "a space-separated list of strings";
|
||||
pub(crate) const parse_list_with_polarity: &str =
|
||||
"a comma-separated list of strings, with elements beginning with + or -";
|
||||
pub(crate) const parse_autodiff: &str = "a comma separated list of settings: `Print`, `PrintTA`, `PrintAA`, `PrintPerf`, `PrintModBefore`, `PrintModAfterOpts`, `PrintModAfterEnzyme`, `LooseTypes`, `NoModOptAfter`, `EnableFncOpt`, `NoVecUnroll`, `Inline`";
|
||||
pub(crate) const parse_comma_list: &str = "a comma-separated list of strings";
|
||||
pub(crate) const parse_opt_comma_list: &str = parse_comma_list;
|
||||
pub(crate) const parse_number: &str = "a number";
|
||||
|
@ -1029,6 +1030,38 @@ pub mod parse {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn parse_autodiff(slot: &mut Vec<AutoDiff>, v: Option<&str>) -> bool {
|
||||
let Some(v) = v else {
|
||||
*slot = vec![];
|
||||
return true;
|
||||
};
|
||||
let mut v: Vec<&str> = v.split(",").collect();
|
||||
v.sort_unstable();
|
||||
for &val in v.iter() {
|
||||
let variant = match val {
|
||||
"PrintTA" => AutoDiff::PrintTA,
|
||||
"PrintAA" => AutoDiff::PrintAA,
|
||||
"PrintPerf" => AutoDiff::PrintPerf,
|
||||
"Print" => AutoDiff::Print,
|
||||
"PrintModBefore" => AutoDiff::PrintModBefore,
|
||||
"PrintModAfterOpts" => AutoDiff::PrintModAfterOpts,
|
||||
"PrintModAfterEnzyme" => AutoDiff::PrintModAfterEnzyme,
|
||||
"LooseTypes" => AutoDiff::LooseTypes,
|
||||
"NoModOptAfter" => AutoDiff::NoModOptAfter,
|
||||
"EnableFncOpt" => AutoDiff::EnableFncOpt,
|
||||
"NoVecUnroll" => AutoDiff::NoVecUnroll,
|
||||
"Inline" => AutoDiff::Inline,
|
||||
_ => {
|
||||
// FIXME(ZuseZ4): print an error saying which value is not recognized
|
||||
return false;
|
||||
}
|
||||
};
|
||||
slot.push(variant);
|
||||
}
|
||||
|
||||
true
|
||||
}
|
||||
|
||||
pub(crate) fn parse_instrument_coverage(
|
||||
slot: &mut InstrumentCoverage,
|
||||
v: Option<&str>,
|
||||
|
@ -1736,6 +1769,22 @@ options! {
|
|||
either `loaded` or `not-loaded`."),
|
||||
assume_incomplete_release: bool = (false, parse_bool, [TRACKED],
|
||||
"make cfg(version) treat the current version as incomplete (default: no)"),
|
||||
autodiff: Vec<crate::config::AutoDiff> = (Vec::new(), parse_autodiff, [TRACKED],
|
||||
"a list of optional autodiff flags to enable
|
||||
Optional extra settings:
|
||||
`=PrintTA`
|
||||
`=PrintAA`
|
||||
`=PrintPerf`
|
||||
`=Print`
|
||||
`=PrintModBefore`
|
||||
`=PrintModAfterOpts`
|
||||
`=PrintModAfterEnzyme`
|
||||
`=LooseTypes`
|
||||
`=NoModOptAfter`
|
||||
`=EnableFncOpt`
|
||||
`=NoVecUnroll`
|
||||
`=Inline`
|
||||
Multiple options can be combined with commas."),
|
||||
#[rustc_lint_opt_deny_field_access("use `Session::binary_dep_depinfo` instead of this field")]
|
||||
binary_dep_depinfo: bool = (false, parse_bool, [TRACKED],
|
||||
"include artifacts (sysroot, crate dependencies) used during compilation in dep-info \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue