Skip to content

Use DataflowResultsCursor instead of FlowAtLocation #62315

Closed
@tmandry

Description

@tmandry

#61922 introduced DataflowResultsCursor, which provides a stateful caching interface atop FlowAtLocation.

It would be better to use DataflowResultsCursor from more places, both because it's a more convenient / less error-prone interface, and because it's best to have more than one code path exercising the same code. It's also awkward trying to support both interfaces at once (the cursor implementation would be cleaner if we didn't have to).

The main drawback to using it is that there will be extra state/branching in places where we don't need it.

cc @eddyb who asked me to open this, and (along with @nikomatsakis) helped provide inspiration for DataflowResultsCursor
cc @ecstatic-morse @pnkfelix

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlC-cleanupCategory: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions