Skip to content

Conversation

@pcwalton
Copy link
Contributor

@bors: try

Aatch and others added 7 commits September 22, 2016 12:34
Inlining needs to apply the substitutions from the callsite. Also implements TypeFoldable on IndexVec
The deaggregator will generate assignments that aren't allowed in const expressions. This also refactors `is_const_fn` into a method on `TyCtxt`.
Implements basic inlining for MIR functions. The cases it will inline for are conservative, any function that can unwind will not be inlined. Inlining is currently only done if `mir-opt-level` is set to 2. Does not handle debuginfo correctly at the moment.
Don't add an unwind edge if the call/drop/assert is in a cleanup block. This allows the pass to inline more functions correctly. Don't penalize intrinsics as harshly. They were previously treated the same as regular calls but now have the same cost as a statement. Run the before/after hooks for the pass. Since this is a MirMapPass, the hooks weren't run. Run copy propagation each time a function is inlined to remove any unecessary copies introduced during integration. This also makes copy propagation remove any nops it generated once it has finished. Run simplify cfg after inlining has finished for a SCC. This removes the need for a separate simplify cfg pass to be run.
@rust-highfive
Copy link
Contributor

r? @nrc

(rust_highfive has picked a reviewer for you, use r? to override)

@pcwalton
Copy link
Contributor Author

@bors: try

@bors
Copy link
Collaborator

bors commented Sep 24, 2016

⌛ Trying commit 78effef with merge b7845de...

bors added a commit that referenced this pull request Sep 24, 2016
(DO NOT MERGE) Mir inlining with spans @bors: try
@pcwalton pcwalton closed this Sep 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants