From 56c5f83b1a26581bcf6f602bc2fa6e05979e2bca Mon Sep 17 00:00:00 2001 From: Billy Moses Date: Fri, 6 Dec 2024 18:14:35 -0600 Subject: [PATCH 1/2] Nofree for math methods --- src/compiler.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler.jl b/src/compiler.jl index 5fcc53dbde..1ffd04f8fc 100644 --- a/src/compiler.jl +++ b/src/compiler.jl @@ -3961,6 +3961,9 @@ end lowerConvention = false end k_name = LLVM.name(llvmfn) + if !has_fn_attribute(llvmfn, EnumAttribute("nofree")) + push!(LLVM.function_attributes(llvmfn), EnumAttribute("nofree")) + end end name = string(name) From 3c4f9a07209c03ca825b3e202fca5062673f4ce4 Mon Sep 17 00:00:00 2001 From: Billy Moses Date: Fri, 6 Dec 2024 18:25:23 -0600 Subject: [PATCH 2/2] fix --- src/compiler.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler.jl b/src/compiler.jl index 1ffd04f8fc..0155e5da34 100644 --- a/src/compiler.jl +++ b/src/compiler.jl @@ -3961,7 +3961,7 @@ end lowerConvention = false end k_name = LLVM.name(llvmfn) - if !has_fn_attribute(llvmfn, EnumAttribute("nofree")) + if !has_fn_attr(llvmfn, EnumAttribute("nofree")) push!(LLVM.function_attributes(llvmfn), EnumAttribute("nofree")) end end