File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -553,6 +553,43 @@ function nodecayed_phis!(mod::LLVM.Module)
553553 if all_args
554554 continue
555555 end
556+
557+ all_args = true
558+ addrtodo = Value[inst]
559+ seen = Set {LLVM.Value} ()
560+
561+ offset = nothing
562+
563+ while length (addrtodo) != 0
564+ v = pop! (addrtodo)
565+ base, toffset = get_base_and_offset (v)
566+ if offset === nothing
567+ offset = toffset
568+ else
569+ if offset != toffset
570+ all_args = false
571+ break
572+ end
573+ end
574+ if in (base, seen)
575+ continue
576+ end
577+ push! (seen, base)
578+ if isa (base, LLVM. Argument) && addrspace (value_type (base)) == 11
579+ continue
580+ end
581+ if isa (base, LLVM. PHIInst)
582+ for (v, _) in LLVM. incoming (base)
583+ push! (addrtodo, v)
584+ end
585+ continue
586+ end
587+ all_args = false
588+ break
589+ end
590+ if all_args
591+ continue
592+ end
556593 end
557594
558595 push! (todo, inst)
You can’t perform that action at this time.
0 commit comments