Skip to content

[llvm-reduce] Add delta pass to simplify the structure of non-removed initializers #54636

Open
@Keno

Description

@Keno

Consider the llvm-reduce output in https://gist.github.com/Keno/a27add2aed10793b76d340639d0d5bd8 (which I manually reduced further to file #54634). The output contains two big global variables:

@jl_sysimg_gvars = constant [15411 x i64*] [i64* undef, i64* undef, ...
@jl_sysimg_fvars = constant [28283 x i64*] [i64* undef, i64* undef, ...

(for both arrays all but one of the array entries are non-undef). Both variables are semantic in our pass pipeline and recognized by one of the passes that was part of the pipeline we were reducing over, so the variable and its initializer were not removable. However, it would have been permissible and desirable to cut down the constant arrays to only the one non-undef entry. It should be possible to do this with a new delta pass that knows how to simplify the structure of constants.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImproving things as opposed to bug fixing, e.g. new or missing featurejulialangllvm-toolsAll llvm tools that do not have corresponding tag

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions