about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/transform/nrvo.rs
AgeCommit message (Collapse)AuthorLines
2021-09-07Move rustc_mir::transform to rustc_mir_transform.Camille GILLOT-239/+0
2021-03-05Extract mir_opt_level to a method and use Option to be able to know if the ↵Santiago Pastorino-1/+1
value is provided or not
2020-11-16add optimization fuel checks to some mir passescjkenn-3/+7
2020-10-29Link to pass docs from NRVO module docsCamelid-0/+2
2020-10-04Remember the `MirSource` for each `Body`Dylan MacKenzie-4/+4
2020-10-04Enable RenameReturnPlace MIR optimization on mir-opt-level >= 2Tomasz Miąsko-6/+0
The destination propagation as currently implemented does not supersede the NRVO, e.g., the destination propagation never applies if either local has an address taken, while NRVO might. Additionally, the issue with failing assertions had been already resolved. Continue running both optimizations at mir-opt-level >= 2.
2020-09-18Implement a destination propagation passJonas Schievink-0/+6
2020-09-04NRVO: Allow occurrences of the return place in var debug infoTomasz Miąsko-4/+5
The non-use occurrence of the return place in var debug info does not currently inhibit NRVO optimization, but it will fail assertion in `visit_place` when optimization is performed. Relax assertion check to allow the return place in var debug info. This case might be impossible to hit in optimization pipelines as of now, but can be encountered in customized mir-opt-level=2 pipeline with copy propagation disabled. For example in: ``` pub fn b(s: String) -> String { a(s) } #[inline] pub fn a(s: String) -> String { let x = s; let y = x; y } ```
2020-08-30mv compiler to compiler/mark-0/+232