@@ -18,6 +18,9 @@ function irgen(@nospecialize(job::CompilerJob))
1818 EnumAttribute (" sspstrong" , 0 ))
1919 end
2020
21+ delete! (function_attributes (llvmf),
22+ StringAttribute (" probe-stack" , " inline-asm" ))
23+
2124 if Sys. iswindows ()
2225 personality! (llvmf, nothing )
2326 end
@@ -261,29 +264,34 @@ end
261264
262265function classify_arguments (@nospecialize (job:: CompilerJob ), codegen_ft:: LLVM.FunctionType )
263266 source_sig = job. source. specTypes
264-
265267 source_types = [source_sig. parameters... ]
266268
269+ source_argnames = Base. method_argnames (job. source. def)
270+ while length (source_argnames) < length (source_types)
271+ # this is probably due to a trailing vararg; repeat its name
272+ push! (source_argnames, source_argnames[end ])
273+ end
274+
267275 codegen_types = parameters (codegen_ft)
268276
269277 args = []
270278 codegen_i = 1
271- for (source_i, source_typ) in enumerate (source_types)
279+ for (source_i, ( source_typ, source_name)) in enumerate (zip ( source_types, source_argnames) )
272280 if isghosttype (source_typ) || Core. Compiler. isconstType (source_typ)
273- push! (args, (cc= GHOST, typ= source_typ))
281+ push! (args, (cc= GHOST, typ= source_typ, name = source_name ))
274282 continue
275283 end
276284
277285 codegen_typ = codegen_types[codegen_i]
278286 if codegen_typ isa LLVM. PointerType && ! issized (eltype (codegen_typ))
279- push! (args, (cc= MUT_REF, typ= source_typ,
287+ push! (args, (cc= MUT_REF, typ= source_typ, name = source_name,
280288 codegen= (typ= codegen_typ, i= codegen_i)))
281289 elseif codegen_typ isa LLVM. PointerType && issized (eltype (codegen_typ)) &&
282290 ! (source_typ <: Ptr ) && ! (source_typ <: Core.LLVMPtr )
283- push! (args, (cc= BITS_REF, typ= source_typ,
291+ push! (args, (cc= BITS_REF, typ= source_typ, name = source_name,
284292 codegen= (typ= codegen_typ, i= codegen_i)))
285293 else
286- push! (args, (cc= BITS_VALUE, typ= source_typ,
294+ push! (args, (cc= BITS_VALUE, typ= source_typ, name = source_name,
287295 codegen= (typ= codegen_typ, i= codegen_i)))
288296 end
289297 codegen_i += 1
0 commit comments