@@ -18,6 +18,9 @@ function irgen(@nospecialize(job::CompilerJob))
18
18
EnumAttribute (" sspstrong" , 0 ))
19
19
end
20
20
21
+ delete! (function_attributes (llvmf),
22
+ StringAttribute (" probe-stack" , " inline-asm" ))
23
+
21
24
if Sys. iswindows ()
22
25
personality! (llvmf, nothing )
23
26
end
@@ -261,29 +264,34 @@ end
261
264
262
265
function classify_arguments (@nospecialize (job:: CompilerJob ), codegen_ft:: LLVM.FunctionType )
263
266
source_sig = job. source. specTypes
264
-
265
267
source_types = [source_sig. parameters... ]
266
268
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
+
267
275
codegen_types = parameters (codegen_ft)
268
276
269
277
args = []
270
278
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) )
272
280
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 ))
274
282
continue
275
283
end
276
284
277
285
codegen_typ = codegen_types[codegen_i]
278
286
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,
280
288
codegen= (typ= codegen_typ, i= codegen_i)))
281
289
elseif codegen_typ isa LLVM. PointerType && issized (eltype (codegen_typ)) &&
282
290
! (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,
284
292
codegen= (typ= codegen_typ, i= codegen_i)))
285
293
else
286
- push! (args, (cc= BITS_VALUE, typ= source_typ,
294
+ push! (args, (cc= BITS_VALUE, typ= source_typ, name = source_name,
287
295
codegen= (typ= codegen_typ, i= codegen_i)))
288
296
end
289
297
codegen_i += 1
0 commit comments