Skip to content

Commit 1ad67ab

Browse files
KristofferCKristofferCtopolarity
authored
fix number of purity args on 1.11+ (#115)
* 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]>
1 parent 83cd26c commit 1ad67ab

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

Diff for: src/VectorizationBase.jl

+17-1
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,23 @@ demoteint(::Type{Int64}, W::StaticInt) = gt(W, pick_vector_width(Int64))
494494
end
495495
meta = Expr(:meta, :inline)
496496
if VERSION >= v"1.8.0-beta"
497-
push!(meta.args, Expr(:purity, true, true, true, true, false))
497+
purity = Expr(:purity,
498+
#= consistent =# true,
499+
#= effect_free =# true,
500+
#= nothrow =# true,
501+
#= terminates_globally =# true,
502+
#= terminates_locally =# false)
503+
if VERSION >= v"1.11"
504+
push!(purity.args,
505+
#= notaskstate =# true,
506+
#= inaccessiblememonly =# true,
507+
#= noub =# true,
508+
#= noub_if_noinbounds =# false,
509+
#= consistent_overlay =# false,
510+
#= nortcall =# true,
511+
)
512+
end
513+
push!(meta.args, purity)
498514
end
499515
quote
500516
$meta

Diff for: src/llvm_types.jl

+7
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,13 @@ end
279279
Expr(:purity, true, true, true, true, false)
280280
end
281281
VERSION >= v"1.9.0-DEV.1019" && push!(purity.args, true)
282+
VERSION >= v"1.11" && push!(purity.args,
283+
#= inaccessiblememonly =# true,
284+
#= noub =# true,
285+
#= noub_if_noinbounds =# false,
286+
#= consistent_overlay =# false,
287+
#= nortcall =# true,
288+
)
282289
Expr(:meta, purity, :inline)
283290
else
284291
Expr(:meta, :inline)

0 commit comments

Comments
 (0)