Skip to content

Commit 2309abd

Browse files
authored
Fix 1.11 arg based gc rewrite (#2250)
* Update transforms.jl * Update transforms.jl * Update transforms.jl * Update transforms.jl * Update transforms.jl
1 parent 1a6ff16 commit 2309abd

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

src/llvm/transforms.jl

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -563,27 +563,28 @@ function nodecayed_phis!(mod::LLVM.Module)
563563
while length(addrtodo) != 0
564564
v = pop!(addrtodo)
565565
base, toffset = get_base_and_offset(v)
566-
if offset === nothing
566+
567+
if in(base, seen)
568+
continue
569+
end
570+
push!(seen, base)
571+
if isa(base, LLVM.PHIInst)
572+
for (v, _) in LLVM.incoming(base)
573+
push!(addrtodo, v)
574+
end
575+
continue
576+
end
577+
if offset === nothing
567578
offset = toffset
568579
else
569580
if offset != toffset
570581
all_args = false
571582
break
572583
end
573584
end
574-
if in(base, seen)
575-
continue
576-
end
577-
push!(seen, base)
578585
if isa(base, LLVM.Argument) && addrspace(value_type(base)) == 11
579586
continue
580587
end
581-
if isa(base, LLVM.PHIInst)
582-
for (v, _) in LLVM.incoming(base)
583-
push!(addrtodo, v)
584-
end
585-
continue
586-
end
587588
all_args = false
588589
break
589590
end

0 commit comments

Comments
 (0)