Skip to content

Commit 86046e4

Browse files
committed
Add a comment
1 parent f078e74 commit 86046e4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/copyable_task.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,12 @@ function derive_copyable_task_ir(ir::BBCode)::Tuple{BBCode,Tuple,Vector{Any}}
827827
ref_ind = ssa_id_to_ref_index_map[id]
828828
push!(
829829
inst_pairs,
830+
# The last argument, ref_index_to_type_map[ref_ind], is a
831+
# performance optimisation. The idea is that we know the inferred
832+
# type of the PhiNode from the original IR, and by passing it to
833+
# deref_phi we can type annotate the element type of the Ref
834+
# that it's being dereferenced, resulting in more concrete types
835+
# in the generated IR.
830836
(
831837
id,
832838
new_inst(

0 commit comments

Comments
 (0)