Skip to content

Commit 0dbfdc9

Browse files
committed
LifetimeDependenceScopeFixup logging
(cherry picked from commit 352724e)
1 parent e4bd866 commit 0dbfdc9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LifetimeDependenceScopeFixup.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ private func extendAccessScopes(dependence: LifetimeDependence,
8585

8686
_ = walker.walkDown(root: dependence.dependentValue)
8787

88+
log("Scope fixup for dependent uses:\n\(accessRange)")
89+
8890
// Lifetime dependenent uses may not be dominated by the access. The dependent value may be used by a phi or stored
8991
// into a memory location. The access may be conditional relative to such uses. If any use was not dominated, then
9092
// `accessRange` will include the function entry.
@@ -219,6 +221,7 @@ private struct LifetimeDependenceScopeFixupWalker : LifetimeDependenceDefUseWalk
219221
}
220222

221223
mutating func escapingDependence(on operand: Operand) -> WalkResult {
224+
log(">>> Escaping dependence: \(operand)")
222225
_ = visitor(operand)
223226
// Make a best-effort attempt to extend the access scope regardless of escapes. It is possible that some mandatory
224227
// pass between scope fixup and diagnostics will make it possible for the LifetimeDependenceDefUseWalker to analyze

0 commit comments

Comments
 (0)