Skip to content

Commit 0a16b76

Browse files
committed
[Metal] fix code_llvm(...; optimize=false)
1 parent 43dd410 commit 0a16b76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/metal.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ function add_parameter_address_spaces!(@nospecialize(job::CompilerJob), mod::LLV
238238

239239
# find the byref parameters
240240
byref = BitVector(undef, length(parameters(ft)))
241-
args = classify_arguments(job, ft; post_optimization=true)
241+
args = classify_arguments(job, ft; post_optimization=job.config.optimize)
242242
filter!(args) do arg
243243
arg.cc != GHOST
244244
end
@@ -563,7 +563,7 @@ function add_argument_metadata!(@nospecialize(job::CompilerJob), mod::LLVM.Modul
563563
arg_infos = Metadata[]
564564

565565
# Iterate through arguments and create metadata for them
566-
args = classify_arguments(job, entry_ft; post_optimization=true)
566+
args = classify_arguments(job, entry_ft; post_optimization=job.config.optimize)
567567
i = 1
568568
for arg in args
569569
arg.idx === nothing && continue

0 commit comments

Comments
 (0)