Skip to content

do move_outs computation lazilly? #53394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nikomatsakis opened this issue Aug 15, 2018 · 1 comment
Closed

do move_outs computation lazilly? #53394

nikomatsakis opened this issue Aug 15, 2018 · 1 comment
Assignees
Labels
A-NLL Area: Non-lexical lifetimes (NLL) NLL-performant Working towards the "performance is good" goal T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone

Comments

@nikomatsakis
Copy link
Contributor

If I am not mistaken, the move_outs dataflow computation is only used for error reporting. However, we do the computation unconditionally here:

let flow_move_outs = FlowAtLocation::new(do_dataflow(
tcx,
mir,
id,
&attributes,
&dead_unwinds,
MovingOutStatements::new(tcx, mir, &mdpe),
|bd, i| DebugFormatted::new(&bd.move_data().moves[i]),
));

Perhaps it would be more efficient to wait and do it only if we find an error? Or, maybe even better, not do it at all but instead -- when we have an error -- just do a backwards DFS or something? i.e., just do it for the specific error path?

cc @pnkfelix

@nikomatsakis nikomatsakis added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-NLL Area: Non-lexical lifetimes (NLL) WG-compiler-nll NLL-performant Working towards the "performance is good" goal labels Aug 15, 2018
@nikomatsakis nikomatsakis added this to the Rust 2018 RC milestone Aug 15, 2018
@nikomatsakis
Copy link
Contributor Author

Doing a backward DFS would also be better for Polonius I think.

@spastorino is going to investigate.

bors added a commit that referenced this issue Aug 15, 2018
[WIP] Do not used Move data flow analysis to see perf wins

This commit has the only purposed to be tested by:

@bors try

If this makes sense I'm gonna do the real work :).
When all that happens, this should:

Close #53394
bors added a commit that referenced this issue Aug 31, 2018
Do not used Move data flow analysis, make it lazy instead

Close #53394
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-NLL Area: Non-lexical lifetimes (NLL) NLL-performant Working towards the "performance is good" goal T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants