Skip to content

Consider running inliner over module before function simplification to improve compile times #114151

@aeubanks

Description

@aeubanks

Idea by @nikic: we end up reoptimizing code that gets inlined in many places. If we can inline and remove functions before the expensive function simplification pipeline, we'll end up saving some runs of the simplification pipeline.

A naive attempt shows promise. Some big wins, but some even bigger regressions. Restricting the initial inliner pass further helps.

Ultimately, we'd like to remove as many discardable (internal/linkonce_odr) functions from the module by inlining them, but there's not a good way to know which discardable functions will get inlined into all callers. We may need some more heuristics.

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