Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More robustly use effect override internals #116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 25 additions & 11 deletions src/llvm_types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -273,19 +273,33 @@ end
end
callonly && return call
meta = if VERSION ≥ v"1.8.0-beta"
purity = if touchesmemory
Expr(:purity, false, false, true, true, false)
if VERSION >= v"1.12.0-DEV.1406"
purity = Base.form_purity_expr(Base.EffectsOverride(;
consistent=!touchesmemory,
effect_free=!touchesmemory,
nothrow=true,
terminates_globally=true,
terminates_locally=true,
notaskstate=true,
inaccessiblememonly=true,
noub=true,
nortcall=true,
))
else
Expr(:purity, true, true, true, true, false)
purity = if touchesmemory
Expr(:purity, false, false, true, true, false)
else
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,
)
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
Loading