Skip to content

Commit 9dc3bd6

Browse files
committed
Swift Optimizer: add EscapeInfo, a new utility for escape analysis
It’s a replacement for the old `EscapeAnalysis`, implemented in Swift (instead of C++) and with a much simple design and implementation. While the old EscapeAnalysis builds a connection graph, the new EscapeInfo just performs a simple def-use and use-def walk in the SIL. The EscapeInfo does not need to analyze the whole function (like the EscapeAnalysis does), but just the relevant value which is inspected. Therefore EscapeInfo is not an `Analysis` which caches its result across optimization passes - it’s not needed.
1 parent 3b2e409 commit 9dc3bd6

File tree

2 files changed

+1007
-0
lines changed

2 files changed

+1007
-0
lines changed

SwiftCompilerSources/Sources/Optimizer/Utilities/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77
# See http://swift.org/CONTRIBUTORS.txt for Swift project authors
88

99
swift_compiler_sources(Optimizer
10+
EscapeInfo.swift
1011
OptUtils.swift)

0 commit comments

Comments
 (0)