Skip to content

Codegen change during 0.6 development cycle #21305

Closed
@TotalVerb

Description

The output of this file

eltypestuple() = Tuple{}
eltypestuple(x, xs...) = Tuple{eltype(x), eltypes(xs...).types...}

null_safe_op(::Any, ::Type, ::Type...) = false
Base.@pure null_safe_eltype_op(f, xs...) =
    null_safe_op(f, eltypestuple(xs...).types...)

@inline function broadcast_c(f, a...)
    if null_safe_eltype_op(f, a...)
        0
    else
        1
    end
end

f() = broadcast_c(1:10, 1:10, 1:10)

code_llvm(STDOUT, f, Tuple{})

is on 0.5, quite long; on latest 0.6, also quite long.

But briefly, around when #16961 was merged, it was just

define i64 @julia_f_61750() #0 !dbg !5 {
top:
  ret i64 1
}

so something must have changed since. (The latest commit I know to have the short LLVM is 495114c, but I'll bisect to find a better bound.)

cc @JeffBezanson

Some notes:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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