Skip to content

Commit d598b9a

Browse files
committed
LocalVariableUtils: record mark_dependence bad address operands
Avoid bailing out when something depends on the local variable.
1 parent e77b5ba commit d598b9a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

SwiftCompilerSources/Sources/Optimizer/Utilities/LocalVariableUtils.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,9 @@ extension LocalVariableAccessWalker : ForwardingDefUseWalker {
363363
visit(LocalVariableAccess(.store, operand))
364364
case is DeallocBoxInst:
365365
break
366+
case let markDep as MarkDependenceInst:
367+
assert(markDep.baseOperand == operand)
368+
visit(LocalVariableAccess(.dependence, operand))
366369
default:
367370
visit(LocalVariableAccess(.escape, operand))
368371
}

0 commit comments

Comments
 (0)