Skip to content

Excessive LLVM time in egal codegen of large struct #54109

Closed
@Keno

Description

@Keno

This is similar to #44998, in that LLVM's SLPVectorizer is involved, but I think it's easier to solve by tweaking the codegen for egal:

struct DefaultOr{T}
   x::T
   default::Bool
end

@eval struct Torture
    $((Expr(:(::), Symbol("x$i"), DefaultOr{Float64}) for i = 1:897)...)
end

egal_any(x::Torture, y::Any) = x === y
julia> @time code_llvm(egal_any, Tuple{Torture, Any})
 22.034327 seconds (5.48 M allocations: 206.847 MiB, 0.40% gc time, 88.69% compilation time: <1% of which was recompilation)

Metadata

Metadata

Assignees

No one assigned

    Labels

    compiler:codegenGeneration of LLVM IR and native codecompiler:llvmFor issues that relate to LLVMperformanceMust go faster

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions