Skip to content

do move_outs computation lazilly? #53394

Closed
@nikomatsakis

Description

@nikomatsakis

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

Metadata

Metadata

Assignees

Labels

A-NLLArea: Non-lexical lifetimes (NLL)NLL-performantWorking towards the "performance is good" goalT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions