summary refs log tree commit diff
path: root/src/librustc_mir/transform/simplify.rs
AgeCommit message (Collapse)AuthorLines
2018-02-20rustc_mir: do not remove dead user variables if debuginfo needs them.Eduard-Mihai Burtescu-4/+13
2017-12-03funnel all unwind paths through a single Resume blockAriel Ben-Yehuda-34/+0
This simplifies analysis and borrow-checking because liveness at the resume point can always be simply propagated. Later on, the "dead" Resumes are removed.
2017-12-01MIR: s/Lvalue/Place in type names.Eduard-Mihai Burtescu-4/+4
2017-11-14rustc: split off BodyOwnerKind from MirSource.Eduard-Mihai Burtescu-2/+1
2017-11-14rustc: move the MIR pass infrastructure and list to rustc_mir.Eduard-Mihai Burtescu-1/+2
2017-09-04rustc_mir: use Local instead of Lvalue in Storage{Live,Dead}.Eduard-Mihai Burtescu-5/+2
2017-09-03rustc_mir: implement visit_local instead/along visit_lvalue where possible.Eduard-Mihai Burtescu-14/+6
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-2/+2
Like #43008 (f668999), but _much more aggressive_.
2017-08-01rustc_mir::transform::simplify - remove nops firstAriel Ben-Yehuda-2/+2
Removing nops can allow more basic blocks to be merged, but merging basic blocks can't allow for more nops to be removed, so we should remove nops first. This doesn't matter *that* much, because normally we run SimplifyCfg several times, but there's no reason not to do it.
2017-05-02simplify the MirPass traits and passes dramaticallyNiko Matsakis-23/+20
Overall goal: reduce the amount of context a mir pass needs so that it resembles a query. - The hooks are no longer "threaded down" to the pass, but rather run automatically from the top-level (we also thread down the current pass number, so that the files are sorted better). - The hook now receives a *single* callback, rather than a callback per-MIR. - The traits are no longer lifetime parameters, which moved to the methods -- given that we required `for<'tcx>` objecs, there wasn't much point to that. - Several passes now store a `String` instead of a `&'l str` (again, no point).
2017-05-02rework `MirPass` API to be stateless and extract helper fnsNiko Matsakis-2/+2
2017-04-22remove cleanup branches to the resume blockAriel Ben-Yehuda-0/+34
This improves LLVM performance by 10% lost during the shimmir transition.
2017-03-18apply pre-trans passes to Shim MIRAriel Ben-Yehuda-5/+9
2017-03-10Initial implementation of inlining for MIRJames Miller-3/+15
Fairly basic implementation of inlining for MIR. Uses conservative heuristics for inlining.
2017-02-10SwitchInt over SwitchSimonas Kazlauskas-1/+0
This removes another special case of Switch by replacing it with the more general SwitchInt. While this is more clunky currently, there’s no reason we can’t make it nice (and efficient) to use.
2017-02-10If is now always a SwitchInt in MIRSimonas Kazlauskas-1/+0
2016-11-03A way to remove otherwise unused locals from MIRSimonas Kazlauskas-0/+349
Replaces the hack where a similar thing is done within trans.