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 <84105208+topolarity@users.noreply.github.com> * Update src/VectorizationBase.jl Co-authored-by: Cody Tapscott <84105208+topolarity@users.noreply.github.com> --------- Co-authored-by: KristofferC <kristoffer.carlsson@juliacomputing.com> Co-authored-by: Cody Tapscott <84105208+topolarity@users.noreply.github.com>
1 parent 83cd26c commit 1ad67ab

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

src/VectorizationBase.jl

Lines changed: 17 additions & 1 deletion
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

src/llvm_types.jl

Lines changed: 7 additions & 0 deletions
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)