Skip to content

Commit cedbbee

Browse files
committed
Clean-up comments.
1 parent 2e9df16 commit cedbbee

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/metal.jl

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,10 @@ function add_address_spaces!(@nospecialize(job::CompilerJob), mod::LLVM.Module,
155155
end
156156

157157
function remapType(src)
158-
# TODO: cache?
159-
# TODO: recurse in structs?
160-
# TODO: when wrapping non-AS1 pointers, shouldn't the parent object use the same AS?
158+
# TODO: shouldn't we recurse into structs here, making sure the parent object's
159+
# address space matches the contained one? doesn't matter right now as we
160+
# only use LLVMPtr (i.e. no rewriting of contained pointers needed) in the
161+
# device addrss space (i.e. no mismatch between parent and field possible)
161162
dst = if src isa LLVM.PointerType && addrspace(src) == 0
162163
LLVM.PointerType(remapType(eltype(src)), #=device=# 1)
163164
else
@@ -376,7 +377,6 @@ function add_input_arguments!(@nospecialize(job::CompilerJob), mod::LLVM.Module,
376377
used_intrinsics = filter(keys(kernel_intrinsics)) do intr_fn
377378
haskey(functions(mod), intr_fn)
378379
end |> collect
379-
# TODO: Figure out how to not be inefficient with these changes
380380
nargs = length(used_intrinsics)
381381

382382
# determine which functions need these arguments
@@ -404,8 +404,7 @@ function add_input_arguments!(@nospecialize(job::CompilerJob), mod::LLVM.Module,
404404
end
405405

406406
# add the arguments
407-
# NOTE: we could be more fine-grained, only adding the specific intrinsics used by this function.
408-
# not sure if that's worth it though.
407+
# NOTE: we don't need to be fine-grained here, as unused args will be removed during opt
409408
workmap = Dict{LLVM.Function, LLVM.Function}()
410409
for f in worklist
411410
fn = LLVM.name(f)
@@ -535,8 +534,6 @@ end
535534
#
536535
# module metadata is used to identify buffers that are passed as kernel arguments.
537536

538-
# TODO: remove metadata emission infrastructure from GPUCompiler
539-
540537
function add_argument_metadata!(@nospecialize(job::CompilerJob), mod::LLVM.Module,
541538
entry::LLVM.Function)
542539
ctx = context(mod)

0 commit comments

Comments
 (0)