Skip to content

Commit

Permalink
Update compiler.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Jun 16, 2024
1 parent 408a4af commit ab1e922
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/compiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4924,11 +4924,13 @@ function lower_convention(functy::Type, mod::LLVM.Module, entry_f::LLVM.Function
push!(attributes, prev)
end
end
if LLVM.version().major > 15
if kind(prev) == kind(EnumAttribute("memory"))
old = MemoryEffect(value(attr))
mem = MemoryEffect(( set_writing(getModRef(old, ArgMem)) << getLocationPos(ArgMem)) | (getModRef(old, InaccessibleMem) << getLocationPos(InaccessibleMem)) | (getModRef(old, Other) << getLocationPos(Other)))
push!(attributes, EnumAttribute("memory", mem.data))
end
end
if kind(prev) == kind(EnumAttribute("speculatable"))
push!(attributes, prev)
end
Expand Down

0 comments on commit ab1e922

Please sign in to comment.