Skip to content

Speed up LocalGraph #1338

@kripken

Description

@kripken

src/ir/local-graph.h is fairly slow, and we should make it faster. If it were fast enough, we could enable precompute-propagate and merge-locals in more optimization levels, which would improve code output quality.

What LocalGraph does is scan a function and produce a mapping of the sets affecting each get. That is, for each get, the sets that reach that get, that their assigned value may be read there.

This is similar to SSA computation in a way, but simpler (no need to create phis), and there are fairly fast SSA computations on structured control flow like ours, so it seems like this could be fairly fast. Right now the implementation naively carries around big data structures needlessly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions