about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/nrvo.rs
AgeCommit message (Collapse)AuthorLines
2025-09-16Enable DestinationPropagation by default.Camille GILLOT-234/+0
2025-01-23Disable non-required MIR opts with `optimize(none)`clubby789-0/+4
Co-authored-by: Waffle Lapkin <waffle.lapkin@gmail.com>
2025-01-11rename `BitSet` to `DenseBitSet`Rémy Rakic-2/+2
This should make it clearer that this bitset is dense, with the advantages and disadvantages that it entails.
2024-11-26Remove -Zfuel.Camille GILLOT-4/+0
2024-09-09Reduce visibilities, and add `warn(unreachable_pub)`.Nicholas Nethercote-1/+1
Lots of unnecessary `pub`s in this crate. Most are downgraded to `pub(super)`, though some don't need any visibility.
2024-09-03Move `MirPass` to `rustc_mir_transform`.Nicholas Nethercote-3/+1
Because that's now the only crate that uses it. Moving stuff out of `rustc_middle` is always welcome. I chose to use `impl crate::MirPass`/`impl crate::MirLint` (with explicit `crate::`) everywhere because that's the only mention of `MirPass`/`MirLint` used in all of these files. (Prior to this change, `MirPass` was mostly imported via `use rustc_middle::mir::*` items.)
2024-08-30Remove `#[macro_use] extern crate tracing` from `rustc_mir_transform`.Nicholas Nethercote-0/+1
2024-05-31Revert "Auto merge of #115105 - cjgillot:dest-prop-default, r=oli-obk"Camille GILLOT-0/+235
This reverts commit cfb730450f847bb622243eaaab15e77e58d91767, reversing changes made to 91c0823ee63e793d990bb9fed898dc95b5d6db51.
2024-05-29Enable DestinationPropagation by default.Camille GILLOT-235/+0
2024-05-13Remove `extern crate rustc_middle` from `rustc_mir_transform`.Nicholas Nethercote-0/+1
2024-03-28and moreklensy-5/+2
warning: this argument is a mutable reference, but not used mutably --> compiler\rustc_mir_transform\src\coroutine.rs:1229:11 | 1229 | body: &mut Body<'tcx>, | ^^^^^^^^^^^^^^^ help: consider changing to: `&Body<'tcx>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut warning: this argument is a mutable reference, but not used mutably --> compiler\rustc_mir_transform\src\nrvo.rs:123:11 | 123 | body: &mut mir::Body<'_>, | ^^^^^^^^^^^^^^^^^^ help: consider changing to: `&mir::Body<'_>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut warning: this argument is a mutable reference, but not used mutably --> compiler\rustc_mir_transform\src\nrvo.rs:87:34 | 87 | fn local_eligible_for_nrvo(body: &mut mir::Body<'_>) -> Option<Local> { | ^^^^^^^^^^^^^^^^^^ help: consider changing to: `&mir::Body<'_>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
2024-01-22Remove uses of HybridBitSet.Camille GILLOT-2/+2
2023-10-10add some comments explaining why MIR opts are marked as unsoundRalf Jung-1/+1
2023-07-25inline format!() args from rustc_codegen_llvm to the end (4)Matthias Krüger-1/+1
r? @WaffleLapkin
2023-05-24Use `Option::is_some_and` and `Result::is_ok_and` in the compilerMaybe Waffle-1/+1
2023-05-08Disable nrvo mir optJakob Degen-1/+2
2023-03-14Remove LocalKind::Var.Camille GILLOT-1/+1
2022-08-26Replace `Body::basic_blocks()` with field accessTomasz Miąsko-2/+2
2022-08-09Add option to `mir::MutVisitor` to not invalidate CFG.Jakob Degen-2/+2
This also applies that option to some uses of the visitor
2022-07-07Move `predecessors` from Body to BasicBlocksTomasz Miąsko-1/+1
2022-07-01cleanup mir visitor for `rustc::pass_by_value`lcnr-1/+1
2022-03-30Spellchecking compiler commentsYuri Astrakhan-1/+1
This PR cleans up the rest of the spelling mistakes in the compiler comments. This PR does not change any literal or code spelling issues.
2022-02-19Adopt let else in more placesest31-6/+3
2021-12-07Remove `in_band_lifetimes` from `rustc_mir_transform`Scott McMurray-2/+2
This one is a heavy `'tcx` user. Two interesting ones: This one had the `'tcx` declared on the function, despite the trait taking a `'tcx`: ```diff -impl Visitor<'_> for UsedLocals { +impl<'tcx> Visitor<'tcx> for UsedLocals { fn visit_statement(&mut self, statement: &Statement<'tcx>, location: Location) { ``` This one use in-band for one, and underscore for the other: ```diff -pub fn remove_dead_blocks(tcx: TyCtxt<'tcx>, body: &mut Body<'_>) { +pub fn remove_dead_blocks<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { ```
2021-12-02Update passes with new interfaceDylan MacKenzie-4/+4
2021-09-07Move rustc_mir::transform to rustc_mir_transform.Camille GILLOT-0/+239