|
9 | 9 | // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
10 | 10 | //
|
11 | 11 | //===----------------------------------------------------------------------===//
|
12 |
| -// |
13 |
| -// This file declares logic used by definitive analysis related passes that look |
14 |
| -// at all the instructions that access a memory object. This is quite specific |
15 |
| -// to definitive analysis in that it is tuple element sensitive instead of |
16 |
| -// relying on SROA. |
17 |
| -// |
| 12 | +/// |
| 13 | +/// \file |
| 14 | +/// |
| 15 | +/// High Level Overview |
| 16 | +/// ------------------- |
| 17 | +/// |
| 18 | +/// This file declares logic that is used by the predictable memory optimization |
| 19 | +/// pass. Like definite initialization, it is tuple element sensitive instead of |
| 20 | +/// relying on an SROA optimization or the like to chop up structs. |
| 21 | +/// |
| 22 | +/// NOTE: PMO is an abbreviation for "Predictable Memory Optimizations". |
| 23 | +/// |
| 24 | +/// Historical Note |
| 25 | +/// --------------- |
| 26 | +/// |
| 27 | +/// This file looks very similar to DIMemoryUseCollector.* and has many |
| 28 | +/// connections to Definite Initialization. This is because early in the |
| 29 | +/// development of Swift, Predictable Memory Optimizations and Definite |
| 30 | +/// Initialization were actually the same pass. The pass grew really big and the |
| 31 | +/// two passes were split, but still used similra utility code. This became the |
| 32 | +/// original DIMemoryUseCollector.*. This code was full of conditional logic for |
| 33 | +/// all of the various cases that made it difficult to understand which code was |
| 34 | +/// needed for Predictable Mem Opts and what was needed for DI. The introduction |
| 35 | +/// of the SIL ownership model to SIL was used as an opportunity to split the |
| 36 | +/// two, flatten the sphagetti conditional code so the logic was clear, and |
| 37 | +/// allow the two passes to diverge and hew their form closer to their function. |
| 38 | +/// |
18 | 39 | //===----------------------------------------------------------------------===//
|
19 | 40 |
|
20 | 41 | #ifndef SWIFT_SILOPTIMIZER_MANDATORY_PMOMEMORYUSECOLLECTOR_H
|
|
0 commit comments