summary refs log tree commit diff
path: root/src/librustc_mir/transform/simplify.rs
AgeCommit message (Collapse)AuthorLines
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.