FFFF
Skip to content

Latest commit

 

History

History
7275 lines (6592 loc) · 244 KB

File metadata and controls

7275 lines (6592 loc) · 244 KB
custom,
k_name,
llvmfn,
"enz_noop",
LLVM.Attribute[
StringAttribute("enzyme_inactive"),
EnumAttribute("nofree"),
StringAttribute("enzyme_no_escaping_allocation"),
StringAttribute("enzyme_ta_norecur"),
],
)
return
end
if EnzymeRules.is_inactive_noinl_from_sig(specTypes; world, method_table)
push!(edges, mi)
handleCustom(
state,
custom,
k_name,
llvmfn,
"enz_noop",
LLVM.Attribute[
StringAttribute("enzyme_inactive"),
EnumAttribute("nofree"),
StringAttribute("enzyme_no_escaping_allocation"),
StringAttribute("enzyme_ta_norecur"),
],
false,
false,
)
for bb in blocks(llvmfn)
for inst in instructions(bb)
if isa(inst, LLVM.CallInst)
LLVM.API.LLVMAddCallSiteAttribute(
inst,
reinterpret(
LLVM.API.LLVMAttributeIndex,
LLVM.API.LLVMAttributeFunctionIndex,
),
StringAttribute("no_escaping_allocation"),
)
LLVM.API.LLVMAddCallSiteAttribute(
inst,
reinterpret(
LLVM.API.LLVMAttributeIndex,
LLVM.API.LLVMAttributeFunctionIndex,
),
StringAttribute("enzyme_inactive"),
)
LLVM.API.LLVMAddCallSiteAttribute(
inst,
reinterpret(
LLVM.API.LLVMAttributeIndex,
LLVM.API.LLVMAttributeFunctionIndex,
),
EnumAttribute("nofree"),
)
end
end
end
return
end
if func === typeof(Base.match)
handleCustom(
state,
custom,
k_name,
llvmfn,
"base_match",
LLVM.Attribute[
StringAttribute("enzyme_inactive"),
EnumAttribute("nofree"),
StringAttribute("enzyme_no_escaping_allocation"),
],
false,
false,
)
for bb in blocks(llvmfn)
for inst in instructions(bb)
if isa(inst, LLVM.CallInst)
LLVM.API.LLVMAddCallSiteAttribute(
inst,
reinterpret(
0