-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not clone the Body for ConstProp #115797
Conversation
r? @davidtwco (rustbot has picked a reviewer for you, use r? to override) |
Some changes occurred in cc @BoxyUwU Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 Some changes might have occurred in exhaustiveness checking cc @Nadrieril Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
Which part of #115748 do you need? If it's just the flag to skip the |
This comment has been minimized.
This comment has been minimized.
72647c6
to
d0cba3d
Compare
const PANIC_ON_ALLOC_FAIL: bool = true; // all allocations are small (see `MAX_ALLOC_LIMIT`) | ||
|
||
const POST_MONO_CHECKS: bool = false; // this MIR is still generic! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out this is not the entire reason, with const-generics we (try to) run regular CTFE on generic MIR as well.
It's just, we really don't need the post-mono checks here since we're not actually doing evaluation.
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Do not clone the Body for ConstProp Based on rust-lang#115748 for the `POST_MONO_CHECKS` flag.
Is there an error with bors or has there been a point in time where this PR modified other submodules (at least, it doesn't modify any Clippy files)? I can't find any commit that modifies one of these files. 🤷♀️ |
No issue with bors. Just me being lazy and cherry-picking a large commit instead of re-coding 8 lines. |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (438955f): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 632.565s -> 631.473s (-0.17%) |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (5adddad): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 632.671s -> 632.02s (-0.10%) |
Can this be applied to const_prop_lint too? Code looks c&p at some places. rust/compiler/rustc_mir_transform/src/const_prop_lint.rs Lines 108 to 119 in 56e1aaa
|
Do not clone MIR for const-prop lint. Addresses rust-lang#115797 (comment)
Rollup merge of rust-lang#115908 - cjgillot:lint-noclone, r=oli-obk Do not clone MIR for const-prop lint. Addresses rust-lang#115797 (comment)
Based on #115748 for thePOST_MONO_CHECKS
flag.