Skip to content

Commit

Permalink
fix number of purity args on 1.11+ (#115)
Browse files Browse the repository at this point in the history
* fix number of purity args on 1.11+

* Update src/llvm_types.jl

Co-authored-by: Cody Tapscott <[email protected]>

* Update src/VectorizationBase.jl

Co-authored-by: Cody Tapscott <[email protected]>

---------

Co-authored-by: KristofferC <[email protected]>
Co-authored-by: Cody Tapscott <[email protected]>
  • Loading branch information
3 people authored Oct 14, 2024
1 parent 83cd26c commit 1ad67ab
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/VectorizationBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,23 @@ demoteint(::Type{Int64}, W::StaticInt) = gt(W, pick_vector_width(Int64))
end
meta = Expr(:meta, :inline)
if VERSION >= v"1.8.0-beta"
push!(meta.args, Expr(:purity, true, true, true, true, false))
purity = Expr(:purity,
#= consistent =# true,
#= effect_free =# true,
#= nothrow =# true,
#= terminates_globally =# true,
#= terminates_locally =# false)
if VERSION >= v"1.11"
push!(purity.args,
#= notaskstate =# true,
#= inaccessiblememonly =# true,
#= noub =# true,
#= noub_if_noinbounds =# false,
#= consistent_overlay =# false,
#= nortcall =# true,
)
end
push!(meta.args, purity)
end
quote
$meta
Expand Down
7 changes: 7 additions & 0 deletions src/llvm_types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,13 @@ end
Expr(:purity, true, true, true, true, false)
end
VERSION >= v"1.9.0-DEV.1019" && push!(purity.args, true)
VERSION >= v"1.11" && push!(purity.args,
#= inaccessiblememonly =# true,
#= noub =# true,
#= noub_if_noinbounds =# false,
#= consistent_overlay =# false,
#= nortcall =# true,
)
Expr(:meta, purity, :inline)
else
Expr(:meta, :inline)
Expand Down

0 comments on commit 1ad67ab

Please sign in to comment.