diff --git a/src/irgen.jl b/src/irgen.jl index c8e2d75d..919d9793 100644 --- a/src/irgen.jl +++ b/src/irgen.jl @@ -265,14 +265,11 @@ function emit_exception!(builder, name, inst) # report the exception if Base.JLOptions().debug_level >= 1 name = globalstring_ptr!(builder, name, "exception") - c = if Base.JLOptions().debug_level == 1 + if Base.JLOptions().debug_level == 1 call!(builder, Runtime.get(:report_exception), [name]) else call!(builder, Runtime.get(:report_exception_name), [name]) end - callsite_attribute!(c, ( - LLVM.EnumAttribute("inaccessiblememonly", 0; ctx), - LLVM.EnumAttribute("writeonly", 0; ctx))) end # report each frame @@ -290,10 +287,7 @@ function emit_exception!(builder, name, inst) end # signal the exception - c = call!(builder, Runtime.get(:signal_exception)) - callsite_attribute!(c, ( - LLVM.EnumAttribute("inaccessiblememonly", 0; ctx), - LLVM.EnumAttribute("writeonly", 0; ctx))) + call!(builder, Runtime.get(:signal_exception)) emit_trap!(job, builder, mod, inst) end diff --git a/src/ptx.jl b/src/ptx.jl index 46a6658f..cdc381ab 100644 --- a/src/ptx.jl +++ b/src/ptx.jl @@ -387,11 +387,7 @@ function hide_trap!(mod::LLVM.Module) if isa(val, LLVM.CallInst) @dispose builder=Builder(ctx) begin position!(builder, val) - c = call!(builder, exit) - callsite_attribute!(c, ( - LLVM.EnumAttribute("inaccessiblememonly", 0; ctx), - LLVM.EnumAttribute("writeonly", 0; ctx), # can we do readnone? - LLVM.EnumAttribute("noreturn", 0; ctx))) + call!(builder, exit) end unsafe_delete!(LLVM.parent(val), val) changed = true diff --git a/src/utils.jl b/src/utils.jl index bbed9836..f3190440 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -113,10 +113,3 @@ macro unlocked(ex) end esc(combinedef(def)) end - -function callsite_attribute!(call, attributes) - # TODO: Make a nice API for this in LLVM.jl - for attribute in attributes - LLVM.API.LLVMAddCallSiteAttribute(call, LLVM.API.LLVMAttributeFunctionIndex, attribute) - end -end